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

Restart resource on config change #222

Open
alewitt2 opened this issue Mar 5, 2021 · 0 comments
Open

Restart resource on config change #222

alewitt2 opened this issue Mar 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@alewitt2
Copy link
Member

alewitt2 commented Mar 5, 2021

Is your feature request related to a problem? Please describe.
when a deployment references a configmap in its envs, and the configmap gets updated, the deploy has no way of getting the updated value until it is restart. But the deployment wont ever get restarted unless someone does it manually or it has another actual change to its own yaml.

Describe the solution you'd like
there needs to be a way to tie a resource to be updated when the envs that it references gets updated.

something like this may work:

  1. first you would need to extend the env genericKeyRef concept to be able to pull things other items in a yaml with a data section. basically allow a user to specify a path, instead of just assuming the path is data . this is the relevant code https://github.com/razee-io/razeedeploy-core/blob/master/lib/FetchEnvs.js#L88
  2. once you have that, you'd probably want a new type, like md5sum or sha256sum, which would convert the fetched data (wether its a single data or an object) into a single string.
  3. once you have that, then you can do what the helm chart is doing by creating a mustacheTemplate that injects the fetched checksum into your deployments template annotations.

Additional context
https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments

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