Is there a way to do a kubectl rollout restart?
# general
e
Is there a way to do a kubectl rollout restart?
I guess this goes all the way back to this issue: https://github.com/pulumi/pulumi-kubernetes/issues/383 which was never resolved.
This is a huge pain in the butt with microstacks...but I am not sure its Pulumi's fault. But it would be super cool if Pulumi Kubernetes would let me execute kubectl commands off the provider...
t
💯
c
We occasionally think about this. The problem is that it exist pretty far outside of our declarative model.
e
Yeah I don't disagree with that, but from a perspective of using Pulumi it's a pretty significant gap in the pipeline.
g
You could always shell out to
kubectl
from your pulumi program. https://github.com/pulumi/pulumi-kubernetes/blob/0a18b87fd1b4fa5778542dbb0e82a08a2e91ab88/sdk/nodejs/helm/v2/helm.ts#L388-L413 is an example of us doing that for
helm
e
whut
very interesting....
c
I was curious about this as well, but thinking about it, why would pulumi perform the restart? How would you code pulumi to execute the restart, and only that specific time, not a secondary time? The thing I hate about the restart feature is that it does so by adding an annotation. This was a hack from kubernetes IMO.
t
just ran into this interesting example (it executes az cli): https://github.com/pulumi/examples/blob/master/azure-ts-static-website/staticWebsite.ts should be able to use kubectl the same way