In the situation where you’re deploying an Operato...
# kubernetes
l
In the situation where you’re deploying an Operator which adds CRDs to the cluster, and then have Pulumi deploy resources from those CRDs, is there a way to have Pulumi wait until the CRDs are present before creating those resources?
b
I think the standard way to do this is with a
dependsOn
in the resource options. Can you just do that?
w
I don't think you can wait on crds being "ready", but would love to find out otherwise...
s
If the operator is deployed through helm you could use a Helm Release to deploy it and then make the dependent resources depend on the helm release (
dependsOn
). By default Helm Release will block on the underlying resources being available. If that is not the case then unfortunately the best you would have to do is build a polling loop within an apply block hanging off the operator deploy which does lookups on the CRD and then installs the dependent resources. We have some plans to improve the
get
experience here: https://github.com/pulumi/pulumi-kubernetes/issues/1656
l
@sparse-park-68967 We have several Operators which are not deployed by Helm, only by Pulumi alone. But I think your second option might work.
s
For the case where the crd is deployed through pulumi (through configfile/CustomResourceDefinition?) you should also be able to use
dependsOn
w
I've been doing that but it doesn't seem to be effective - it still works though as the crd eventually exists combined with dependee retries