-
Notifications
You must be signed in to change notification settings - Fork 110
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
Kapp should allow easily retrieving latest version of versioned Secret #119
Comments
Alternatively, kapp could create the secret also under it's original name. |
yeah i could see that being added. this might also help supporting cases where other resource use labels to select on versioned resources. since versioned resources could be other resources aside from Secret/ConfigMap, label referencing would be more common.
i dont recall context but we wanted to add this feature before to support this type of "hybrid" approach. ^ @jkbschmid does this alt option work for you? (easier to implement) |
@cppforlife Thanks for the reply.
Also works for me 👍. |
We also have a use case that current 'ver-1' suffix doesn't work. We added versioned annotation for both the following configmap/secret, but the secret-name = "cloud-provider-vsphere-credentials" in the configmap still refer to the original secret name, not with the ver-1 suffix, so hit not found error. It would be great if kapp could create the secret/configmap under its original name (in addition to the new ver-N name), or even automatically detect the secret/configmap change and rollout the related Deployment/DS/STS without the need of versioned annotation.
|
Could we prioritize this bug? It's causing issues in our product. |
@jessehu Thank you for providing your use case. We're going to explore this a bit further to see when we could fit this into our backlog. I'm hoping we get some clarity on this within the next day or so. |
if we add a new annotation: versioned-keep-original, following are the test paths. this is not an exhaustive list. however, feel free to add more if missing some critical ones. <style> </style>
|
Is it possitble we just remove the ver-{N} suffix by using versioned-keep-original annotation? |
@chenliu1993 ,this new annotation will be used in conjunction with "versioned" annotation. That is, it will keep the original resource, as well as create a resource with version suffix. |
Thanks for the information, @renuy. So my understanding is both 'only-versioned-annotation' and 'both-versioned-with-versioned-keep-original-annotations' are going to change the resource name? Even keep-original is used, the name is also kept to adding suffix ver-1. Is my understanding from scenario 1 right? |
if only "versioned" annotation is used, it will add the version suffix (ver-x) to the name. |
Thanks @renuy, I am just trying to understand the usage of versioned-keep-original.
|
available in release v0.38.0 |
Example:
Now to make kapp create Secret under the same name in addition to ver-N name (cloud-provider-vsphere-credentials-ver-1 for this example) user is supposed to add a new annotation
|
|
When creating a Secret that has the
kapp.k14s.io/versioned
annotation, the a suffix is added to the name of the Secret. This makes it hard for non-kapp applications to retrieve this secret (its latest version).Proposal:
Add labels that make it easy to retrieve a versioned secret with kubectl, e.g.
original-name
andlatest
, sokubectl get secret -l original-name=<name-without-suffix> -l latest=true
works.The text was updated successfully, but these errors were encountered: