-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Watch AWS for version changes ? #16
Comments
Hey! What's your goal, and expected use-cases? Is that to reconcile respective K8s secrets accordingly? If so, how would your app that mounting the K8s secret as envvars or a container volume reloads it? |
Hey, I was thinking about the same thing too. @mumoshu How do you suggest to reload them? At the moment, I guess I would need 3 steps to update a deployment:
Reconcile K8s secrets with SecretsManager would simplify the process by removing a step. I only use Thanks for your work! |
@maxbrunet Hey!
I guess no. The suggested proposal seems to update the K8s secret without recreating it. And your k8s deployment has no way to react on changes in the K8s secret. Perhaps you want a CI or CD pipeline that rolling-updates your K8s deployment each time the upstream SecretsManager secret changes? |
Exactly.
Yes, it's the only option I've thought of so far. Reconcile the K8s secret with the SecretsManager would be pretty smooth for |
I mostly agree, but there's a pitfall. When this feature is used with IMHO the only perfect solution I've found so far is create a K8s secret per a SSM secret version. You keep at least two recent versions of your K8s secrets. Trigger a rolling-update by changing the K8s secret name referenced from your deployment's pod spec. This way you have a complete control of when to apply changes, plus the ability to rollback. I.e. do things declaratively. That said, it isn't "unnecessary". Making your workflow complicated isn't nice, though. So probably we need an another way to make the workflow simpler? What if You'd want to automate it further by automatically updating Deployment or CronJob per a new K8s secret. But that's an another story. Implementing the automation in aws-secret-operator operator seems feasible. But then there's an another problem - you have two things that updates your Deployment or CronJob, your CI/CD pipeline and aws-secret-operator. That said, perhaps you'll like your CI/CD pipeline combined with WDYT? |
@mumoshu See link for details as to why it works, in case someone doesn't know GO SDK will always return the LATEST version of the secret if neither Stage nor Version ID are specified. Luckily you haven't really ENFORCED specifying version ID so that's true and tested ATM. 2.-I've been doing quite some reading on this and k8s Secrets in volumes as of 1.14 (AFAIK) AUTOMATICALLY update values in the POD if the Secret itself is updated. Go to the bottom of this section: @maxbrunet Please see the link at the top, there's no need for messing with the version ID GUID. Edit: |
Would it make sense to watch the SecretsManager for version changes?
The text was updated successfully, but these errors were encountered: