Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement EKS E2E Terraform Framework #434

Merged
merged 22 commits into from
Dec 16, 2024
Merged

Implement EKS E2E Terraform Framework #434

merged 22 commits into from
Dec 16, 2024

Conversation

musa-asad
Copy link
Contributor

@musa-asad musa-asad commented Dec 2, 2024

Description of the issue

We aim to enhance our testing framework to support end-to-end testing of various helm-charts values and allow the use of custom branches for the agent, operator, and helm-charts repositories to enable testing of different configurations and prevent regressions to verify Kubernetes resource creation/deletion and metric emission.

Description of changes

Co-PR: aws/amazon-cloudwatch-agent#1445.

  • Changes brought over from Add E2E EKS Terraform environment. #430 to be able to reference this repository from the GitHub workflow in the amazon-cloudwatch-agent package.
  • Added new fields to MetaData and MetaDataStrings structs in environment/metadata.go to support EKS E2E testing parameters.
  • Implemented registerEKSE2ETestData function to register new command-line flags for EKS E2E testing.
  • Created new Terraform files (main.tf, providers.tf, variables.tf) in terraform/eks/e2e to set up EKS clusters for testing.
  • Added eks_e2e test configuration in generator/test_case_generator.go. Separated it into testTypeToTestConfigE2E in order to avoid generating the non-E2E matrix files in the E2E workflow.
  • Implemented ConfigureAWSClients function in util/awsservice/constant.go to allow custom region changes for AWS clients.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

terraform apply --auto-approve -var="test_dir=../../../test/e2e/jmx" -var="agent_config=../../../test/e2e/jmx/resources/cwagent_configs/jvm_tomcat.json" -var="sample_app=../../../test/e2e/jmx/resources/sample_apps/tomcat-deployment.yaml"

Successfully deploys the CWA Operator, CWA, and Sample Application:
Screenshot 2024-11-15 at 12 29 42 PM

Also utilizes the correct images.
Screenshot 2024-11-15 at 12 30 08 PM
Screenshot 2024-11-15 at 12 30 30 PM

@musa-asad musa-asad changed the title E2e Implement EKS E2E Terraform Framework Dec 2, 2024
@musa-asad musa-asad marked this pull request as ready for review December 2, 2024 04:08
@musa-asad musa-asad requested a review from a team as a code owner December 2, 2024 04:08
@musa-asad musa-asad self-assigned this Dec 2, 2024
TravisStark
TravisStark previously approved these changes Dec 11, 2024
environment/metadata.go Show resolved Hide resolved
environment/metadata.go Show resolved Hide resolved
environment/metadata.go Show resolved Hide resolved
generator/resources/eks_e2e_test_matrix.json Show resolved Hide resolved
dricross
dricross previously approved these changes Dec 13, 2024
terraform/eks/e2e/main.tf Outdated Show resolved Hide resolved
util/awsservice/constant.go Show resolved Hide resolved
okankoAMZ
okankoAMZ previously approved these changes Dec 16, 2024
Copy link
Contributor

@okankoAMZ okankoAMZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking comments. Looks good

terraform/eks/e2e/main.tf Show resolved Hide resolved
@musa-asad musa-asad merged commit ed779d3 into main Dec 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants