When a ConfigMap manifest is updated, users may want that to automatically update the workload that it references. Unfortunately the deployment will only update if the configmap name or any other field changes in the spec.
ref #98
When updating config maps, we would have to track all entities that reference the config map and trigger a restart of all of those.
Having changes to a config file trigger changes to the appropriate ConfigMap, Deployment, etc. would be fantastic, but probably difficult to implement and more suited for a release further down the line. In the short term, however, I think it would be extremely helpful to be able to define configs even without auto-updating. Something like this:
apiVersion: skaffold/v1alpha2
kind: Config
build:
tagPolicy:
sha256: {}
local: {}
artifacts:
- imageName: my-app
bazel:
target: //:my-app.tar
configs:
- configMapName: prometheus-config
file: config/prometheus.yml
- configMapName: nginx-config
file: config/nginx.conf
- configMapName: my-arbitrary-config
args:
foo: bar
baq: baz
Even if this only created the ConfigMaps at the beginning and didn't watch them for changes, it would be a big win for a lot of use cases. As it stands, the config file thing is pretty much the only thing that keeps Skaffold from being a "one-command" solution to a thorny problem.
Currently, if I change a value in a config map, skaffold (v0.30) does neither rebuild/apply the updated value. I have to restart it manually for new values to take effect. Is this related to this issue (or https://github.com/kubernetes/kubernetes/issues/22368) or is there something wrong with my skaffold configuration? I've confirmed that I am not manually syncing my k8s/ folder.
@demisx The issue is still open. Skaffold does not yet support this desired behavior. As far as I know Skaffold doesn鈥檛 handle ConfigMaps at all.
@lucperkins Got it. Sorry, I wasn't sure if this was the issue I was experiencing or not. I'll be watching!
Configmaps get updated but not the deployments referencing them.
I'm closing this issue as it hasn't seen activity in awhile, and if it does still exist, it doesn't seem to be getting any traction at the moment. If this issue appears in the most recent release of Skaffold, please feel free to add a follow-up comment and we will see about getting it prioritized appropriately.
If someone sees a similar issue to this one, please create a new issue, but do include a link to this issue if possible.
Thank you for sharing this issue with us!
Most helpful comment
Having changes to a config file trigger changes to the appropriate ConfigMap, Deployment, etc. would be fantastic, but probably difficult to implement and more suited for a release further down the line. In the short term, however, I think it would be extremely helpful to be able to define configs even without auto-updating. Something like this:
Even if this only created the
ConfigMaps at the beginning and didn't watch them for changes, it would be a big win for a lot of use cases. As it stands, the config file thing is pretty much the only thing that keeps Skaffold from being a "one-command" solution to a thorny problem.