Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating config (configmap) should update an annotation, causing the pods to restart #940

Open
TJM opened this issue Aug 9, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@TJM
Copy link

TJM commented Aug 9, 2023

Is your feature request related to a problem? Please describe.

Our vault cluster(s) are entirely configured through terraform CI/CD. When I recently added plugin_directory to the config, it did not appear to take effect, even though I could exec in and see that it was in the config file. However, the running vault server was not aware of the change.

Describe the solution you'd like
Generally, when configuration is driven through a configmap, an annotation with a value of the sha256sum of the configmap is added to the statefulset/deployment so that it will know that a change has been made and restart. That seems like a reasonable solution, but I am open to other choices?

Describe alternatives you've considered
manually restarting the vault cluster (kubectl rollout restart sts/vault) and retrying the pipeline

Additional context

Additionally, while I was looking at this, I noticed that PID 1 was a shell instead of "dumb-init" like it is supposed to be..

/ $ ps
PID   USER     TIME  COMMAND
    1 vault     0:00 /bin/sh -ec cp /vault/config/extraconfig-from-values.hcl /tmp/storageconfig.hcl; [ -n "${HOST_IP}" ] && sed -Ei "s|HOST_IP|${HOST_IP?}|g" /tmp/storageconfig.hcl; [ -n "${POD_IP}" ] && sed -Ei
   11 vault     0:00 {docker-entrypoi} /usr/bin/dumb-init /bin/sh /usr/local/bin/docker-entrypoint.sh vault server -config=/tmp/storageconfig.hcl
   12 vault     0:17 vault server -config=/tmp/storageconfig.hcl

... that seems bad? It seems like maybe that should be adding the script between docker entrypoint and vault server?

@TJM TJM added the enhancement New feature or request label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant