Is there any documentation available on what "verb...
# kubernetes
s
Is there any documentation available on what "verbs" (get, apply, patch, create etc) pulumi is using, and for what action, when applying changes to the cluster?
g
Not that I’m aware of. It will depend on the resource, but we update in place (patch) wherever possible.
1
s
Thanks, ended up going the trial & error path and added permissions until everything worked.
r
sorry to resurrect an old thread @gorgeous-egg-16927, but I’m having an issue where I would like to overwrite with apply rather than patch. Is there anyway to override the default behavior?
g
Can you give me some more details on what you’re trying to accomplish?
r
Sure! We are managing an install of Calico enterprise with Pulumi, and their documentation suggests to
kubectl apply
new YAML configs every version. They install many CRDs, and each version there is a CRD or two that is not compatible with
kubectl patch
, leading us to have to do things like comment out the CRDs, run
pulumi up
, then un comment and run
pulumi up
again from local CLI in each of our environments, rather than release through a pipeline.
I understand that perhaps they should support
kubectl patch
better, but until that happens we are stuck with this type of procedure (or moving management outside of pulumi, which we would not prefer)
It would be nice to be able to set a flag in the provider or somewhere to be able to override the patch behavior with
apply
g
That’s good feedback, thanks. I’m planning to work on improving the CRD experience this quarter already, so I’ll add that to the list of things to think about.
r
Awesome, no problem! So I take it what we’re doing is about the only way around for now?
g
I’m pretty sure there’s a delete-before-replace resource option that might also work, but I haven’t tested it
r
ah, that’s a good point, I’ll explore that as well
g
The big caveat there is that deleting a CRD will also delete any CRs that use that definition
r
Sure, seems unavoidable in this case either way
g
r
Thanks!