Skip to content

Commit

Permalink
Always create the Stack CRD given the version
Browse files Browse the repository at this point in the history
Instead of asserting that the Stack CRD is present, download and apply
it unconditionally. Once you've run the stack, you can apply a
development version of the CRD over the top of it, if you wish.

Signed-off-by: Michael Bridgen <[email protected]>
  • Loading branch information
squaremo committed Oct 14, 2022
1 parent 101bfcf commit f512b25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/flux-source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const config = new pulumi.Config();
const deployNamespace = config.get("namespace") || 'default';
const deployNamespaceList = config.getObject<string[]>("namespaces") || [deployNamespace];
const operatorVersion = config.get("operator-version") || "v1.9.0";
const crdVersion = config.get("crd-version") || "v1.9.0";

// -- Flux installation

Expand All @@ -21,7 +22,9 @@ const fluxGroup = fluxManifests.content.apply(c => new ConfigGroup("flux-install

// --- Pulumi operator

const crd = kubernetes.apiextensions.v1.CustomResourceDefinition.get('stacks-crd', 'stacks.pulumi.com');
const crd = new kubernetes.yaml.ConfigFile('stack-crd', {
file: `https://raw.githubusercontent.com/pulumi/pulumi-kubernetes-operator/${crdVersion}/deploy/crds/pulumi.com_stacks.yaml`,
});
const deploymentOptions = { dependsOn: crd };

for (let ns of deployNamespaceList) {
Expand Down

0 comments on commit f512b25

Please sign in to comment.