I am able to use a imagePullSecret in my spec so that my container section images are able to connect to a private repository. If I have initContainer section also, it is not using the imagePullSecret and the deployment fails.
ImagePullSecret will work for both normal container and initContainer, you just need to define imagePullSecret once in your spec.