serlo / infrastructure-modules-shared

Apache License 2.0
4 stars 1 forks source link

Bug: Current config.json.tpl does not get applied via terraform #21

Closed kulla closed 2 years ago

kulla commented 2 years ago

Currently we have sync.interval set to 6 in the file config.json.tpl (see https://github.com/serlo/infrastructure-modules-shared/blob/main/enmeshed/config.json.tpl#L22). However, when I have a look at /config.json in the enmeshed container via kubectl exec <pod-name> -n data-wallet -i -t -- sh there is the old number 60 stored.

hugotiburtino commented 2 years ago

Using subPath the volume is not updated automatically. https://kubernetes.io/docs/concepts/configuration/secret/#mounted-secrets-are-updated-automatically Anyways, I've deleted the old pod and the new one comes with the applied value. Please check if the behavior corresponds to the desired.

hugotiburtino commented 2 years ago

It is better to automatize it. I will see how to not use subPath

inyono commented 2 years ago

Typical workaround for such cases: add a checksum of the config as an environment variable to the pod. Since changes in environment variables will trigger a redeployment, this ensures that config updates are handled correctly. See e.g. https://github.com/serlo/infrastructure-modules-serlo.org/blob/main/server/main.tf#L78-L81.