From 88ec6b0b87d15325db771b45e0e1f0810aebf038 Mon Sep 17 00:00:00 2001 From: orrlevinger Date: Mon, 5 Jun 2023 11:49:57 +0300 Subject: [PATCH 1/5] cluster name should be an environment variable --- misc/helm/dummy/env0.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/helm/dummy/env0.yml b/misc/helm/dummy/env0.yml index 975efd0f..7c41fe47 100644 --- a/misc/helm/dummy/env0.yml +++ b/misc/helm/dummy/env0.yml @@ -4,7 +4,7 @@ deploy: steps: setupVariables: after: - - awsv2 eks --region=us-east-1 update-kubeconfig --name kushield + - awsv2 eks --region=us-east-1 update-kubeconfig --name ${ENV0_CLUSTER_NAME} - "sed -i 's/command: aws/command: awsv2/g' ~/.kube/config" - cat /home/node/.kube/config @@ -12,6 +12,6 @@ destroy: steps: setupVariables: after: - - awsv2 eks --region=us-east-1 update-kubeconfig --name kushield + - awsv2 eks --region=us-east-1 update-kubeconfig --name ${ENV0_CLUSTER_NAME} - "sed -i 's/command: aws/command: awsv2/g' ~/.kube/config" - cat /home/node/.kube/config From da3fb37909a0d1d488b9b2e82a0d51cf887e9aec Mon Sep 17 00:00:00 2001 From: orrlevinger Date: Mon, 5 Jun 2023 12:33:54 +0300 Subject: [PATCH 2/5] cluster name should be an environment variable --- misc/helm/dummy/env0.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/helm/dummy/env0.yml b/misc/helm/dummy/env0.yml index 7c41fe47..8ad96e29 100644 --- a/misc/helm/dummy/env0.yml +++ b/misc/helm/dummy/env0.yml @@ -4,6 +4,7 @@ deploy: steps: setupVariables: after: + - aws eks list-clusters --region us-east-1 - awsv2 eks --region=us-east-1 update-kubeconfig --name ${ENV0_CLUSTER_NAME} - "sed -i 's/command: aws/command: awsv2/g' ~/.kube/config" - cat /home/node/.kube/config From 6aba48f4fccb0397514f4ff8f50a100b6f9a4c0e Mon Sep 17 00:00:00 2001 From: orrlevinger Date: Mon, 5 Jun 2023 12:39:32 +0300 Subject: [PATCH 3/5] cluster name should be an environment variable --- misc/helm/dummy/env0.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/helm/dummy/env0.yml b/misc/helm/dummy/env0.yml index 8ad96e29..c6c92506 100644 --- a/misc/helm/dummy/env0.yml +++ b/misc/helm/dummy/env0.yml @@ -4,8 +4,8 @@ deploy: steps: setupVariables: after: - - aws eks list-clusters --region us-east-1 - - awsv2 eks --region=us-east-1 update-kubeconfig --name ${ENV0_CLUSTER_NAME} + - aws eks list-clusters --region us-east-2 + - awsv2 eks --region=us-east-2 update-kubeconfig --name ${ENV0_CLUSTER_NAME} - "sed -i 's/command: aws/command: awsv2/g' ~/.kube/config" - cat /home/node/.kube/config @@ -13,6 +13,6 @@ destroy: steps: setupVariables: after: - - awsv2 eks --region=us-east-1 update-kubeconfig --name ${ENV0_CLUSTER_NAME} + - awsv2 eks --region=us-east-2 update-kubeconfig --name ${ENV0_CLUSTER_NAME} - "sed -i 's/command: aws/command: awsv2/g' ~/.kube/config" - cat /home/node/.kube/config From 6dd55d9e784fa7aca88df68db1ad63cf31ac6f76 Mon Sep 17 00:00:00 2001 From: orrlevinger Date: Mon, 5 Jun 2023 12:41:17 +0300 Subject: [PATCH 4/5] cluster name should be an environment variable --- misc/helm/dummy/env0.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/helm/dummy/env0.yml b/misc/helm/dummy/env0.yml index c6c92506..a5343b29 100644 --- a/misc/helm/dummy/env0.yml +++ b/misc/helm/dummy/env0.yml @@ -5,7 +5,7 @@ deploy: setupVariables: after: - aws eks list-clusters --region us-east-2 - - awsv2 eks --region=us-east-2 update-kubeconfig --name ${ENV0_CLUSTER_NAME} + - awsv2 eks --region=us-west-2 update-kubeconfig --name ${ENV0_CLUSTER_NAME} - "sed -i 's/command: aws/command: awsv2/g' ~/.kube/config" - cat /home/node/.kube/config @@ -13,6 +13,6 @@ destroy: steps: setupVariables: after: - - awsv2 eks --region=us-east-2 update-kubeconfig --name ${ENV0_CLUSTER_NAME} + - awsv2 eks --region=us-west-2 update-kubeconfig --name ${ENV0_CLUSTER_NAME} - "sed -i 's/command: aws/command: awsv2/g' ~/.kube/config" - cat /home/node/.kube/config From 58e823bc9c4291f2035ef258dedfcd54afb7c3bf Mon Sep 17 00:00:00 2001 From: orrlevinger Date: Mon, 5 Jun 2023 13:06:10 +0300 Subject: [PATCH 5/5] cluster name should be an environment variable --- misc/helm/dummy/env0.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/helm/dummy/env0.yml b/misc/helm/dummy/env0.yml index a5343b29..cfcf6274 100644 --- a/misc/helm/dummy/env0.yml +++ b/misc/helm/dummy/env0.yml @@ -4,8 +4,7 @@ deploy: steps: setupVariables: after: - - aws eks list-clusters --region us-east-2 - - awsv2 eks --region=us-west-2 update-kubeconfig --name ${ENV0_CLUSTER_NAME} + - awsv2 eks --region=${ENV0_CLUSTER_REGION:-us-east-1} update-kubeconfig --name ${ENV0_CLUSTER_NAME:-kushield} - "sed -i 's/command: aws/command: awsv2/g' ~/.kube/config" - cat /home/node/.kube/config @@ -13,6 +12,6 @@ destroy: steps: setupVariables: after: - - awsv2 eks --region=us-west-2 update-kubeconfig --name ${ENV0_CLUSTER_NAME} + - awsv2 eks --region=${ENV0_CLUSTER_REGION:-us-east-1} update-kubeconfig --name ${ENV0_CLUSTER_NAME:-kushield} - "sed -i 's/command: aws/command: awsv2/g' ~/.kube/config" - cat /home/node/.kube/config