Skip to content

Commit

Permalink
Adding in fix, for repository to take output, fixes #133
Browse files Browse the repository at this point in the history
  • Loading branch information
rshade committed Dec 23, 2024
1 parent 81b91e6 commit 2b62770
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 44 deletions.
79 changes: 43 additions & 36 deletions examples/simple-cert-manager-ts/index.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,45 @@
import * as k8s from "@pulumi/kubernetes";
import * as certmanager from "@pulumi/kubernetes-cert-manager";
import * as random from "@pulumi/random";

const randomString = new random.RandomString("random", {
length: 16,
special: true,
overrideSpecial: "/@£$",
})

// Create a sandbox namespace.
const ns = new k8s.core.v1.Namespace("sandbox-ns");

// Install a cert manager into our cluster.
const manager = new certmanager.CertManager("cert-manager", {
installCRDs: true,
helmOptions: {
namespace: ns.metadata.name,
version: "v1.15.3",
installCRDs: true,
helmOptions: {
namespace: ns.metadata.name,
version: "v1.15.3",
},
image: {
repository: randomString.result.apply(result => "public.ecr.aws/eks-anywhere-dev/cert-manager/cert-manager-controller"),
tag: "v1.15.3-eks-a-v0.21.3-dev-build.0"
},
cainjector: {
"image": {
repository: "public.ecr.aws/eks-anywhere-dev/cert-manager/cert-manager-cainjector",
tag: "v1.15.3-eks-a-v0.21.3-dev-build.0",
},
},
startupapicheck: {
"image": {
repository: "public.ecr.aws/eks-anywhere-dev/cert-manager/cert-manager-startupapicheck",
tag: "v1.15.3-eks-a-v0.21.3-dev-build.0",
}
},
webhook: {
image: {
repository: "public.ecr.aws/eks-anywhere-dev/cert-manager/cert-manager-controller",
tag: "v1.15.3-eks-a-v0.21.3-dev-build.0"
},
cainjector: {
"image": {
repository: "public.ecr.aws/eks-anywhere-dev/cert-manager/cert-manager-cainjector",
tag: "v1.15.3-eks-a-v0.21.3-dev-build.0",
},
},
startupapicheck: {
"image": {
repository: "public.ecr.aws/eks-anywhere-dev/cert-manager/cert-manager-startupapicheck",
tag: "v1.15.3-eks-a-v0.21.3-dev-build.0",
}
},
webhook: {
image: {
repository: "public.ecr.aws/eks-anywhere-dev/cert-manager/cert-manager-webhook",
tag: "v1.15.3-eks-a-v0.21.3-dev-build.0"
}
repository: "public.ecr.aws/eks-anywhere-dev/cert-manager/cert-manager-webhook",
tag: "v1.15.3-eks-a-v0.21.3-dev-build.0"
}
}
});

// Create a cluster issuer that uses self-signed certificates.
Expand All @@ -41,19 +48,19 @@ const manager = new certmanager.CertManager("cert-manager", {
// https://cert-manager.io/docs/configuration/selfsigned/
// for additional details on other signing providers.
const issuer = new k8s.apiextensions.CustomResource(
"issuer",
{
apiVersion: "cert-manager.io/v1",
kind: "Issuer",
metadata: {
name: "selfsigned-issuer",
namespace: ns.metadata.name,
},
spec: {
selfSigned: {},
},
"issuer",
{
apiVersion: "cert-manager.io/v1",
kind: "Issuer",
metadata: {
name: "selfsigned-issuer",
namespace: ns.metadata.name,
},
spec: {
selfSigned: {},
},
{ dependsOn: manager }
},
{ dependsOn: manager }
);

export const certManagerStatus = manager.status;
8 changes: 5 additions & 3 deletions examples/simple-cert-manager-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"@types/node": "^10.0.0"
},
"dependencies": {
"@pulumi/kubernetes": "4.19.0",
"@pulumi/pulumi": "3.143.0",
"@pulumi/kubernetes-cert-manager": "latest"
"@pulumi/kubernetes": "^4.19.0",
"@pulumi/kubernetes-cert-manager": "latest",
"@pulumi/pulumi": "^3.142.0",
"@pulumi/random": "^4.16.8",
"google-protobuf": "3.21.4"
}
}
10 changes: 5 additions & 5 deletions provider/pkg/provider/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,16 @@ type CertManagerGlobalLeaderElection struct {

type CertManagerImage struct {
// You can manage a registry with `registry: quay.io`.
Registry *string `pulumi:"registry"`
Registry pulumi.StringPtrInput `pulumi:"registry"`
// You can manage a registry with `repository: jetstack/cert-manager-controller`.
Repository *string `pulumi:"repository"`
Repository pulumi.StringPtrInput `pulumi:"repository"`
// Override the image tag to deploy by setting this variable.
// If no value is set, the chart's appVersion will be used.
Tag *string `pulumi:"tag"`
Tag pulumi.StringPtrInput `pulumi:"tag"`
// Setting a digest will override any tag, e.g.
// `digest: sha256:0e072dddd1f7f8fc8909a2ca6f65e76c5f0d2fcfb8be47935ae3457e8bbceb20`.
Digest *string `pulumi:"digest"`
PullPolicy *string `pulumi:"pullPolicy"`
Digest pulumi.StringPtrInput `pulumi:"digest"`
PullPolicy pulumi.StringPtrInput `pulumi:"pullPolicy"`
}

type CertManagerServiceAccount struct {
Expand Down

0 comments on commit 2b62770

Please sign in to comment.