-
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
Identify which version of a secret a pod uses. #4949
Comments
I think the binding should happen in the kubelet. At what point during the pod lifecycle should the binding happen? Before pod start seems like a good place to start discussion. Regardless of where/when binding happens, if we think it is a valid use-case to be able to specify the uid or resourceVersion, we need to think through the case where the specific version is unavailable. At the least we should create an event with cause information. I don't think you want the pod to start in this case unless the exact specified version is available. I have some other comments about status and how this should appear to the user but I'll comment on #4950 with those. |
Adding "namespace" to the object reference seems redundant. You're already in a namespace when you're working with a pod. I needed the same thing, though, so I added a defaulting function to assign the pod's namespace to the object reference I am using in my PR. |
Object reference namespaces should remain unset when stored so they can be copied to other objects without requiring a change. An object reference without a namespace means "use this namespace" which is not the same as "use the namespace named foo" |
What if you don't want to copy the object reference to another object without requiring a change of namespace? Eric's JSON example above sans namespace:
@smarterclayton are you saying this is incorrect? if so, why? Because it seems so like a foreign key here to something in the same namespace, but it doesn't require the user to enter the namespace again in the "target" struct. They are already in the namespace. Meanwhile, you need the namespace in the volume plugin to lookup the Secret. |
|
@erictune There are no sig labels on this issue. Please add a sig label by: |
/sig node |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
/remove-lifecycle stale see also #22368 |
/close |
@fromanirh: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Suppose I create a secret like this:
And I make a pod that references that secret, using an
ObjectReference
, like this:When is the
ObjectReference
bound? How complete anObjectReference
can/should the creator specify?If the pod specifies name and namespace, but not uid or resourceVersion, then binding could happen in the apiserver or at kubelet.
Do we agree that users need to be able to see what binding was made, so that e.g. the user can see if all pods are updated to use a new value of a secret?
If binding happens in the apiserver then:
podSpec.Volume[i].source.secret.target
If binding happens in the kubelet, then:
the latter seems preferable.
The text was updated successfully, but these errors were encountered: