-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add test to ensure CNI is updated on cluster
- Loading branch information
Showing
5 changed files
with
113 additions
and
0 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 @@ | ||
name: ensure-cni-upgrade | ||
description: EKS cluster example to ensure CNI is upgraded when the base manifest changes | ||
runtime: nodejs |
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 @@ | ||
import * as pulumi from "@pulumi/pulumi"; | ||
import * as awsx from "@pulumi/awsx"; | ||
import * as eks from "@pulumi/eks"; | ||
|
||
const projectName = pulumi.getProject(); | ||
|
||
// Create an EKS cluster with the default configuration. | ||
const cluster = new eks.Cluster(`${projectName}-1`); | ||
|
||
// Create a VPC CNI resource for the cluster. | ||
// We have to use a strigified version of the kubeconfig because earlier versions | ||
// of the EKS provider did not parse the kubeconfig correctly. | ||
// https://github.com/pulumi/pulumi-eks/issues/1092 | ||
const vpcCni = new eks.VpcCni(`${projectName}-1-cni`, cluster.kubeconfigJson); | ||
|
||
|
||
// Export the clusters' kubeconfig. | ||
export const kubeconfig = cluster.kubeconfigJson; |
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,12 @@ | ||
{ | ||
"name": "ensure-cni-upgrade", | ||
"devDependencies": { | ||
"typescript": "^4.0.0", | ||
"@types/node": "latest" | ||
}, | ||
"dependencies": { | ||
"@pulumi/pulumi": "^3.0.0", | ||
"@pulumi/awsx": "^2.0.2", | ||
"@pulumi/eks": "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,24 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "bin", | ||
"target": "es6", | ||
"lib": [ | ||
"es6" | ||
], | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"declaration": true, | ||
"sourceMap": true, | ||
"stripInternal": true, | ||
"experimentalDecorators": true, | ||
"pretty": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strictNullChecks": 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