Skip to content

Commit a9dfc39

Browse files
authored
Merge branch 'main' into traffic-generator-image
2 parents 45653ca + 1308ba3 commit a9dfc39

File tree

5 files changed

+52
-8
lines changed

5 files changed

+52
-8
lines changed

.github/workflows/java-eks-e2e-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ jobs:
371371
--platform-info ${{ env.CLUSTER_NAME }}
372372
--service-name sample-application-${{ env.TESTING_ID }}
373373
--remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }}
374+
--remote-resource-identifier "information_schema|${{env.RDS_MYSQL_CLUSTER_ENDPOINT}}|3306"
374375
--query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }}
375376
--rollup'
376377

.github/workflows/java-metric-limiter-e2e-test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
steps:
5555
- name: Generate testing id and sample app namespace
5656
run: |
57-
echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
57+
echo TESTING_ID="metric-limiter-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
5858
echo SAMPLE_APP_NAMESPACE="ns-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV
5959
6060
- uses: actions/checkout@v4
@@ -125,15 +125,15 @@ jobs:
125125
uses: ./.github/workflows/actions/execute_and_retry
126126
with:
127127
command: "eksctl create iamserviceaccount \
128-
--name service-account-${{ env.TESTING_ID }} \
128+
--name sa-${{ env.TESTING_ID }} \
129129
--namespace ${{ env.SAMPLE_APP_NAMESPACE }} \
130130
--cluster ${{ env.CLUSTER_NAME }} \
131131
--role-name eks-s3-access-${{ env.TESTING_ID }} \
132132
--attach-policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess \
133133
--region ${{ env.E2E_TEST_AWS_REGION }} \
134134
--approve"
135135
cleanup: "eksctl delete iamserviceaccount \
136-
--name service-account-${{ env.TESTING_ID }} \
136+
--name sa-${{ env.TESTING_ID }} \
137137
--namespace ${{ env.SAMPLE_APP_NAMESPACE }} \
138138
--cluster ${{ env.CLUSTER_NAME }} \
139139
--region ${{ env.E2E_TEST_AWS_REGION }}"
@@ -172,7 +172,7 @@ jobs:
172172
-var="eks_cluster_name=${{ env.CLUSTER_NAME }}" \
173173
-var="eks_cluster_context_name=$(kubectl config current-context)" \
174174
-var="test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}" \
175-
-var="service_account_aws_access=service-account-${{ env.TESTING_ID }}" \
175+
-var="service_account_aws_access=sa-${{ env.TESTING_ID }}" \
176176
-var="sample_app_image=${{ env.MAIN_SAMPLE_APP_IMAGE_ARN }}" \
177177
-var="sample_remote_app_image=${{ env.REMOTE_SAMPLE_APP_IMAGE_ARN }}" \
178178
|| deployment_failed=$?
@@ -267,7 +267,7 @@ jobs:
267267
-var="kube_directory_path=${{ github.workspace }}/.kube" \
268268
-var="eks_cluster_name=${{ env.CLUSTER_NAME }}" \
269269
-var="test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}" \
270-
-var="service_account_aws_access=service-account-${{ env.TESTING_ID }}" \
270+
-var="service_account_aws_access=sa-${{ env.TESTING_ID }}" \
271271
-var="sample_app_image=${{ env.MAIN_SAMPLE_APP_IMAGE_ARN }}" \
272272
-var="sample_remote_app_image=${{ env.REMOTE_SAMPLE_APP_IMAGE_ARN }}"
273273
@@ -412,7 +412,7 @@ jobs:
412412
-var="kube_directory_path=${{ github.workspace }}/.kube" \
413413
-var="eks_cluster_name=${{ env.CLUSTER_NAME }}" \
414414
-var="test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}" \
415-
-var="service_account_aws_access=service-account-${{ env.TESTING_ID }}" \
415+
-var="service_account_aws_access=sa-${{ env.TESTING_ID }}" \
416416
-var="sample_app_image=${{ env.MAIN_SAMPLE_APP_IMAGE_ARN }}" \
417417
-var="sample_remote_app_image=${{ env.REMOTE_SAMPLE_APP_IMAGE_ARN }}"
418418
@@ -421,7 +421,7 @@ jobs:
421421
continue-on-error: true
422422
run: |
423423
eksctl delete iamserviceaccount \
424-
--name service-account-${{ env.TESTING_ID }} \
424+
--name sa-${{ env.TESTING_ID }} \
425425
--namespace ${{ env.SAMPLE_APP_NAMESPACE }} \
426426
--cluster ${{ env.CLUSTER_NAME }} \
427427
--region ${{ env.E2E_TEST_AWS_REGION }}

validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public enum PredefinedExpectedTemplate implements FileConfig {
3939
JAVA_EKS_CLIENT_CALL_METRIC("/expected-data-template/java/eks/client-call-metric.mustache"),
4040
JAVA_EKS_CLIENT_CALL_TRACE("/expected-data-template/java/eks/client-call-trace.mustache"),
4141

42+
JAVA_EKS_RDS_MYSQL_LOG("/expected-data-template/java/eks/rds-mysql-log.mustache"),
4243
JAVA_EKS_RDS_MYSQL_METRIC("/expected-data-template/java/eks/rds-mysql-metric.mustache"),
4344

4445
/** Java EC2 Default Test Case Validations */
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[{
2+
"EC2.AutoScalingGroup": "^eks-.+",
3+
"EC2.InstanceId": "^i-[A-Za-z0-9]{17}$",
4+
"EKS.Cluster": "^{{platformInfo}}$",
5+
"Environment": "^eks:{{platformInfo}}/{{appNamespace}}$",
6+
"K8s.Namespace": "^{{appNamespace}}$",
7+
"K8s.Node": "^i-[A-Za-z0-9]{17}$",
8+
"K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$",
9+
"K8s.Workload": "^sample-app-deployment-{{testingId}}$",
10+
"PlatformType": "^AWS::EKS$",
11+
"Service": "^{{serviceName}}$",
12+
"Operation": "GET /mysql",
13+
"Version": "^1$",
14+
"Telemetry.Source": "^LocalRootSpan$",
15+
"Host": "^ip(-[0-9]{1,3}){4}.*$"
16+
},
17+
{
18+
"EC2.AutoScalingGroup": "^eks-.+",
19+
"EC2.InstanceId": "^i-[A-Za-z0-9]{17}$",
20+
"EKS.Cluster": "^{{platformInfo}}$",
21+
"Environment": "^eks:{{platformInfo}}/{{appNamespace}}$",
22+
"K8s.Namespace": "^{{appNamespace}}$",
23+
"K8s.Node": "^i-[A-Za-z0-9]{17}$",
24+
"K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$",
25+
"K8s.Workload": "^sample-app-deployment-{{testingId}}$",
26+
"PlatformType": "^AWS::EKS$",
27+
"Service": "^{{serviceName}}$",
28+
"Operation": "GET /mysql",
29+
"Version": "^1$",
30+
"Telemetry.Source": "^ClientSpan$",
31+
"Host": "^ip(-[0-9]{1,3}){4}.*$",
32+
"RemoteService": "mysql",
33+
"RemoteOperation": "SELECT",
34+
"RemoteResourceType": "DB::Connection",
35+
"RemoteResourceIdentifier": "^{{remoteResourceIdentifier}}$"
36+
}]

validator/src/main/resources/validations/java/eks/log-validation.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@
2121
httpPath: "/client-call"
2222
httpMethod: "get"
2323
callingType: "http"
24-
expectedLogStructureTemplate: "JAVA_EKS_CLIENT_CALL_LOG"
24+
expectedLogStructureTemplate: "JAVA_EKS_CLIENT_CALL_LOG"
25+
-
26+
validationType: "cw-log"
27+
httpPath: "/mysql"
28+
httpMethod: "get"
29+
callingType: "http"
30+
expectedLogStructureTemplate: "JAVA_EKS_RDS_MYSQL_LOG"

0 commit comments

Comments
 (0)