diff --git a/.github/workflows/java-eks-otlp-ocb-canary.yml b/.github/workflows/java-eks-otlp-ocb-canary.yml new file mode 100644 index 00000000..17aa5f54 --- /dev/null +++ b/.github/workflows/java-eks-otlp-ocb-canary.yml @@ -0,0 +1,34 @@ +## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +## SPDX-License-Identifier: Apache-2.0 + +# TODO: Add comment +name: Java EKS OTLP/OCB Enablement Canary Test +on: + # schedule: + # - cron: '12,37 * * * *' # run the workflow at 12th and 37th minute of every hour + workflow_dispatch: # be able to run the workflow on demand + push: + branches: + - otlp-ocb + +permissions: + id-token: write + contents: read + +jobs: + eks: + strategy: + fail-fast: false + matrix: + aws-region: ['us-west-1'] + # aws-region: ['af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-south-2','ap-southeast-1', + # 'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1', + # 'eu-south-1','eu-south-2','eu-west-1','eu-west-2','eu-west-3','il-central-1','me-central-1','me-south-1', 'sa-east-1', + # 'us-east-1','us-east-2','us-west-1','us-west-2'] + uses: ./.github/workflows/java-eks-otlp-ocb-retry.yml + secrets: inherit + with: + aws-region: ${{ matrix.aws-region }} + test-cluster-name: 'e2e-java-otlp-ocb-canary-test' + caller-workflow-name: 'appsignals-java-e2e-eks-otlp-ocb-canary-test' + java-version: '11' diff --git a/.github/workflows/java-eks-otlp-ocb-retry.yml b/.github/workflows/java-eks-otlp-ocb-retry.yml new file mode 100644 index 00000000..38d698d2 --- /dev/null +++ b/.github/workflows/java-eks-otlp-ocb-retry.yml @@ -0,0 +1,71 @@ +## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +## SPDX-License-Identifier: Apache-2.0 + +# This is a reusable workflow for running the Enablement test for App Signals. +# It is meant to be called from another workflow. +# Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview +name: Java EKS OTLP/OCB Retry +on: + workflow_call: + inputs: + aws-region: + required: true + type: string + test-cluster-name: + required: true + type: string + caller-workflow-name: + required: true + type: string + java-version: + required: true + type: string + +concurrency: + group: 'java-eks-otlp-ocb-${{ inputs.aws-region }}-${{ github.ref_name }}' + cancel-in-progress: false + +permissions: + id-token: write + contents: read + +jobs: + java-eks-otlp-ocb-attempt-1: + uses: ./.github/workflows/java-eks-otlp-ocb-test.yml + secrets: inherit + with: + aws-region: ${{ inputs.aws-region }} + test-cluster-name: ${{ inputs.test-cluster-name }} + caller-workflow-name: ${{ inputs.caller-workflow-name }} + java-version: ${{ inputs.java-version }} + + # java-eks-otlp-ocb-attempt-2: + # needs: [ java-eks-otlp-ocb-attempt-1 ] + # if: ${{ needs.java-eks-otlp-ocb-attempt-1.outputs.job-started != 'true' }} + # uses: ./.github/workflows/java-eks-otlp-ocb-test.yml + # secrets: inherit + # with: + # aws-region: ${{ inputs.aws-region }} + # test-cluster-name: ${{ inputs.test-cluster-name }} + # caller-workflow-name: ${{ inputs.caller-workflow-name }} + # java-version: ${{ inputs.java-version }} + + # publish-metric-attempt-1: + # needs: [ java-eks-otlp-ocb-attempt-1, java-eks-otlp-ocb-attempt-2 ] + # if: always() + # uses: ./.github/workflows/enablement-test-publish-result.yml + # secrets: inherit + # with: + # aws-region: ${{ inputs.aws-region }} + # caller-workflow-name: ${{ inputs.caller-workflow-name }} + # validation-result: ${{ needs.java-eks-otlp-ocb-attempt-1.outputs.validation-result || needs.java-eks-otlp-ocb-attempt-2.outputs.validation-result }} + + # publish-metric-attempt-2: + # needs: [ java-eks-otlp-ocb-attempt-1, java-eks-otlp-ocb-attempt-2, publish-metric-attempt-1 ] + # if: ${{ always() && needs.publish-metric-attempt-1.outputs.job-started != 'true' }} + # uses: ./.github/workflows/enablement-test-publish-result.yml + # secrets: inherit + # with: + # aws-region: ${{ inputs.aws-region }} + # caller-workflow-name: ${{ inputs.caller-workflow-name }} + # validation-result: ${{ needs.java-eks-otlp-ocb-attempt-1.outputs.validation-result || needs.java-eks-otlp-ocb-attempt-2.outputs.validation-result }} \ No newline at end of file diff --git a/.github/workflows/java-eks-otlp-ocb-test.yml b/.github/workflows/java-eks-otlp-ocb-test.yml new file mode 100644 index 00000000..da183c8d --- /dev/null +++ b/.github/workflows/java-eks-otlp-ocb-test.yml @@ -0,0 +1,402 @@ +## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +## SPDX-License-Identifier: Apache-2.0 + +# This is a reusable workflow for running the Enablement test for App Signals. +# It is meant to be called from another workflow. +# Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview +name: Java EKS OTLP/OCB Use Case +on: + workflow_call: + inputs: + aws-region: + required: true + type: string + test-cluster-name: + required: true + type: string + caller-workflow-name: + required: true + type: string + java-version: + description: "Currently support version 8, 11, 17, 21, 22" + required: false + type: string + default: '11' + adot-image-name: + required: false + type: string + cw-agent-operator-tag: + required: false + type: string + outputs: + job-started: + value: ${{ jobs.metric-limiter.outputs.job-started }} + validation-result: + value: ${{ jobs.metric-limiter.outputs.validation-result }} + +permissions: + id-token: write + contents: read + +env: + # The precense of this env var is required for use by terraform and AWS CLI commands + # It is not redundant + E2E_TEST_AWS_REGION: ${{ inputs.aws-region }} + CLUSTER_NAME: ${{ inputs.test-cluster-name }} + CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }} + JAVA_VERSION: ${{ inputs.java-version }} + ADOT_IMAGE_NAME: ${{ inputs.adot-image-name }} + CW_AGENT_OPERATOR_TAG: ${{ inputs.cw-agent-operator-tag }} + E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} + E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} + METRIC_NAMESPACE: ApplicationSignals + LOG_GROUP_NAME: /aws/application-signals/data + TEST_RESOURCES_FOLDER: ${GITHUB_WORKSPACE} + +jobs: + otlp-ocb: + runs-on: ubuntu-latest + timeout-minutes: 30 + outputs: + job-started: ${{ steps.job-started.outputs.job-started }} + validation-result: ${{ steps.validation-result.outputs.validation-result }} + steps: + - name: Check if the job started + id: job-started + run: echo "job-started=true" >> $GITHUB_OUTPUT + + # TODO: Put back namespace + - name: Generate testing id and sample app namespace + run: | + echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV + echo SAMPLE_APP_NAMESPACE="default" >> $GITHUB_ENV + # echo SAMPLE_APP_NAMESPACE="ns-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV + + - uses: actions/checkout@v4 + with: + repository: 'aws-observability/aws-application-signals-test-framework' + ref: ${{ env.CALLER_WORKFLOW_NAME == 'main-build' && 'main' || github.ref }} + fetch-depth: 0 + + # We initialize Gradlew Daemon early on during the workflow because sometimes initialization + # fails due to transient issues. If it fails here, then we will try again later before the validators + # - name: Initiate Gradlew Daemon + # id: initiate-gradlew + # uses: ./.github/workflows/actions/execute_and_retry + # continue-on-error: true + # with: + # command: "./gradlew :validator:build" + # cleanup: "./gradlew clean" + # max_retry: 3 + # sleep_time: 60 + + - name: Download enablement script + uses: ./.github/workflows/actions/execute_and_retry + with: + pre-command: "mkdir enablement-script && cd enablement-script" + command: "wget https://raw.githubusercontent.com/aws-observability/application-signals-demo/refs/heads/ocb/scripts/eks/appsignals/enable-app-signals-ocb.sh" + cleanup: "rm -f enable-app-signals-ocb.sh" + post-command: "chmod +x enable-app-signals-ocb.sh" + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::${{ env.E2E_TEST_ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }} + aws-region: us-east-1 + + - name: Retrieve account + uses: aws-actions/aws-secretsmanager-get-secrets@v2 + with: + secret-ids: | + ACCOUNT_ID, region-account/${{ env.E2E_TEST_AWS_REGION }} + JAVA_MAIN_SAMPLE_APP_IMAGE, e2e-test/java-main-sample-app-image + JAVA_REMOTE_SAMPLE_APP_IMAGE, e2e-test/java-remote-sample-app-image + + # If the workflow is running as a canary, then we want to log in to the aws account in the appropriate region + - name: Configure AWS Credentials + if: ${{ github.event.repository.name == 'aws-application-signals-test-framework' }} + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }} + aws-region: ${{ env.E2E_TEST_AWS_REGION }} + + # local directory to store the kubernetes config + - name: Create kubeconfig directory + run: mkdir -p ${{ github.workspace }}/.kube + + - name: Set KUBECONFIG environment variable + run: echo KUBECONFIG="${{ github.workspace }}/.kube/config" >> $GITHUB_ENV + + - name: Set up kubeconfig + run: aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }} + + - name: Download and install eksctl + uses: ./.github/workflows/actions/execute_and_retry + with: + pre-command: 'mkdir ${{ github.workspace }}/eksctl' + command: 'curl -sLO "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz" + && tar -xzf eksctl_Linux_amd64.tar.gz -C ${{ github.workspace }}/eksctl && rm eksctl_Linux_amd64.tar.gz' + cleanup: 'rm -f eksctl_Linux_amd64.tar.gz' + + - name: Add eksctl to Github Path + run: | + echo "${{ github.workspace }}/eksctl" >> $GITHUB_PATH + + # This step deletes lingering resources from previous test runs + - name: Delete all sample app namespaces + continue-on-error: true + timeout-minutes: 5 + run: kubectl get namespace | awk '/^ns-[0-9]+-[0-9]+/{print $1}' | xargs --no-run-if-empty kubectl delete namespace + + # Set up App Signals permissions and resources + - name: Create role for AWS access from the sample app + id: create_service_account + uses: ./.github/workflows/actions/execute_and_retry + with: + command: "eksctl create iamserviceaccount \ + --name service-account-${{ env.TESTING_ID }} \ + --namespace ${{ env.SAMPLE_APP_NAMESPACE }} \ + --cluster ${{ env.CLUSTER_NAME }} \ + --role-name eks-s3-access-${{ env.TESTING_ID }} \ + --attach-policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess \ + --region ${{ env.E2E_TEST_AWS_REGION }} \ + --approve" + cleanup: "eksctl delete iamserviceaccount \ + --name service-account-${{ env.TESTING_ID }} \ + --namespace ${{ env.SAMPLE_APP_NAMESPACE }} \ + --cluster ${{ env.CLUSTER_NAME }} \ + --region ${{ env.E2E_TEST_AWS_REGION }}" + sleep_time: 60 + + - name: Set up terraform + uses: ./.github/workflows/actions/execute_and_retry + with: + command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg" + post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + && sudo apt update && sudo apt install terraform' + sleep_time: 60 + + - name: Initiate Terraform + uses: ./.github/workflows/actions/execute_and_retry + with: + command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb && terraform init && terraform validate" + cleanup: "rm -rf .terraform && rm -rf .terraform.lock.hcl" + max_retry: 6 + sleep_time: 60 + + - name: Set Sample App Image + run: | + echo MAIN_SAMPLE_APP_IMAGE_ARN="${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.JAVA_MAIN_SAMPLE_APP_IMAGE }}:v${{ env.JAVA_VERSION }}" >> $GITHUB_ENV + echo REMOTE_SAMPLE_APP_IMAGE_ARN="${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.JAVA_REMOTE_SAMPLE_APP_IMAGE }}:v${{ env.JAVA_VERSION }}" >> $GITHUB_ENV + + # TODO: Fix retry, clean-app-signals doesn't work for enable-app-signals-ocb.sh + - name: Install OTel Operator using enablement script + uses: ./.github/workflows/actions/execute_and_retry + with: + command: "${{ env.TEST_RESOURCES_FOLDER }}/enablement-script/enable-app-signals-ocb.sh \ + ${{ env.CLUSTER_NAME }} \ + ${{ env.E2E_TEST_AWS_REGION }} \ + ${{ env.SAMPLE_APP_NAMESPACE }}" + max_retry: 1 + sleep_time: 60 + # TODO: cleanup and increase retries + # cleanup: "TODO" + + - name: Install OTel Collector + uses: ./.github/workflows/actions/execute_and_retry + with: + command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util && kubectl apply -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}" + cleanup: "kubectl delete -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }} && \ + aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}" + + - name: Deploy sample app via terraform and wait for the endpoint to come online + id: deploy-sample-app + uses: ./.github/workflows/actions/execute_and_retry + with: + command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb && \ + terraform apply -auto-approve \ + -var=\"test_id=${{ env.TESTING_ID }}\" \ + -var=\"aws_region=${{ env.E2E_TEST_AWS_REGION }}\" \ + -var=\"kube_directory_path=${{ github.workspace }}/.kube\" \ + -var=\"eks_cluster_name=${{ env.CLUSTER_NAME }}\" \ + -var=\"eks_cluster_context_name=$(kubectl config current-context)\" \ + -var=\"test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}\" \ + -var=\"service_account_aws_access=service-account-${{ env.TESTING_ID }}\" \ + -var=\"sample_app_image=${{ env.MAIN_SAMPLE_APP_IMAGE_ARN }}\" \ + -var=\"sample_remote_app_image=${{ env.REMOTE_SAMPLE_APP_IMAGE_ARN }}\" \ + -var='account_id=${{ env.ACCOUNT_ID }}'" + cleanup: "terraform destroy -auto-approve \ + -var=\"test_id=${{ env.TESTING_ID }}\" \ + -var=\"aws_region=${{ env.E2E_TEST_AWS_REGION }}\" \ + -var=\"kube_directory_path=${{ github.workspace }}/.kube\" \ + -var=\"eks_cluster_name=${{ env.CLUSTER_NAME }}\" \ + -var=\"test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}\" \ + -var=\"service_account_aws_access=service-account-${{ env.TESTING_ID }}\" \ + -var=\"sample_app_image=${{ env.MAIN_SAMPLE_APP_IMAGE_ARN }}\" \ + -var=\"sample_remote_app_image=${{ env.REMOTE_SAMPLE_APP_IMAGE_ARN }}\"" + max_retry: 2 + sleep_time: 60 + + - name: Get Remote Service Deployment Name + uses: ./.github/workflows/actions/execute_and_retry + with: + command: echo "REMOTE_SERVICE_DEPLOYMENT_NAME=$(kubectl get deployments -n ${{ env.SAMPLE_APP_NAMESPACE }} --selector=app=remote-app -o jsonpath='{.items[0].metadata.name}')" >> $GITHUB_ENV + max_retry: 3 + sleep_time: 30 + + - name: Get Remote Service IP + uses: ./.github/workflows/actions/execute_and_retry + with: + command: echo "REMOTE_SERVICE_POD_IP=$(kubectl get pods -n ${{ env.SAMPLE_APP_NAMESPACE }} --selector=app=remote-app -o jsonpath='{.items[0].status.podIP}')" >> $GITHUB_ENV + max_retry: 3 + sleep_time: 30 + + - name: Get Remote Service IP + uses: ./.github/workflows/actions/execute_and_retry + with: + command: echo "APP_ENDPOINT=$(kubectl get pods -n ${{ env.SAMPLE_APP_NAMESPACE }} --selector=app=sample-app -o jsonpath='{.items[0].status.podIP}'):8080" >> $GITHUB_ENV + max_retry: 3 + sleep_time: 30 + + - name: Set endpoints for the traffic generator + uses: ./.github/workflows/actions/execute_and_retry + with: + command: kubectl set env -n ${{ env.SAMPLE_APP_NAMESPACE }} deployment/traffic-generator MAIN_ENDPOINT=${{ env.APP_ENDPOINT }} REMOTE_ENDPOINT=${{ env.REMOTE_SERVICE_POD_IP }} + max_retry: 3 + sleep_time: 30 + + - name: Sleep + run: sleep 30 + + # # Validation for app signals telemetry data + # - name: Call endpoint and validate generated EMF logs + # id: log-validation + # if: steps.deploy-sample-app.outcome == 'success' && !cancelled() + # run: ./gradlew validator:run --args='-c java/eks/log-validation.yml + # --testing-id ${{ env.TESTING_ID }} + # --endpoint http://${{ env.APP_ENDPOINT }} + # --region ${{ env.E2E_TEST_AWS_REGION }} + # --account-id ${{ env.ACCOUNT_ID }} + # --metric-namespace ${{ env.METRIC_NAMESPACE }} + # --log-group ${{ env.LOG_GROUP_NAME }} + # --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} + # --platform-info ${{ env.CLUSTER_NAME }} + # --service-name sample-application-${{ env.TESTING_ID }} + # --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} + # --remote-resource-identifier "information_schema|${{env.RDS_MYSQL_CLUSTER_ENDPOINT}}|3306" + # --remote-db-user ${{ env.RDS_MYSQL_CLUSTER_SECRETS_USERNAME }} + # --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} + # --rollup' + + # - name: Call endpoints and validate generated metrics + # id: metric-validation + # if: (steps.deploy-sample-app.outcome == 'success' || steps.log-validation.outcome == 'failure') && !cancelled() + # run: ./gradlew validator:run --args='-c java/eks/metric-validation.yml + # --testing-id ${{ env.TESTING_ID }} + # --endpoint http://${{ env.APP_ENDPOINT }} + # --region ${{ env.E2E_TEST_AWS_REGION }} + # --account-id ${{ env.ACCOUNT_ID }} + # --metric-namespace ${{ env.METRIC_NAMESPACE }} + # --log-group ${{ env.LOG_GROUP_NAME }} + # --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} + # --platform-info ${{ env.CLUSTER_NAME }} + # --service-name sample-application-${{ env.TESTING_ID }} + # --remote-service-name sample-remote-application-${{ env.TESTING_ID }} + # --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} + # --remote-resource-identifier "information_schema|${{env.RDS_MYSQL_CLUSTER_ENDPOINT}}|3306" + # --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} + # --rollup' + + # - name: Call endpoints and validate generated traces + # id: trace-validation + # if: (steps.deploy-sample-app.outcome == 'success' || steps.log-validation.outcome == 'failure' || steps.metric-validation.outcome == 'failure') && !cancelled() + # run: ./gradlew validator:run --args='-c java/eks/trace-validation.yml + # --testing-id ${{ env.TESTING_ID }} + # --endpoint http://${{ env.APP_ENDPOINT }} + # --region ${{ env.E2E_TEST_AWS_REGION }} + # --account-id ${{ env.ACCOUNT_ID }} + # --metric-namespace ${{ env.METRIC_NAMESPACE }} + # --log-group ${{ env.LOG_GROUP_NAME }} + # --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} + # --platform-info ${{ env.CLUSTER_NAME }} + # --service-name sample-application-${{ env.TESTING_ID }} + # --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} + # --remote-resource-identifier "information_schema|${{env.RDS_MYSQL_CLUSTER_ENDPOINT}}|3306" + # --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} + # --rollup' + + - name: Refresh AWS Credentials + if: ${{ github.event.repository.name == 'aws-application-signals-test-framework' }} + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }} + aws-region: ${{ env.E2E_TEST_AWS_REGION }} + + - name: Save test results + if: always() + id: validation-result + run: | + if [ "${{ steps.trace-validation.outcome }}" = "success" ]; then + echo "validation-result=success" >> $GITHUB_OUTPUT + else + echo "validation-result=failure" >> $GITHUB_OUTPUT + fi + + # TODO: Simplify cleanup + # Can just use `kubectl delete ns -n ${{ env.SAMPLE_APP_NAMESPACE }}` once the namespace is no longer hardcoded + - name: Clean up + if: always() + continue-on-error: true + timeout-minutes: 5 + working-directory: terraform/java/eks-otlp-ocb/util + run: | + aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }} + eksctl delete iamserviceaccount --name cloudwatch-agent --namespace amazon-cloudwatch --cluster ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }} + kubectl delete ns opentelemetry-operator-system + kubectl delete service appsignals-collector -n ${{ env.SAMPLE_APP_NAMESPACE }} + kubectl delete service appsignals-collector-headless -n ${{ env.SAMPLE_APP_NAMESPACE }} + kubectl delete service appsignals-collector-monitoring -n ${{ env.SAMPLE_APP_NAMESPACE }} + kubectl delete deploy --all -n ${{ env.SAMPLE_APP_NAMESPACE }} + kubectl delete service sample-remote-app-service -n ${{ env.SAMPLE_APP_NAMESPACE }} + kubectl delete service sample-app-service -n ${{ env.SAMPLE_APP_NAMESPACE }} + kubectl delete -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }} + aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }} + + - name: Terraform destroy + if: always() + continue-on-error: true + timeout-minutes: 5 + working-directory: terraform/java/eks-otlp-ocb + run: | + terraform destroy -auto-approve \ + -var="test_id=${{ env.TESTING_ID }}" \ + -var="aws_region=${{ env.E2E_TEST_AWS_REGION }}" \ + -var="kube_directory_path=${{ github.workspace }}/.kube" \ + -var="eks_cluster_name=${{ env.CLUSTER_NAME }}" \ + -var="test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}" \ + -var="service_account_aws_access=service-account-${{ env.TESTING_ID }}" \ + -var="sample_app_image=${{ env.MAIN_SAMPLE_APP_IMAGE_ARN }}" \ + -var="sample_remote_app_image=${{ env.REMOTE_SAMPLE_APP_IMAGE_ARN }}" + + - name: Remove aws access service account + if: always() + continue-on-error: true + run: | + eksctl delete iamserviceaccount \ + --name service-account-${{ env.TESTING_ID }} \ + --namespace ${{ env.SAMPLE_APP_NAMESPACE }} \ + --cluster ${{ env.CLUSTER_NAME }} \ + --region ${{ env.E2E_TEST_AWS_REGION }} + + # TODO: Fix, doesn't work right now because of the following error + # `serviceaccount "default/appsignals-collector" was not created by eksctl; will not be deleted` + # Not a necessary piece of code anyways, service account persisting is not an issue + - name: Remove Application Signals Collector IAM service account + if: always() + continue-on-error: true + run: | + eksctl delete iamserviceaccount \ + --name appsignals-collector \ + --namespace ${{ env.SAMPLE_APP_NAMESPACE }} \ + --cluster ${{ env.CLUSTER_NAME }} \ + --region ${{ env.E2E_TEST_AWS_REGION }} \ No newline at end of file diff --git a/terraform/java/eks-otlp-ocb/kubeconfig.tpl b/terraform/java/eks-otlp-ocb/kubeconfig.tpl new file mode 100644 index 00000000..bbcaa8ae --- /dev/null +++ b/terraform/java/eks-otlp-ocb/kubeconfig.tpl @@ -0,0 +1,18 @@ +apiVersion: v1 +clusters: +- cluster: + certificate-authority-data: ${CA_DATA} + server: ${SERVER_ENDPOINT} + name: ${CLUSTER_NAME} +contexts: +- context: + cluster: ${CLUSTER_NAME} + user: terraform_user + name: ${CLUSTER_NAME} +current-context: ${CLUSTER_NAME} +kind: Config +preferences: {} +users: +- name: terraform_user + user: + token: ${TOKEN} \ No newline at end of file diff --git a/terraform/java/eks-otlp-ocb/main.tf b/terraform/java/eks-otlp-ocb/main.tf new file mode 100644 index 00000000..6566bf0e --- /dev/null +++ b/terraform/java/eks-otlp-ocb/main.tf @@ -0,0 +1,251 @@ +# ------------------------------------------------------------------------ +# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). +# You may not use this file except in compliance with the License. +# A copy of the License is located at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# or in the "license" file accompanying this file. This file is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +# express or implied. See the License for the specific language governing +# permissions and limitations under the License. +# ------------------------------------------------------------------------- + +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + } + + kubernetes = { + source = "hashicorp/kubernetes" + version = ">= 2.16.1" + } + + kubectl = { + source = "gavinbunney/kubectl" + version = ">= 1.7.0" + } + } +} + +provider "aws" { + region = var.aws_region +} + +# get eks cluster +data "aws_eks_cluster" "testing_cluster" { + name = var.eks_cluster_name +} +data "aws_eks_cluster_auth" "testing_cluster" { + name = var.eks_cluster_name +} + +# set up kubectl +provider "kubernetes" { + host = data.aws_eks_cluster.testing_cluster.endpoint + cluster_ca_certificate = base64decode(data.aws_eks_cluster.testing_cluster.certificate_authority[0].data) + token = data.aws_eks_cluster_auth.testing_cluster.token +} + +provider "kubectl" { + // Note: copy from eks module. Please avoid use shorted-lived tokens when running locally. + // For more information: https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#exec-plugins + host = data.aws_eks_cluster.testing_cluster.endpoint + cluster_ca_certificate = base64decode(data.aws_eks_cluster.testing_cluster.certificate_authority[0].data) + token = data.aws_eks_cluster_auth.testing_cluster.token + load_config_file = false +} + +data "template_file" "kubeconfig_file" { + template = file("./kubeconfig.tpl") + vars = { + CLUSTER_NAME : var.eks_cluster_context_name + CA_DATA : data.aws_eks_cluster.testing_cluster.certificate_authority[0].data + SERVER_ENDPOINT : data.aws_eks_cluster.testing_cluster.endpoint + TOKEN = data.aws_eks_cluster_auth.testing_cluster.token + } +} + +resource "local_file" "kubeconfig" { + content = data.template_file.kubeconfig_file.rendered + filename = "${var.kube_directory_path}/config" +} + +### Setting up the sample app on the cluster + +resource "kubernetes_deployment" "sample_app_deployment" { + + metadata { + name = "sample-app-deployment-${var.test_id}" + namespace = var.test_namespace + } + + spec { + replicas = 1 + selector { + match_labels = { + app = "sample-app" + } + } + template { + metadata { + labels = { + app = "sample-app" + } + annotations = { + # these annotations allow for OTel Java instrumentation + "instrumentation.opentelemetry.io/inject-java" = "true" + } + } + spec { + service_account_name = var.service_account_aws_access + container { + name = "back-end" + image = var.sample_app_image + image_pull_policy = "Always" + env { + #inject the test id to service name for unique App Signals metrics + name = "OTEL_SERVICE_NAME" + value = "sample-application-${var.test_id}" + } + env { + name = "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED" + value = "false" + } + port { + container_port = 8080 + } + } + } + } + } +} + +resource "kubernetes_service" "sample_app_service" { + depends_on = [ kubernetes_deployment.sample_app_deployment ] + + metadata { + name = "sample-app-service" + namespace = var.test_namespace + } + spec { + type = "NodePort" + selector = { + app = "sample-app" + } + port { + protocol = "TCP" + port = 8080 + target_port = 8080 + node_port = 30100 + } + } +} + +# Set up the remote service + +resource "kubernetes_deployment" "sample_remote_app_deployment" { + + metadata { + name = "sample-r-app-deployment-${var.test_id}" + namespace = var.test_namespace + labels = { + app = "remote-app" + } + } + + spec { + replicas = 1 + selector { + match_labels = { + app = "remote-app" + } + } + template { + metadata { + labels = { + app = "remote-app" + } + annotations = { + # these annotations allow for OTel Java instrumentation + "instrumentation.opentelemetry.io/inject-java" = "true" + } + } + spec { + service_account_name = var.service_account_aws_access + container { + name = "back-end" + image = var.sample_remote_app_image + image_pull_policy = "Always" + port { + container_port = 8080 + } + env { + name = "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED" + value = "false" + } + } + } + } + } +} + +resource "kubernetes_service" "sample_remote_app_service" { + depends_on = [ kubernetes_deployment.sample_remote_app_deployment ] + + metadata { + name = "sample-remote-app-service" + namespace = var.test_namespace + } + spec { + type = "NodePort" + selector = { + app = "remote-app" + } + port { + protocol = "TCP" + port = 8080 + target_port = 8080 + node_port = 30101 + } + } +} + +resource "kubernetes_deployment" "traffic_generator" { + metadata { + name = "traffic-generator" + namespace = var.test_namespace + labels = { + app = "traffic-generator" + } + } + spec { + replicas = 1 + selector { + match_labels = { + app = "traffic-generator" + } + } + template { + metadata { + labels = { + app = "traffic-generator" + } + } + spec { + container { + name = "traffic-generator" + image = "${var.account_id}.dkr.ecr.${var.aws_region}.amazonaws.com/e2e-test-resource:traffic-generator" + image_pull_policy = "Always" + env { + name = "ID" + value = var.test_id + } + } + } + } + } +} \ No newline at end of file diff --git a/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml b/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml new file mode 100644 index 00000000..f41cdb9e --- /dev/null +++ b/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml @@ -0,0 +1,561 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: otel-collector-role +rules: + - apiGroups: [""] + resources: ["pods", "nodes", "namespaces", "endpoints"] + verbs: ["list", "watch", "get"] + - apiGroups: [""] + resources: ["services"] + verbs: ["list", "watch"] + - apiGroups: ["apps"] + resources: ["replicasets", "daemonsets", "deployments", "statefulsets"] + verbs: ["list", "watch", "get"] + - apiGroups: ["batch"] + resources: ["jobs"] + verbs: ["list", "watch"] + - apiGroups: [""] + resources: ["nodes/proxy"] + verbs: ["get"] + - apiGroups: [""] + resources: ["nodes/stats", "configmaps", "events"] + verbs: ["create", "get"] + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["update"] + +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: otel-collector-role-binding +subjects: + - kind: ServiceAccount + name: appsignals-collector + namespace: default +roleRef: + kind: ClusterRole + name: otel-collector-role + apiGroup: rbac.authorization.k8s.io +--- + +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: appsignals +spec: + # mode: daemonset + image: public.ecr.aws/d8u3t5w4/appsignals-otel-collector:latest + config: | + extensions: + awsproxy: + health_check: + sigv4auth: + region: "us-west-2" + service: "xray" + + receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + otlp/application_signals: + protocols: + http: + endpoint: 0.0.0.0:4316 + + processors: + awsapplicationsignals: + resolvers: + - platform: eks + name: appsignals-ocb-demo + metricstransform/application_signals: + transforms: + - include: jvm.cpu.recent_utilization + action: update + new_name: JVMCpuRecentUtilization + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.cpu.time + action: update + new_name: JVMCpuTime + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.classes.loaded + action: update + new_name: JVMClassLoaded + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.threads.count + action: update + new_name: JVMThreadCount + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.nonheap.used + action: update + new_name: JVMMemoryNonHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used_after_last_gc + action: update + new_name: JVMMemoryUsedAfterLastGC + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.heap.used + action: update + new_name: JVMMemoryHeapUsed + aggregation_type: "" + submatch_case: "" + match_type: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryOldGenUsed + match_type: regexp + experimental_match_labels: {"name": ".*Old\\sGen$"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemorySurvivorSpaceUsed + match_type: regexp + experimental_match_labels: {"name": ".*Survivor\\sSpace$"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.memory.pool.used + action: insert + new_name: JVMMemoryEdenSpaceUsed + match_type: regexp + experimental_match_labels: {"name": ".*Eden\\sSpace$"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCDuration + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCCount + match_type: "" + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCOldGenDuration + match_type: strict + experimental_match_labels: {"name": "G1 Old Generation"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.elapsed + action: insert + new_name: JVMGCYoungGenDuration + match_type: strict + experimental_match_labels: {"name": "G1 Young Generation"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCOldGenCount + match_type: strict + experimental_match_labels: {"name": "G1 Old Generation"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + - include: jvm.gc.collections.count + action: insert + new_name: JVMGCYoungGenCount + match_type: strict + experimental_match_labels: {"name": "G1 Young Generation"} + aggregation_type: "" + submatch_case: "" + operations: + - action: aggregate_labels + label_set: [] + aggregation_type: sum + experimental_scale: 0 + label: "" + new_label: "" + label_value: "" + new_value: "" + - action: add_label + new_label: Telemetry.Source + new_value: RuntimeMetric + aggregation_type: "" + experimental_scale: 0 + label: "" + label_value: "" + + exporters: + otlphttp: + traces_endpoint: https://xray-beta.us-west-2.amazonaws.com/v1/traces + compression: zstd + auth: + authenticator: sigv4auth + awsxray/application_signals: + region: 'us-west-2' + index_all_attributes: false + indexed_attributes: + - aws.local.service + - aws.local.operation + - aws.local.environment + - aws.remote.service + - aws.remote.operation + - aws.remote.environment + - aws.remote.resource.identifier + - aws.remote.resource.type + + awsemf: + region: 'us-west-2' + log_group_name: "/aws/application-signals/custom" + namespace: "ApplicationSignalsCustom" + dimension_rollup_option: "NoDimensionRollup" + + awsemf/application_signals: + region: 'us-west-2' + log_group_name: "/aws/application-signals/data" + namespace: "ApplicationSignals" + dimension_rollup_option: "NoDimensionRollup" + version: "1" + local_mode: true + metric_declarations: + - dimensions: + - [Environment, Service, Operation] + - [Environment, Service] + label_matchers: + - label_names: + - Telemetry.Source + regex: '^(ServerSpan|LocalRootSpan)$' + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - [Environment, Service, Operation, RemoteService, RemoteOperation, RemoteResourceIdentifier, RemoteResourceType] + - [Environment, Service, Operation, RemoteService, RemoteOperation] + - [Environment, Service, RemoteService] + - [Environment, Service, RemoteService, RemoteOperation, RemoteResourceIdentifier, RemoteResourceType] + - [Environment, Service, RemoteService, RemoteOperation] + - [Environment, Service, RemoteService, RemoteResourceIdentifier, RemoteResourceType] + - [RemoteService, RemoteResourceIdentifier, RemoteResourceType] + - [RemoteService] + label_matchers: + - label_names: + - Telemetry.Source + regex: '^(ClientSpan|ProducerSpan|ConsumerSpan)$' + metric_name_selectors: + - Latency + - Fault + - Error + - dimensions: + - [ Environment, Service ] + label_matchers: + - label_names: + - Telemetry.Source + regex: '^RuntimeMetric$' + separator: ; + metric_name_selectors: + - '^.*$' + + service: + pipelines: + traces: + receivers: [otlp/application_signals] + processors: [awsapplicationsignals] + exporters: [awsxray/application_signals] + metrics: + receivers: [otlp/application_signals] + processors: + - metricstransform/application_signals + - awsapplicationsignals + exporters: [awsemf/application_signals] + metrics/2: + receivers: [otlp] + exporters: [awsemf] + extensions: [sigv4auth] + telemetry: + logs: + level: debug +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: my-instrumentation +spec: + # OTEL_EXPORTER_OTLP_ENDPOINT + exporter: + endpoint: http://appsignals-collector:4318 + nodejs: + image: public.ecr.aws/n7z4r8f9/adot-js-amznlinux:latest + env: + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://appsignals-collector:4316/v1/traces + - name: OTEL_AWS_APPLICATION_SIGNALS_ENABLED + value: "true" + - name: OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT + value: http://appsignals-collector:4316/v1/metrics + - name: OTEL_EXPORTER_OTLP_PROTOCOL + value: "http/protobuf" + java: + image: public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.32.5 + env: + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://appsignals-collector:4316/v1/traces + - name: OTEL_AWS_APPLICATION_SIGNALS_ENABLED + value: "true" + - name: OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT + value: http://appsignals-collector:4316/v1/metrics + - name: OTEL_EXPORTER_OTLP_PROTOCOL + value: "http/protobuf" + # - name: OTEL_JMX_ENABLE + # value: "true" + # - name: OTEL_JMX_TARGET_SYSTEM + # value: "jvm" \ No newline at end of file diff --git a/terraform/java/eks-otlp-ocb/variables.tf b/terraform/java/eks-otlp-ocb/variables.tf new file mode 100644 index 00000000..2c71dcd3 --- /dev/null +++ b/terraform/java/eks-otlp-ocb/variables.tf @@ -0,0 +1,54 @@ +# ------------------------------------------------------------------------ +# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). +# You may not use this file except in compliance with the License. +# A copy of the License is located at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# or in the "license" file accompanying this file. This file is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +# express or implied. See the License for the specific language governing +# permissions and limitations under the License. +# ------------------------------------------------------------------------- + +variable "test_id" { + default = "dummy-123" +} + +variable "kube_directory_path" { + default = "./.kube" +} + +variable "aws_region" { + default = "" +} + +variable "eks_cluster_name" { + default = "" +} + +variable "eks_cluster_context_name" { + default = "." +} + +variable "test_namespace" { + default = "sample-app-namespace" +} + +variable "service_account_aws_access" { + default = "sample-app-service-account" +} + +variable "sample_app_image" { + default = ":" +} + +variable "sample_remote_app_image" { + default = ":" +} + +variable "account_id" { + default = "" +}