https://pulumi.com logo
#kubernetes
Title
# kubernetes
s

sticky-translator-17495

11/13/2020, 8:16 AM
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

gorgeous-egg-16927

11/13/2020, 6:18 PM
Not that I’m aware of. It will depend on the resource, but we update in place (patch) wherever possible.
1
s

sticky-translator-17495

11/13/2020, 11:06 PM
Thanks, ended up going the trial & error path and added permissions until everything worked.
r

rich-lamp-32782

02/05/2021, 3:28 AM
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

gorgeous-egg-16927

02/05/2021, 5:56 PM
Can you give me some more details on what you’re trying to accomplish?
r

rich-lamp-32782

02/05/2021, 6:03 PM
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

gorgeous-egg-16927

02/05/2021, 6:11 PM
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

rich-lamp-32782

02/05/2021, 6:13 PM
Awesome, no problem! So I take it what we’re doing is about the only way around for now?
g

gorgeous-egg-16927

02/05/2021, 6:14 PM
I’m pretty sure there’s a delete-before-replace resource option that might also work, but I haven’t tested it
r

rich-lamp-32782

02/05/2021, 6:14 PM
ah, that’s a good point, I’ll explore that as well
g

gorgeous-egg-16927

02/05/2021, 6:15 PM
The big caveat there is that deleting a CRD will also delete any CRs that use that definition
r

rich-lamp-32782

02/05/2021, 6:17 PM
Sure, seems unavoidable in this case either way
g

gorgeous-egg-16927

02/05/2021, 6:25 PM
r

rich-lamp-32782

02/05/2021, 6:32 PM
Thanks!
4 Views