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

limited-rain-96205

10/13/2021, 6:38 PM
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

brave-ambulance-98491

10/13/2021, 6:41 PM
I think the standard way to do this is with a
dependsOn
in the resource options. Can you just do that?
w

worried-city-86458

10/13/2021, 8:00 PM
I don't think you can wait on crds being "ready", but would love to find out otherwise...
s

sparse-park-68967

10/14/2021, 3:14 AM
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

limited-rain-96205

10/19/2021, 10:56 PM
@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

sparse-park-68967

10/19/2021, 10:58 PM
For the case where the crd is deployed through pulumi (through configfile/CustomResourceDefinition?) you should also be able to use
dependsOn
w

worried-city-86458

10/20/2021, 12:32 AM
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
4 Views