6969 - name : Generate testing id and sample app namespace
7070 run : |
7171 echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
72- echo SAMPLE_APP_NAMESPACE="default" >> $GITHUB_ENV
73- # echo SAMPLE_APP_NAMESPACE="ns-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV
72+ echo SAMPLE_APP_NAMESPACE="ns-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV
7473
7574 - uses : actions/checkout@v4
7675 with :
@@ -196,6 +195,7 @@ jobs:
196195 with :
197196 command : " cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util && \
198197 sed -i -e 's/${E2E_TEST_AWS_REGION}/${{ env.E2E_TEST_AWS_REGION }}/g' ./appsignals-collector.yaml && \
198+ sed -i -e 's/${SAMPLE_APP_NAMESPACE}/${{ env.SAMPLE_APP_NAMESPACE }}/g' ./appsignals-collector.yaml && \
199199 kubectl apply -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}"
200200 cleanup : " kubectl delete -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }} && \
201201 aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}"
@@ -331,8 +331,6 @@ jobs:
331331 echo "validation-result=failure" >> $GITHUB_OUTPUT
332332 fi
333333
334- # TODO: Simplify cleanup
335- # Can just use `kubectl delete ns -n ${{ env.SAMPLE_APP_NAMESPACE }}` once the namespace is no longer hardcoded
336334 - name : Clean up
337335 if : always()
338336 continue-on-error : true
@@ -341,11 +339,8 @@ jobs:
341339 run : |
342340 aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}
343341 eksctl delete iamserviceaccount --name cloudwatch-agent --namespace amazon-cloudwatch --cluster ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}
344- kubectl delete -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}
345342 kubectl delete ns opentelemetry-operator-system
346- kubectl delete deploy --all -n ${{ env.SAMPLE_APP_NAMESPACE }}
347- kubectl delete service sample-remote-app-service -n ${{ env.SAMPLE_APP_NAMESPACE }}
348- kubectl delete service sample-app-service -n ${{ env.SAMPLE_APP_NAMESPACE }}
343+ kubectl delete ns -n ${{ env.SAMPLE_APP_NAMESPACE }}
349344 aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}
350345
351346 - name : Terraform destroy
0 commit comments