-
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.
feat(cdk8s): retrieve eks cluster information
- Loading branch information
1 parent
c469211
commit a28ec4d
Showing
11 changed files
with
2,042 additions
and
352 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/ | ||
dist/ | ||
build/ |
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 |
---|---|---|
@@ -1,13 +1,18 @@ | ||
import { App } from 'cdk8s'; | ||
|
||
import { ArgoSemaphore } from './charts/argo.semaphores'; | ||
import { ArgoSemaphore } from './charts/argo.semaphores.js'; | ||
|
||
const app = new App(); | ||
|
||
async function main(): Promise<void> { | ||
new ArgoSemaphore(app, 'semaphore', {}); | ||
|
||
app.synth(); | ||
//const clusterStackName = 'EksWorkflowProd'; | ||
//const clusterStack = await getStackFromName(clusterStackName); | ||
|
||
//console.log(clusterStack.RoleARN); | ||
|
||
//app.synth(); | ||
} | ||
|
||
main(); |
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
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,17 @@ | ||
import { CloudFormation } from '@aws-sdk/client-cloudformation'; | ||
|
||
export async function getStackFromName(stackName: string): Promise<void> { | ||
const cfn = new CloudFormation(); | ||
const clusterStack = await cfn.describeStacks({ StackName: stackName }); | ||
if (clusterStack.Stacks) { | ||
console.log(clusterStack.Stacks[0]); | ||
} | ||
} | ||
|
||
// TODO: remove tests | ||
async function main(): Promise<void> { | ||
const clusterStackName = 'EksWorkflowProd'; | ||
await getStackFromName(clusterStackName); | ||
} | ||
|
||
main(); |
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,17 @@ | ||
import { EKS } from '@aws-sdk/client-eks'; | ||
|
||
export async function getClusterFromName(clusterName: string): Promise<void> { | ||
const eks = new EKS(); | ||
const eksCluster = await eks.describeCluster({ name: clusterName }); | ||
if (eksCluster.cluster) { | ||
console.log(eksCluster.cluster); | ||
} | ||
} | ||
|
||
// TODO: remove tests | ||
async function main(): Promise<void> { | ||
const eksClusterName = 'Workflow'; | ||
await getClusterFromName(eksClusterName); | ||
} | ||
|
||
main(); |
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.