From 632ec70bbdc75a2d85a7d9ca00278c39b2331824 Mon Sep 17 00:00:00 2001 From: jsitu777 <59303945+jsitu777@users.noreply.github.com> Date: Thu, 30 Mar 2023 13:00:00 -0700 Subject: [PATCH 01/10] [Cherry Pick] Enable canary report generation (#634) -enable canary report generation after each canary run. --- tests/canary/canary.buildspec.yaml | 14 ++- .../scripts/push_stats_to_cloudwatch.py | 90 +++++++++++++++++++ tests/canary/scripts/run_test.sh | 10 +-- 3 files changed, 105 insertions(+), 9 deletions(-) create mode 100644 tests/canary/scripts/push_stats_to_cloudwatch.py diff --git a/tests/canary/canary.buildspec.yaml b/tests/canary/canary.buildspec.yaml index fd119f8fc8..ebbb1a0473 100644 --- a/tests/canary/canary.buildspec.yaml +++ b/tests/canary/canary.buildspec.yaml @@ -6,7 +6,6 @@ phases: # Get cached test image - aws ecr get-login-password --region $CLUSTER_REGION | docker login --username AWS --password-stdin $ECR_CACHE_URI || true - docker pull ${ECR_CACHE_URI}:latest --quiet || true - # Build test image - > docker build -f ./tests/canary/Dockerfile.canary . -t ${ECR_CACHE_URI}:latest --quiet @@ -15,8 +14,15 @@ phases: commands: # Run tests - docker run --name kf-distro-canary $(env | cut -f1 -d= | sed 's/^/-e /') --mount type=bind,source="$(pwd)/",target="/kubeflow-manifests/" ${ECR_CACHE_URI}:latest - - # Push test image to cache ECR repo + post_build: + commands: + - docker cp kf-distro-canary:/kubeflow-manifests/tests/canary/integration_tests.xml /tmp/results.xml || true + # Push test image to cache ECR repo - docker push ${ECR_CACHE_URI}:latest || true - + +reports: + IntegrationTestReport: + files: + - "results.xml" + base-directory: "/tmp" diff --git a/tests/canary/scripts/push_stats_to_cloudwatch.py b/tests/canary/scripts/push_stats_to_cloudwatch.py new file mode 100644 index 0000000000..8130cbfe2c --- /dev/null +++ b/tests/canary/scripts/push_stats_to_cloudwatch.py @@ -0,0 +1,90 @@ +import boto3 +from datetime import datetime +import xml.etree.ElementTree as ET +import os + + +xml_path = "../canary/integration_tests.xml" + + +def readXML_and_publish_metrics_to_cw(): + if os.path.isfile(xml_path): + tree = ET.parse(xml_path) + testsuite = tree.find("testsuite") + failures = testsuite.attrib["failures"] + tests = testsuite.attrib["tests"] + successes = int(tests) - int(failures) + else: + failures = 0 + successes = 0 + tests = 1 + + timestamp = datetime.now().strftime("%Y-%m-%dT%H:%M:%S") + + print(f"Failures: {failures}") + print(f"Total tests: {tests}") + print(f"Success: {successes}") + + # push to cloudwatch + cw_client = boto3.client("cloudwatch") + project_name = "CodeBuild-Run-All-Tests" + + # Define the metric data + metric_data = [ + { + "MetricName": "failures", + "Timestamp": timestamp, + "Dimensions": [ + {"Name": "CodeBuild Project Name", "Value": project_name}, + ], + "Value": int(failures), + "Unit": "Count", + }, + { + "MetricName": "total_tests", + "Timestamp": timestamp, + "Dimensions": [ + {"Name": "CodeBuild Project Name", "Value": project_name}, + ], + "Value": int(tests), + "Unit": "Count", + }, + { + "MetricName": "successes", + "Timestamp": timestamp, + "Dimensions": [ + {"Name": "CodeBuild Project Name", "Value": project_name}, + ], + "Value": int(successes), + "Unit": "Count", + }, + ] + + # Use the put_metric_data method to push the metric data to CloudWatch + try: + response = cw_client.put_metric_data( + Namespace="Canary_Metrics", MetricData=metric_data + ) + if response["ResponseMetadata"]["HTTPStatusCode"] == 200: + print("Successfully pushed data to CloudWatch") + # return 200 status code if successful + return 200 + else: + # raise exception if the status code is not 200 + raise Exception( + "Unexpected response status code: {}".format( + response["ResponseMetadata"]["HTTPStatusCode"] + ) + ) + except Exception as e: + print("Error pushing data to CloudWatch: {}".format(e)) + # raise exception if there was an error pushing data to CloudWatch + raise + + +def main(): + readXML_and_publish_metrics_to_cw() + + +if __name__ == "__main__": + main() diff --git a/tests/canary/scripts/run_test.sh b/tests/canary/scripts/run_test.sh index 574d6774ff..b21daa43c5 100755 --- a/tests/canary/scripts/run_test.sh +++ b/tests/canary/scripts/run_test.sh @@ -9,10 +9,11 @@ # Script configuration set -euo pipefail -function onError { - echo "Run test FAILED. Exiting." +function push_to_cloudwatch { + echo "Pushing Codebuild stats to Cloudwatch." + python ../canary/scripts/push_stats_to_cloudwatch.py } -trap onError ERR +trap push_to_cloudwatch EXIT export CANARY_TEST_DIR=${REPO_PATH}/tests/canary export E2E_TEST_DIR=${REPO_PATH}/tests/e2e @@ -31,6 +32,5 @@ mkdir -p $E2E_TEST_DIR/.metadata/ cp metadata-canary $E2E_TEST_DIR/.metadata/ cd $E2E_TEST_DIR -pytest tests/test_sanity_portforward.py -s -q --metadata .metadata/metadata-canary --region $CLUSTER_REGION --installation_option $INSTALLATION_OPTION - +pytest tests/test_sanity_portforward.py -s -q --metadata .metadata/metadata-canary --region $CLUSTER_REGION --installation_option $INSTALLATION_OPTION --junitxml ../canary/integration_tests.xml From 1a34003829a78b2aa9887b27e695af5129ef50c3 Mon Sep 17 00:00:00 2001 From: Wenjin Situ Date: Thu, 30 Mar 2023 13:17:48 -0700 Subject: [PATCH 02/10] Revert "[Cherry Pick] Enable canary report generation (#634)" This reverts commit 632ec70bbdc75a2d85a7d9ca00278c39b2331824. --- tests/canary/canary.buildspec.yaml | 14 +-- .../scripts/push_stats_to_cloudwatch.py | 90 ------------------- tests/canary/scripts/run_test.sh | 10 +-- 3 files changed, 9 insertions(+), 105 deletions(-) delete mode 100644 tests/canary/scripts/push_stats_to_cloudwatch.py diff --git a/tests/canary/canary.buildspec.yaml b/tests/canary/canary.buildspec.yaml index ebbb1a0473..fd119f8fc8 100644 --- a/tests/canary/canary.buildspec.yaml +++ b/tests/canary/canary.buildspec.yaml @@ -6,6 +6,7 @@ phases: # Get cached test image - aws ecr get-login-password --region $CLUSTER_REGION | docker login --username AWS --password-stdin $ECR_CACHE_URI || true - docker pull ${ECR_CACHE_URI}:latest --quiet || true + # Build test image - > docker build -f ./tests/canary/Dockerfile.canary . -t ${ECR_CACHE_URI}:latest --quiet @@ -14,15 +15,8 @@ phases: commands: # Run tests - docker run --name kf-distro-canary $(env | cut -f1 -d= | sed 's/^/-e /') --mount type=bind,source="$(pwd)/",target="/kubeflow-manifests/" ${ECR_CACHE_URI}:latest - post_build: - commands: - - docker cp kf-distro-canary:/kubeflow-manifests/tests/canary/integration_tests.xml /tmp/results.xml || true - # Push test image to cache ECR repo + + # Push test image to cache ECR repo - docker push ${ECR_CACHE_URI}:latest || true - -reports: - IntegrationTestReport: - files: - - "results.xml" - base-directory: "/tmp" + diff --git a/tests/canary/scripts/push_stats_to_cloudwatch.py b/tests/canary/scripts/push_stats_to_cloudwatch.py deleted file mode 100644 index 8130cbfe2c..0000000000 --- a/tests/canary/scripts/push_stats_to_cloudwatch.py +++ /dev/null @@ -1,90 +0,0 @@ -import boto3 -from datetime import datetime -import xml.etree.ElementTree as ET -import os - - -xml_path = "../canary/integration_tests.xml" - - -def readXML_and_publish_metrics_to_cw(): - if os.path.isfile(xml_path): - tree = ET.parse(xml_path) - testsuite = tree.find("testsuite") - failures = testsuite.attrib["failures"] - tests = testsuite.attrib["tests"] - successes = int(tests) - int(failures) - else: - failures = 0 - successes = 0 - tests = 1 - - timestamp = datetime.now().strftime("%Y-%m-%dT%H:%M:%S") - - print(f"Failures: {failures}") - print(f"Total tests: {tests}") - print(f"Success: {successes}") - - # push to cloudwatch - cw_client = boto3.client("cloudwatch") - project_name = "CodeBuild-Run-All-Tests" - - # Define the metric data - metric_data = [ - { - "MetricName": "failures", - "Timestamp": timestamp, - "Dimensions": [ - {"Name": "CodeBuild Project Name", "Value": project_name}, - ], - "Value": int(failures), - "Unit": "Count", - }, - { - "MetricName": "total_tests", - "Timestamp": timestamp, - "Dimensions": [ - {"Name": "CodeBuild Project Name", "Value": project_name}, - ], - "Value": int(tests), - "Unit": "Count", - }, - { - "MetricName": "successes", - "Timestamp": timestamp, - "Dimensions": [ - {"Name": "CodeBuild Project Name", "Value": project_name}, - ], - "Value": int(successes), - "Unit": "Count", - }, - ] - - # Use the put_metric_data method to push the metric data to CloudWatch - try: - response = cw_client.put_metric_data( - Namespace="Canary_Metrics", MetricData=metric_data - ) - if response["ResponseMetadata"]["HTTPStatusCode"] == 200: - print("Successfully pushed data to CloudWatch") - # return 200 status code if successful - return 200 - else: - # raise exception if the status code is not 200 - raise Exception( - "Unexpected response status code: {}".format( - response["ResponseMetadata"]["HTTPStatusCode"] - ) - ) - except Exception as e: - print("Error pushing data to CloudWatch: {}".format(e)) - # raise exception if there was an error pushing data to CloudWatch - raise - - -def main(): - readXML_and_publish_metrics_to_cw() - - -if __name__ == "__main__": - main() diff --git a/tests/canary/scripts/run_test.sh b/tests/canary/scripts/run_test.sh index b21daa43c5..574d6774ff 100755 --- a/tests/canary/scripts/run_test.sh +++ b/tests/canary/scripts/run_test.sh @@ -9,11 +9,10 @@ # Script configuration set -euo pipefail -function push_to_cloudwatch { - echo "Pushing Codebuild stats to Cloudwatch." - python ../canary/scripts/push_stats_to_cloudwatch.py +function onError { + echo "Run test FAILED. Exiting." } -trap push_to_cloudwatch EXIT +trap onError ERR export CANARY_TEST_DIR=${REPO_PATH}/tests/canary export E2E_TEST_DIR=${REPO_PATH}/tests/e2e @@ -32,5 +31,6 @@ mkdir -p $E2E_TEST_DIR/.metadata/ cp metadata-canary $E2E_TEST_DIR/.metadata/ cd $E2E_TEST_DIR -pytest tests/test_sanity_portforward.py -s -q --metadata .metadata/metadata-canary --region $CLUSTER_REGION --installation_option $INSTALLATION_OPTION --junitxml ../canary/integration_tests.xml +pytest tests/test_sanity_portforward.py -s -q --metadata .metadata/metadata-canary --region $CLUSTER_REGION --installation_option $INSTALLATION_OPTION + From 8a5566c80de0c54ae48ac4fc5a128e3112ad46ff Mon Sep 17 00:00:00 2001 From: Wenjin Situ Date: Thu, 6 Apr 2023 16:26:21 -0700 Subject: [PATCH 03/10] update efs driver version --- tests/e2e/fixtures/storage_efs_dependencies.py | 4 ++-- tests/e2e/utils/auto-efs-setup.py | 4 ++-- website/content/en/docs/add-ons/storage/efs/guide.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/e2e/fixtures/storage_efs_dependencies.py b/tests/e2e/fixtures/storage_efs_dependencies.py index 97ea1969d5..0bca63c8c3 100644 --- a/tests/e2e/fixtures/storage_efs_dependencies.py +++ b/tests/e2e/fixtures/storage_efs_dependencies.py @@ -99,7 +99,7 @@ def callback(): @pytest.fixture(scope="class") def install_efs_csi_driver(metadata, region, request, cluster, installation): efs_driver = {} - EFS_DRIVER_VERSION = "v1.3.4" + EFS_DRIVER_VERSION = "v1.5.4" EFS_CSI_DRIVER = f"github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=tags/{EFS_DRIVER_VERSION}" def on_create(): @@ -122,7 +122,7 @@ def create_efs_driver_sa( efs_deps = {} iam_client = boto3.client("iam") - EFS_IAM_POLICY = "https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/v1.3.4/docs/iam-policy-example.json" + EFS_IAM_POLICY = "https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/v1.5.4/docs/iam-policy-example.json" policy_name = rand_name("efs-iam-policy-") policy_arn = [f"arn:aws:iam::{account_id}:policy/{policy_name}"] diff --git a/tests/e2e/utils/auto-efs-setup.py b/tests/e2e/utils/auto-efs-setup.py index 61844ea4bc..bd4d9e293e 100755 --- a/tests/e2e/utils/auto-efs-setup.py +++ b/tests/e2e/utils/auto-efs-setup.py @@ -136,7 +136,7 @@ def create_efs_iam_policy(): def get_efs_iam_policy_document(): - url = "https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/v1.4.0/docs/iam-policy-example.json" + url = "https://https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/v1.5.4/docs/iam-policy-example.json" response = urllib.request.urlopen(url) data = response.read() return data.decode("utf-8") @@ -184,7 +184,7 @@ def install_efs_driver(): print("Installing EFS driver...") kubectl_kustomize_apply( - "https://github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=tags/v1.4.0" + "https://github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.5.4" ) print("EFS driver installed!") diff --git a/website/content/en/docs/add-ons/storage/efs/guide.md b/website/content/en/docs/add-ons/storage/efs/guide.md index 0e2030ef3c..af786c951a 100644 --- a/website/content/en/docs/add-ons/storage/efs/guide.md +++ b/website/content/en/docs/add-ons/storage/efs/guide.md @@ -81,10 +81,10 @@ export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query "Account" --output t ``` #### 1. Install the EFS CSI driver -We recommend installing the EFS CSI Driver v1.3.4 directly from the [the aws-efs-csi-driver github repo](https://github.com/kubernetes-sigs/aws-efs-csi-driver) as follows: +We recommend installing the EFS CSI Driver v1.5.4 directly from the [the aws-efs-csi-driver github repo](https://github.com/kubernetes-sigs/aws-efs-csi-driver) as follows: ```bash -kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=tags/v1.3.4" +kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=tags/v1.5.4" ``` You can confirm that EFS CSI Driver was installed into the default kube-system namespace for you. You can check using the following command: @@ -101,7 +101,7 @@ The CSI driver's service account (created during installation) requires IAM perm 1. Download the IAM policy document from GitHub as follows. ```bash -curl -o iam-policy-example.json https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/v1.3.4/docs/iam-policy-example.json +curl -o iam-policy-example.json https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/v1.5.4/docs/iam-policy-example.json ``` 2. Create the policy. From 4750e5ef4459fbced20461aa58322c5958e4dd5c Mon Sep 17 00:00:00 2001 From: Wenjin Situ Date: Thu, 6 Apr 2023 16:28:51 -0700 Subject: [PATCH 04/10] minor fix --- tests/e2e/utils/auto-efs-setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/utils/auto-efs-setup.py b/tests/e2e/utils/auto-efs-setup.py index bd4d9e293e..a2739fc1d2 100755 --- a/tests/e2e/utils/auto-efs-setup.py +++ b/tests/e2e/utils/auto-efs-setup.py @@ -136,7 +136,7 @@ def create_efs_iam_policy(): def get_efs_iam_policy_document(): - url = "https://https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/v1.5.4/docs/iam-policy-example.json" + url = "https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/v1.5.4/docs/iam-policy-example.json" response = urllib.request.urlopen(url) data = response.read() return data.decode("utf-8") From 4babf7b0138b109f988a54a564e1e42c52851619 Mon Sep 17 00:00:00 2001 From: Wenjin Situ Date: Thu, 6 Apr 2023 16:38:13 -0700 Subject: [PATCH 05/10] update v1.5.4 kustomize link --- tests/e2e/utils/auto-efs-setup.py | 2 +- website/content/en/docs/add-ons/storage/efs/guide.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/utils/auto-efs-setup.py b/tests/e2e/utils/auto-efs-setup.py index a2739fc1d2..c245dcd85e 100755 --- a/tests/e2e/utils/auto-efs-setup.py +++ b/tests/e2e/utils/auto-efs-setup.py @@ -184,7 +184,7 @@ def install_efs_driver(): print("Installing EFS driver...") kubectl_kustomize_apply( - "https://github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.5.4" + "https://github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.5" ) print("EFS driver installed!") diff --git a/website/content/en/docs/add-ons/storage/efs/guide.md b/website/content/en/docs/add-ons/storage/efs/guide.md index af786c951a..969ffe981d 100644 --- a/website/content/en/docs/add-ons/storage/efs/guide.md +++ b/website/content/en/docs/add-ons/storage/efs/guide.md @@ -84,7 +84,7 @@ export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query "Account" --output t We recommend installing the EFS CSI Driver v1.5.4 directly from the [the aws-efs-csi-driver github repo](https://github.com/kubernetes-sigs/aws-efs-csi-driver) as follows: ```bash -kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=tags/v1.5.4" +kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=tags/release-1.5" ``` You can confirm that EFS CSI Driver was installed into the default kube-system namespace for you. You can check using the following command: From bc98bedc3cd1dbfd27d5051aa45c883f61595c72 Mon Sep 17 00:00:00 2001 From: Wenjin Situ Date: Fri, 7 Apr 2023 11:28:25 -0700 Subject: [PATCH 06/10] add efs helm version in terraform for all deployment options --- deployments/cognito-rds-s3/terraform/main.tf | 6 ++++++ deployments/cognito/terraform/main.tf | 6 ++++++ deployments/rds-s3/terraform/main.tf | 6 ++++++ deployments/vanilla/terraform/main.tf | 7 +++++++ 4 files changed, 25 insertions(+) diff --git a/deployments/cognito-rds-s3/terraform/main.tf b/deployments/cognito-rds-s3/terraform/main.tf index 032448b7c6..4e31f6d70e 100644 --- a/deployments/cognito-rds-s3/terraform/main.tf +++ b/deployments/cognito-rds-s3/terraform/main.tf @@ -145,6 +145,12 @@ module "eks_blueprints_kubernetes_addons" { # EKS Blueprints Add-ons enable_cert_manager = true enable_aws_load_balancer_controller = true + + aws_efs_csi_driver_helm_config = { + namespace = "kube-system" + version = "2.4.1" + } + enable_aws_efs_csi_driver = true enable_aws_fsx_csi_driver = true diff --git a/deployments/cognito/terraform/main.tf b/deployments/cognito/terraform/main.tf index 13af2c98ac..e09755836c 100644 --- a/deployments/cognito/terraform/main.tf +++ b/deployments/cognito/terraform/main.tf @@ -146,6 +146,12 @@ module "eks_blueprints_kubernetes_addons" { # EKS Blueprints Add-ons enable_cert_manager = true enable_aws_load_balancer_controller = true + + aws_efs_csi_driver_helm_config = { + namespace = "kube-system" + version = "2.4.1" + } + enable_aws_efs_csi_driver = true enable_aws_fsx_csi_driver = true diff --git a/deployments/rds-s3/terraform/main.tf b/deployments/rds-s3/terraform/main.tf index 2a254ec6b4..cc9ca7f6be 100644 --- a/deployments/rds-s3/terraform/main.tf +++ b/deployments/rds-s3/terraform/main.tf @@ -138,6 +138,12 @@ module "eks_blueprints_kubernetes_addons" { # EKS Blueprints Add-ons enable_cert_manager = true enable_aws_load_balancer_controller = true + + aws_efs_csi_driver_helm_config = { + namespace = "kube-system" + version = "2.4.1" + } + enable_aws_efs_csi_driver = true enable_aws_fsx_csi_driver = true diff --git a/deployments/vanilla/terraform/main.tf b/deployments/vanilla/terraform/main.tf index 2348e570d9..9a24731209 100644 --- a/deployments/vanilla/terraform/main.tf +++ b/deployments/vanilla/terraform/main.tf @@ -137,6 +137,12 @@ module "eks_blueprints_kubernetes_addons" { # EKS Blueprints Add-ons enable_cert_manager = true enable_aws_load_balancer_controller = true + + aws_efs_csi_driver_helm_config = { + namespace = "kube-system" + version = "2.4.1" + } + enable_aws_efs_csi_driver = true enable_aws_fsx_csi_driver = true @@ -146,6 +152,7 @@ module "eks_blueprints_kubernetes_addons" { } + # todo: update the blueprints repo code to export the desired values as outputs module "eks_blueprints_outputs" { source = "../../../iaac/terraform/utils/blueprints-extended-outputs" From 2c52afa7bf20b5e06d906f678d5d7ae4063625af Mon Sep 17 00:00:00 2001 From: Wenjin Situ Date: Fri, 7 Apr 2023 11:38:14 -0700 Subject: [PATCH 07/10] change efs csidriver name in helm config for terraform --- deployments/cognito-rds-s3/terraform/main.tf | 2 +- deployments/cognito/terraform/main.tf | 2 +- deployments/rds-s3/terraform/main.tf | 2 +- deployments/vanilla/terraform/main.tf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deployments/cognito-rds-s3/terraform/main.tf b/deployments/cognito-rds-s3/terraform/main.tf index 4e31f6d70e..8f9ff962e0 100644 --- a/deployments/cognito-rds-s3/terraform/main.tf +++ b/deployments/cognito-rds-s3/terraform/main.tf @@ -146,7 +146,7 @@ module "eks_blueprints_kubernetes_addons" { enable_cert_manager = true enable_aws_load_balancer_controller = true - aws_efs_csi_driver_helm_config = { + aws-efs-csi-driver_helm_config = { namespace = "kube-system" version = "2.4.1" } diff --git a/deployments/cognito/terraform/main.tf b/deployments/cognito/terraform/main.tf index e09755836c..b427a4b902 100644 --- a/deployments/cognito/terraform/main.tf +++ b/deployments/cognito/terraform/main.tf @@ -147,7 +147,7 @@ module "eks_blueprints_kubernetes_addons" { enable_cert_manager = true enable_aws_load_balancer_controller = true - aws_efs_csi_driver_helm_config = { + aws-efs-csi-driver_helm_config = { namespace = "kube-system" version = "2.4.1" } diff --git a/deployments/rds-s3/terraform/main.tf b/deployments/rds-s3/terraform/main.tf index cc9ca7f6be..6887bc202f 100644 --- a/deployments/rds-s3/terraform/main.tf +++ b/deployments/rds-s3/terraform/main.tf @@ -139,7 +139,7 @@ module "eks_blueprints_kubernetes_addons" { enable_cert_manager = true enable_aws_load_balancer_controller = true - aws_efs_csi_driver_helm_config = { + aws-efs-csi-driver_helm_config = { namespace = "kube-system" version = "2.4.1" } diff --git a/deployments/vanilla/terraform/main.tf b/deployments/vanilla/terraform/main.tf index 9a24731209..7a8b29de28 100644 --- a/deployments/vanilla/terraform/main.tf +++ b/deployments/vanilla/terraform/main.tf @@ -138,7 +138,7 @@ module "eks_blueprints_kubernetes_addons" { enable_cert_manager = true enable_aws_load_balancer_controller = true - aws_efs_csi_driver_helm_config = { + aws-efs-csi-driver_helm_config = { namespace = "kube-system" version = "2.4.1" } From 19f1eda122b6478004b408478f6bb69299512a70 Mon Sep 17 00:00:00 2001 From: Wenjin Situ Date: Fri, 7 Apr 2023 11:59:46 -0700 Subject: [PATCH 08/10] add back underscore --- deployments/cognito-rds-s3/terraform/main.tf | 2 +- deployments/cognito/terraform/main.tf | 2 +- deployments/rds-s3/terraform/main.tf | 2 +- deployments/vanilla/terraform/main.tf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deployments/cognito-rds-s3/terraform/main.tf b/deployments/cognito-rds-s3/terraform/main.tf index 672558a968..6565650d01 100644 --- a/deployments/cognito-rds-s3/terraform/main.tf +++ b/deployments/cognito-rds-s3/terraform/main.tf @@ -146,7 +146,7 @@ module "eks_blueprints_kubernetes_addons" { enable_cert_manager = true enable_aws_load_balancer_controller = true - aws-efs-csi-driver_helm_config = { + aws_efs_csi_driver_helm_config = { namespace = "kube-system" version = "2.4.1" } diff --git a/deployments/cognito/terraform/main.tf b/deployments/cognito/terraform/main.tf index cb3f15d0b1..ac820250b7 100644 --- a/deployments/cognito/terraform/main.tf +++ b/deployments/cognito/terraform/main.tf @@ -147,7 +147,7 @@ module "eks_blueprints_kubernetes_addons" { enable_cert_manager = true enable_aws_load_balancer_controller = true - aws-efs-csi-driver_helm_config = { + aws_efs_csi_driver_helm_config = { namespace = "kube-system" version = "2.4.1" } diff --git a/deployments/rds-s3/terraform/main.tf b/deployments/rds-s3/terraform/main.tf index 2fb1e3c0db..9fd01127bb 100644 --- a/deployments/rds-s3/terraform/main.tf +++ b/deployments/rds-s3/terraform/main.tf @@ -139,7 +139,7 @@ module "eks_blueprints_kubernetes_addons" { enable_cert_manager = true enable_aws_load_balancer_controller = true - aws-efs-csi-driver_helm_config = { + aws_efs_csi_driver_helm_config = { namespace = "kube-system" version = "2.4.1" } diff --git a/deployments/vanilla/terraform/main.tf b/deployments/vanilla/terraform/main.tf index ba4454fef9..b7630cc351 100644 --- a/deployments/vanilla/terraform/main.tf +++ b/deployments/vanilla/terraform/main.tf @@ -138,7 +138,7 @@ module "eks_blueprints_kubernetes_addons" { enable_cert_manager = true enable_aws_load_balancer_controller = true - aws-efs-csi-driver_helm_config = { + aws_efs_csi_driver_helm_config = { namespace = "kube-system" version = "2.4.1" } From 30d2e8637bfd5bbb2b558792acf08048f3541272 Mon Sep 17 00:00:00 2001 From: Wenjin Situ Date: Fri, 7 Apr 2023 12:02:39 -0700 Subject: [PATCH 09/10] change kustomize apply -k url to version tag --- tests/e2e/utils/auto-efs-setup.py | 2 +- website/content/en/docs/add-ons/storage/efs/guide.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/utils/auto-efs-setup.py b/tests/e2e/utils/auto-efs-setup.py index c245dcd85e..561848777d 100755 --- a/tests/e2e/utils/auto-efs-setup.py +++ b/tests/e2e/utils/auto-efs-setup.py @@ -184,7 +184,7 @@ def install_efs_driver(): print("Installing EFS driver...") kubectl_kustomize_apply( - "https://github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.5" + "https://github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=v1.5.4" ) print("EFS driver installed!") diff --git a/website/content/en/docs/add-ons/storage/efs/guide.md b/website/content/en/docs/add-ons/storage/efs/guide.md index 969ffe981d..af786c951a 100644 --- a/website/content/en/docs/add-ons/storage/efs/guide.md +++ b/website/content/en/docs/add-ons/storage/efs/guide.md @@ -84,7 +84,7 @@ export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query "Account" --output t We recommend installing the EFS CSI Driver v1.5.4 directly from the [the aws-efs-csi-driver github repo](https://github.com/kubernetes-sigs/aws-efs-csi-driver) as follows: ```bash -kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=tags/release-1.5" +kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=tags/v1.5.4" ``` You can confirm that EFS CSI Driver was installed into the default kube-system namespace for you. You can check using the following command: From f917b42fd25cf9cbdc1f741cd9456acf331e766c Mon Sep 17 00:00:00 2001 From: Wenjin Situ Date: Fri, 7 Apr 2023 12:04:19 -0700 Subject: [PATCH 10/10] add missing tag --- tests/e2e/utils/auto-efs-setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/utils/auto-efs-setup.py b/tests/e2e/utils/auto-efs-setup.py index 561848777d..1386653597 100755 --- a/tests/e2e/utils/auto-efs-setup.py +++ b/tests/e2e/utils/auto-efs-setup.py @@ -184,7 +184,7 @@ def install_efs_driver(): print("Installing EFS driver...") kubectl_kustomize_apply( - "https://github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=v1.5.4" + "https://github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=tags/v1.5.4" ) print("EFS driver installed!")