This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support referencing an existing eks cluster
- Loading branch information
Showing
14 changed files
with
166 additions
and
85 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
target/ | ||
target/ | ||
values.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
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,15 @@ | ||
#!/bin/sh | ||
if [ -z "$1" ]; then | ||
echo "Usage: $0 <cluster-name>" | ||
exit 1 | ||
fi | ||
|
||
export cluster_name=$1 | ||
export cluster_endpoint=$(aws eks describe-cluster --name $cluster_name --query "cluster.endpoint") | ||
export cluster_certificate=$(aws eks describe-cluster --name $cluster_name --query "cluster.certificateAuthority.data") | ||
|
||
cat << EOF | ||
eks.cluster_name: $cluster_name | ||
eks.endpoint: $cluster_endpoint | ||
eks.certificate: $cluster_certificate | ||
EOF |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,10 +1,10 @@ | ||
{ | ||
"name": "wing-containers", | ||
"version": "1.0.0", | ||
"description": "", | ||
"description": "A containers library for Wing", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "wing test test/containers.test.w" | ||
"build": "wing test test/*.test.w" | ||
}, | ||
"author": { | ||
"email": "[email protected]", | ||
|
@@ -17,6 +17,6 @@ | |
"@cdktf/provider-kubernetes": "^9.0.0", | ||
"cdk8s-plus-27": "^2.7.33", | ||
"cdktf": "^0.18.2", | ||
"winglang": "^0.36.1" | ||
"winglang": "^0.37.1" | ||
} | ||
} |
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 @@ | ||
const child_process = require("child_process"); | ||
|
||
exports.shell = async function (command, args, cwd) { | ||
return new Promise((resolve, reject) => { | ||
child_process.execFile(command, args, { cwd }, (error, stdout, stderr) => { | ||
if (error) { | ||
console.error(stderr); | ||
return reject(error); | ||
} | ||
|
||
return resolve(stdout ? stdout : stderr); | ||
}); | ||
}); | ||
}; | ||
|
||
exports.entrypointDir = function (scope) { | ||
return scope.node.root.entrypointDir; | ||
}; |
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
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,9 @@ | ||
bring "../containers.w" as containers; | ||
|
||
new containers.Workload( | ||
image: "hashicorp/http-echo", | ||
port: 5678, | ||
public: true, | ||
replicas: 2, | ||
args: ["-text=bang_bang"], | ||
); |
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,2 +1,6 @@ | ||
bring "../tf-aws/values.w" as values; | ||
values.get("foo"); | ||
bring util; | ||
|
||
if let x = values.tryGet("foo") { | ||
log(x); | ||
} |
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
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
Oops, something went wrong.