-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding in example for GKE-Autopilot, closes #19
- Loading branch information
Showing
7 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/bin/ | ||
/node_modules/ | ||
Pulumi.*.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: gke-auto-pilot-cert-manager | ||
runtime: nodejs | ||
description: A CertManager installation for GKE AutoPilot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import * as k8s from "@pulumi/kubernetes"; | ||
import * as certmanager from "@pulumi/kubernetes-cert-manager"; | ||
|
||
// Create a sandbox namespace. | ||
const ns = new k8s.core.v1.Namespace("gke-ap-cert-mgr"); | ||
|
||
// 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" | ||
}, | ||
global: { | ||
leaderElection: { | ||
namespace: ns.metadata.name, | ||
} | ||
}, | ||
prometheus: { | ||
enabled: false, | ||
} | ||
}); | ||
|
||
// Create a cluster issuer that uses self-signed certificates. | ||
// This is not very secure, but has the least amount of external | ||
// dependencies, so is simple. Please refer to | ||
// 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: {}, | ||
}, | ||
}, | ||
{ dependsOn: manager } | ||
); | ||
|
||
export const certManagerStatus = manager.status; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "gke-auto-pilot", | ||
"devDependencies": { | ||
"@types/node": "^10.0.0" | ||
}, | ||
"dependencies": { | ||
"@pulumi/kubernetes": "4.19.0", | ||
"@pulumi/pulumi": "3.143.0", | ||
"@pulumi/kubernetes-cert-manager": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"outDir": "bin", | ||
"target": "es2016", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"experimentalDecorators": true, | ||
"pretty": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitReturns": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"files": [ | ||
"index.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pulumi>=3.0.0,<4.0.0 | ||
pulumi-kubernetes>=3.0.0,<5.0.0 | ||
pulumi-kubernetes>=4.0.0,<5.0.0 | ||
pulumi-kubernetes-cert-manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters