Open mnpenner opened 3 years ago
@mnpenner thanks for creating this issue! How are you deploying with your devspace.yaml
? Currently we do not rewrite any deployments or pods unless dev.replacePods
is specified explicitly, so unfortunately we cannot just switch the imagePullPolicy
to Always
for the images during dev mode automatically.
How are you deploying with your devspace.yaml?
What do you mean? Here's my deployments
bit:
deployments:
- name: development
kubectl:
kustomize: true
manifests:
- k8s
i.e. using kubectl + kustomize. I'm not using devspace for production.
I figured since you're building the config on my behalf (by running kubectl/kustomize) you could tamper with the config a little bit too by swapping the imagePullPolicy
.
I didn't know about replacePods
. That looks pretty much like what I wanted, I think I could use patches
to replace
the imagePullPolicy
.
I would still suggest an easier-to-use option for this, akin to how you have createPullSecret
. Alternatively, if devspace is failing to deploy and detects an "ImagePullBackOff" you can point them towards some docs on how to fix it. Right now I think it just says "this will probably never succeed" and keeps trying.
Is your feature request related to a problem?
Yes. I just spent about an hour trying to figure out how to fix a "ImagePullBackOff" error. I could pull
myreg/myns/myimage:latest
from my registry no problem, but devspace creates new versions of the images but I guess doesn't push them to my remote repo. That's good because it doesn't need to push them while I'm still developing, but it also means if you haveimagePullPolicy: Always
in your k8s config, it ain't gonna work because it'll keep trying to pull it from the registry even though it only exists locally.Which solution do you suggest?
Override the
imagePullPolicy
toNever
for all images that devspace manages, which I guess is just the ones listed underimages
indevspace.yaml
.Which alternative solutions exist?
Update your deployment configs yourself. This is problematic if you want to use
imagePullPolicy: Always
for production, butNever
for development. You could fix this with a kustomize overlay probably, but the site I'm working on is too simple to warrant that.Additional context
https://stackoverflow.com/a/54043058/65387
/kind feature