Hello Folks, could I possibly add post-deployment ...
# general
h
Hello Folks, could I possibly add post-deployment code to update database after a stack is successfully deployed? Thanks!
l
Yes, there are RDBS providers that allow this, though you'll have to use a separate project, possibly orchestrating using automation-api.
h
Thanks Tenwit. I am using Pulumi-kubernetes to manage k8s resources. I’ll need to update database only after a resource (say a configmap) has been provisioned successfully. Is there a hook or notification to indicate success or failure in Pulumi?
l
No. You can deploy a lambda to do this (which would be the best option if the provisioning might take a long time), or you can split into two Pulumi projects. If you do that, you might consider using automation-api, and make both projects inline, so it's only one file to edit.
Or quite possibly there's a thing you can deploy into your k8s cluster to do this.. no idea, I have minimal k8s knowledge, all theoretical.
a
It may be possible to invert the idea and have the database or sidecar watch for config map constantly. The negative is there is no feedback to your CD tool pulumi possibly. See Prometheus and grafana side cars in kube-prometheus stack for examples.
A kubernetes run job may also suffice. I'm not sure how pulumi works with them but other CD tools reconcile.
l
I would say an init container or a helm hook would be better with this