-
Notifications
You must be signed in to change notification settings - Fork 14
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
Unable to add/remove Secret stringData #99
Comments
It might be nice if the output from |
Hmm, interesting. Looking from the kube API side secrets are actually patchable:
The problem is that
is never stored on the API as such. What gets stored is only the binary (base64 encoded) |
As a workaround I think you should be able to get this to work if you first fire with
and then later on fire again with
|
Confirmed to work as expected:
Add another secret key:
|
Thanks, I can definitely work with encoding the secrets before having them consumed by mortar and using |
That would mean that Mortar, actually the underlying k8s-client gem, would need to understand the specifics of given resource kind. I.e. have typed resources. Currently much of the power, generic mortar shots (a.k.a. k8s-client stacks), easy way to work with CRDs etc. are possible as the resources are not typed at all on the client side. Unless we find a nice way to be able to work with either typed or untyped resources. Having typed resources on the client side just makes the maintenance bit painfull as kube api evolves super fast :) |
This may just be a longer way of asking for #92.
Using mortar 0.3.3, starting with a simple deployment with a
Secret
:mortar fire . patchtest
works. Now add another entry to thestringData
map:Removing a secret that does exist fails similarly:
The workaround is to do something like
mortar fire --output . patchtest | kubectl apply -f -
, which I think will work fine when no new objects have been added... if there are new ones, they won't get the annotations for the shot, though. To ensure the annotations are in place, runmortar fire . patchtest
immediately afterward.The text was updated successfully, but these errors were encountered: