-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcertManager.ts
54 lines (48 loc) · 1.42 KB
/
certManager.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import * as pulumi from "@pulumi/pulumi";
import * as k8s from "@pulumi/kubernetes";
import { provider } from ".";
export type CertManagerOptions = {
replicas?: pulumi.Input<number>;
namespaceName: pulumi.Input<string>;
helmChartVersion: pulumi.Input<string>;
provider: k8s.Provider;
iamRoleArn?: pulumi.Input<string>;
hostAliases?: k8s.types.input.core.v1.HostAlias[];
};
const pulumiComponentNamespace: string = "turingev:CertManager";
export class CertManager extends pulumi.ComponentResource {
public readonly chart: k8s.helm.v3.Release;
public readonly namespace: k8s.core.v1.Namespace;
constructor(
name: string,
args: CertManagerOptions,
opts?: pulumi.ComponentResourceOptions,
) {
super(pulumiComponentNamespace, name, args, opts);
this.namespace = new k8s.core.v1.Namespace(
"cert-manager",
{
metadata: { name: "cert-manager" },
},
{ provider: provider, parent: this },
);
this.chart = new k8s.helm.v3.Release(
name,
{
namespace: args.namespaceName,
chart: "cert-manager",
version: args.helmChartVersion || "v1.0.3",
repositoryOpts: {
repo: "https://charts.jetstack.io",
},
values: {
installCRDs: true,
livenessProbe: {
enabled: true,
},
},
},
{ provider: args.provider, dependsOn: this.namespace, parent: this },
);
}
}