Hey, i'm trying to replicate some behavior of Skaf...
# general
g
Hey, i'm trying to replicate some behavior of Skaffold using pulumi. I'm trying to deploy a few k8s deployments/services and then port forward them to the local machine using
kubectl port-forward
- except i'm trying to do all of this within pulumi so that a dev can just do a
pulumi up
and everything runs in their local minikube with automatic port forwarding. I don't suppose this is a supported use-case and i've just been hacking around trying to block pulumi up from exiting so that I can spawn the port-forward commands from nodejs. Has anyone else tried something like this? I guess i need a feature like a "post deployment callback" or a way to run before/after code and potenticall re-run pulumi (i.e. a watch mode). Should i just write a wrapper for pulumi?
c
@ambitious-rocket-23091 ha! So! We actually kind of do something like this in an example. 🙂 You should proceed with caution here, but you can see the bones of what to do here: https://github.com/pulumi/examples/blob/master/kubernetes-ts-staged-rollout-with-prometheus/index.ts#L38
oops tagged the wrong james cc @great-byte-67992
g
yeah i was using that as an example. i actually also want to be able to watch for file changes and re-run pulumi up so for now i’ve written a wrapping script that shells out to pulumi. a feature along the lines of this: https://github.com/pulumi/pulumi/issues/2506 could be great for my usecase and a whole heap of other ideas that pulumi has sparked for me 😄. Love the product, love the work. thanks. btw i’m the guy who submitted https://github.com/pulumi/pulumi/pull/2455
c
@great-byte-67992 yeah that is on my very very long list of issues that I personally want to se completed. 🙂
Some day we will do this.
oh nice I’d love to see this PR land.