-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Secrets rotation and Secrets semantics #4673
Comments
Relevant to #4672 |
I'm really hoping to avoid having the kubelet be dynamically updating magic On Fri, Feb 20, 2015 at 9:43 AM, Eric Tune notifications@github.com wrote:
|
I think we should support dynamic updates. That makes the feature vastly more useful and reduces the complexity for clients tremendously. Immutable secret objects would induce cascading complexity: automatic name generation, automatic garbage collection of secrets not in use, etc. Plus, I doubt we could prevent users from updating the volume source to point to a new secret, which seems to have about the same complexity. In general, making things not updatable greatly complicates our user-facing configuration solution. We could potentially restart/recreate containers upon these kinds of updates for now, if that would simplify the implementation. Additionally, we're going to want the same behavior for a dynamic config solution for our own components. |
Also, I vote for atomic update. A lifecycle event can notify the containers that they should reopen the file(s). |
Dynamic updates can be achieved by running a secret-syncer sidecar. I'm As for atomic updates, easier said than done. The only atomic op is We could do something like put secrets into a subdir of the volume and then e.g. mkdir /path/to/volume/.update_in_progress It's ugly and we still have to deal with cleanup, but it's the only way I On Fri, Feb 20, 2015 at 10:48 PM, Brian Grant notifications@github.com
|
@erictune @thockin @bgrant0607 I am torn on this one personally. One thing I want to point out while I gather my thoughts is that I think we have a similar problem in this use-case to other ones that have been mentioned:
|
I now think we probably don't need to prioritize automated rotation at this time. Most pods are going to have a way that they can be updated to have a new image or new flags. Updating the secret can use that same workflow, assuming secret changes are infrequent. There are two cases where secrets might change frequently, but I don't think these are that important right now: First, short lived tokens. We've talked about having a way to hold something like an OAuth Refresh Token in the apiserver, and then have it generate access tokens periodically, and "rotate" them for clients. While this has the nice property of protecting the long lived secret, clients are probably not going to expect to have the access token changing underneath them, and it has the drawback of giving the client the access token even when it doesn't need it (if it has time-varying behavior). Second would be a server that stores multiple changing secrets, like username/password combinations for a website. This case doesn't match the current secrets implementation: secret modifications made by the pod won't be remembered. |
TL;DR |
I'm fine closing this for now - it's a much larger design issue and not priortiy |
It would be nice to be able to rotate secrets while the pod is still running. This issue is to discuss how that might work.
Some things to think about:
The text was updated successfully, but these errors were encountered: