With a certmanager installation, we need to instal...
# general
i
With a certmanager installation, we need to install the custom CRDs before running the helm chart. Is there a pulumi-way of doing things here?
Copy code
## IMPORTANT: you MUST install the cert-manager CRDs **before** installing the
## cert-manager Helm chart
$ kubectl apply \
    -f <https://raw.githubusercontent.com/jetstack/cert-manager/release-0.6/deploy/manifests/00-crds.yaml>
https://github.com/helm/charts/tree/master/stable/cert-manager#installing-the-chart
b
There's a CustomResource type in pulumi
i
https://pulumi.io/reference/pkg/nodejs/@pulumi/kubernetes/yaml/ indicates there is a yaml module available but it is not exposed in the index
@better-rainbow-14549 I am using the custom resource for the Issuer/ClusterIssuer, but was looking for something to run the raw yaml file
b
I just ported it to json tbh
i
to json then wrapped in CustomResource? Each one?
i
great, thank you I’ll look through that
b
i literally pasted the yaml sections into a yaml to json converter
then tidied it up a bit
👍 1
c
If you want to run custom yaml:
Copy code
import * as k8s as "@pulumi/kubernetes";
new k8s.yaml.ConfigFile("app.yaml");
👍 1
b
oh i didnt know about that, nice
i
looks like you could use that then pull out resources by name to use in
dependsOn
for the chart
b
it returns a resource so you should be able to pass the return of the ConfigFile call straight into dependson
i
configFile.resources
?
b
just the whole thing i believe? i havent tried it just looked at the types
i
looking at the code now
b
yea works here
Copy code
const  crds = new kubernetes.yaml.ConfigFile("test.yaml");
{ provider: clusterProvider, dependsOn: [crds] }
i
yes
ConfigFile extends CollectionComponentResource
fetch is also in the code, so looks like the raw url may work, will try
Just to close the loop, this worked fine and I used it as a `dependsOn`:
Copy code
// install the crds first
    // @see <https://github.com/helm/charts/tree/master/stable/cert-manager#installing-the-chart>
    const crds = new k8s.yaml.ConfigFile(
      '<https://raw.githubusercontent.com/jetstack/cert-manager/release-0.6/deploy/manifests/00-crds.yaml>',
      undefined,
      opts,
    )
c
this might actually be the best way to do this.