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

colossal-battery-24701

07/03/2021, 6:35 AM
I am trying to install kube-prometheus-stack via its helm chart. It creates a couple of crds and I want to create some resources using those crds as well. What’s happening is, the creation of these resources using those crds fails (error - resource of type doesn’t exist) because it somehow executes before the kube-prometheus-stack has finished installing. The kube-prometheus-stack creation and the resources are all in different files. I tried adding
dependsOn
to the custom resources but that does not help. Is there any example where I see dependent k8s resources being created from different files. Also, I am using typescript. Any help is highly appreciated.
b

brave-planet-10645

07/03/2021, 9:51 AM
There's a
.ready
property you can use in the
dependsOn
property. There's an example here https://github.com/pulumi/pulumi-kubernetes/blob/v3.4.0/tests/sdk/nodejs/examples/helm-local/step1/index.ts#L47
c

colossal-battery-24701

07/03/2021, 10:35 AM
That did it. Thanks a ton @brave-planet-10645
6 Views