Skip to content

Commit c980d34

Browse files
authored
Update k8s tests (#372)
*Issue description:* *Description of changes:* Update k8s tests *Rollback procedure:* <Can we safely revert this commit if needed? If not, detail what must be done to safely revert and why it is needed.> *Ensure you've run the following tests on your changes and include the link below:* To do so, create a `test.yml` file with `name: Test` and workflow description to test your changes, then remove the file for your PR. Link your test run in your PR description. This process is a short term solution while we work on creating a staging environment for testing. NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL. See the [needs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds) keyword to run tests in succession. - Run Java EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run Python EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run metric limiter on EKS cluster `e2e-playground` in us-east-1 and eu-central-2 - Run EC2 tests in all regions - Run K8s on a separate K8s cluster (check IAD test account for master node endpoints; these will change as we create and destroy clusters for OS patching) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent db7a367 commit c980d34

File tree

10 files changed

+34
-31
lines changed

10 files changed

+34
-31
lines changed

.github/workflows/dotnet-k8s-test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ jobs:
186186
--platform-info k8s-cluster-${{ env.TESTING_ID }}
187187
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
188188
--service-name dotnet-sample-app-deployment-${{ env.TESTING_ID }}
189-
--remote-service-name dotnet-sample-r-app-deployment-${{ env.TESTING_ID }}
190-
--remote-service-deployment-name dotnet-sample-r-app-deployment-${{ env.TESTING_ID }}
189+
--remote-service-name dotnet-remote-${{ env.TESTING_ID }}
190+
--remote-service-deployment-name dotnet-remote-${{ env.TESTING_ID }}
191191
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
192192
--rollup'
193193

@@ -204,8 +204,8 @@ jobs:
204204
--platform-info k8s-cluster-${{ env.TESTING_ID }}
205205
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
206206
--service-name dotnet-sample-app-deployment-${{ env.TESTING_ID }}
207-
--remote-service-name dotnet-sample-r-app-deployment-${{ env.TESTING_ID }}
208-
--remote-service-deployment-name dotnet-sample-r-app-deployment-${{ env.TESTING_ID }}
207+
--remote-service-name dotnet-remote-${{ env.TESTING_ID }}
208+
--remote-service-deployment-name dotnet-remote-${{ env.TESTING_ID }}
209209
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
210210
--rollup'
211211

@@ -222,8 +222,8 @@ jobs:
222222
--platform-info k8s-cluster-${{ env.TESTING_ID }}
223223
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
224224
--service-name dotnet-sample-app-deployment-${{ env.TESTING_ID }}
225-
--remote-service-name dotnet-sample-r-app-deployment-${{ env.TESTING_ID }}
226-
--remote-service-deployment-name dotnet-sample-r-app-deployment-${{ env.TESTING_ID }}
225+
--remote-service-name dotnet-remote-${{ env.TESTING_ID }}
226+
--remote-service-deployment-name dotnet-remote-${{ env.TESTING_ID }}
227227
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
228228
--rollup'
229229

.github/workflows/java-k8s-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ jobs:
192192
--platform-info k8s-cluster-${{ env.TESTING_ID }}
193193
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
194194
--service-name sample-application-${{ env.TESTING_ID }}
195-
--remote-service-name sample-r-app-deployment-${{ env.TESTING_ID }}
195+
--remote-service-name java-remote-${{ env.TESTING_ID }}
196196
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
197197
--rollup'
198198

@@ -209,8 +209,8 @@ jobs:
209209
--platform-info k8s-cluster-${{ env.TESTING_ID }}
210210
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
211211
--service-name sample-application-${{ env.TESTING_ID }}
212-
--remote-service-name sample-r-app-deployment-${{ env.TESTING_ID }}
213-
--remote-service-deployment-name sample-r-app-deployment-${{ env.TESTING_ID }}
212+
--remote-service-name java-remote-${{ env.TESTING_ID }}
213+
--remote-service-deployment-name java-remote-${{ env.TESTING_ID }}
214214
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
215215
--rollup'
216216

@@ -227,8 +227,8 @@ jobs:
227227
--platform-info k8s-cluster-${{ env.TESTING_ID }}
228228
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
229229
--service-name sample-application-${{ env.TESTING_ID }}
230-
--remote-service-name sample-r-app-deployment-${{ env.TESTING_ID }}
231-
--remote-service-deployment-name sample-r-app-deployment-${{ env.TESTING_ID }}
230+
--remote-service-name java-remote-${{ env.TESTING_ID }}
231+
--remote-service-deployment-name java-remote-${{ env.TESTING_ID }}
232232
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
233233
--rollup'
234234

.github/workflows/node-k8s-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ jobs:
186186
--platform-info k8s-cluster-${{ env.TESTING_ID }}
187187
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
188188
--service-name sample-application-${{ env.TESTING_ID }}
189-
--remote-service-name sample-r-app-deployment-${{ env.TESTING_ID }}
189+
--remote-service-name node-remote-${{ env.TESTING_ID }}
190190
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
191191
--rollup'
192192

@@ -203,8 +203,8 @@ jobs:
203203
--platform-info k8s-cluster-${{ env.TESTING_ID }}
204204
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
205205
--service-name sample-application-${{ env.TESTING_ID }}
206-
--remote-service-name sample-r-app-deployment-${{ env.TESTING_ID }}
207-
--remote-service-deployment-name sample-r-app-deployment-${{ env.TESTING_ID }}
206+
--remote-service-name node-remote-${{ env.TESTING_ID }}
207+
--remote-service-deployment-name node-remote-${{ env.TESTING_ID }}
208208
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
209209
--rollup'
210210

@@ -221,8 +221,8 @@ jobs:
221221
--platform-info k8s-cluster-${{ env.TESTING_ID }}
222222
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
223223
--service-name sample-application-${{ env.TESTING_ID }}
224-
--remote-service-name sample-r-app-deployment-${{ env.TESTING_ID }}
225-
--remote-service-deployment-name sample-r-app-deployment-${{ env.TESTING_ID }}
224+
--remote-service-name node-remote-${{ env.TESTING_ID }}
225+
--remote-service-deployment-name node-remote-${{ env.TESTING_ID }}
226226
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
227227
--rollup'
228228

.github/workflows/python-k8s-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ jobs:
192192
--platform-info k8s-cluster-${{ env.TESTING_ID }}
193193
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
194194
--service-name python-sample-application-${{ env.TESTING_ID }}
195-
--remote-service-name python-sample-r-app-deployment-${{ env.TESTING_ID }}
195+
--remote-service-name python-remote-${{ env.TESTING_ID }}
196196
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
197197
--rollup'
198198

@@ -209,8 +209,8 @@ jobs:
209209
--platform-info k8s-cluster-${{ env.TESTING_ID }}
210210
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
211211
--service-name python-sample-application-${{ env.TESTING_ID }}
212-
--remote-service-name python-sample-r-app-deployment-${{ env.TESTING_ID }}
213-
--remote-service-deployment-name python-sample-r-app-deployment-${{ env.TESTING_ID }}
212+
--remote-service-name python-remote-${{ env.TESTING_ID }}
213+
--remote-service-deployment-name python-remote-${{ env.TESTING_ID }}
214214
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
215215
--rollup'
216216

@@ -227,8 +227,8 @@ jobs:
227227
--platform-info k8s-cluster-${{ env.TESTING_ID }}
228228
--app-namespace ${{ env.SAMPLE_APP_NAMESPACE }}
229229
--service-name python-sample-application-${{ env.TESTING_ID }}
230-
--remote-service-name python-sample-r-app-deployment-${{ env.TESTING_ID }}
231-
--remote-service-deployment-name python-sample-r-app-deployment-${{ env.TESTING_ID }}
230+
--remote-service-name python-remote-${{ env.TESTING_ID }}
231+
--remote-service-deployment-name python-remote-${{ env.TESTING_ID }}
232232
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
233233
--rollup'
234234

terraform/dotnet/eks/linux/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ resource "kubernetes_service" "dotnet_app_service" {
153153
resource "kubernetes_deployment" "dotnet_r_app_deployment" {
154154

155155
metadata {
156-
name = "dotnet-r-app-deployment-${var.test_id}"
156+
name = "dotnet-remote-${var.test_id}"
157157
namespace = var.test_namespace
158158
labels = {
159159
app = "remote-app"

terraform/java/eks/main.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,14 @@ resource "kubernetes_deployment" "sample_remote_app_deployment" {
205205
}
206206
}
207207

208-
resource "kubernetes_service" "sample_remote_app_service" {
208+
resource "kubernetes_service" "sample_remote_app_deployment" {
209209
depends_on = [ kubernetes_deployment.sample_remote_app_deployment ]
210210

211211
metadata {
212-
name = "sample-remote-app-service"
212+
# use the same name as the deployment to handle the edge case when the deployment name is longer than 47 characters
213+
# in this edge case, we just use the service name (rather than deployment name) as RemoteService
214+
# see https://github.com/aws/amazon-cloudwatch-agent/pull/1553
215+
name = "sample-r-app-deployment-${var.test_id}"
213216
namespace = var.test_namespace
214217
}
215218
spec {
@@ -260,4 +263,4 @@ resource "kubernetes_deployment" "traffic_generator" {
260263
}
261264
}
262265
}
263-
}
266+
}

terraform/java/k8s/deploy/resources/remote-service-depl.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: java-remote-${TESTING_ID}
5-
namespace: java-sample-app-namespace
5+
namespace: sample-app-namespace
66
spec:
77
replicas: 1
88
selector:
@@ -33,7 +33,7 @@ apiVersion: v1
3333
kind: Service
3434
metadata:
3535
name: java-remote-service
36-
namespace: java-sample-app-namespace
36+
namespace: sample-app-namespace
3737
spec:
3838
selector:
3939
app: remote-app

terraform/node/eks/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ resource "kubernetes_service" "sample_app_service" {
165165
resource "kubernetes_deployment" "sample_remote_app_deployment" {
166166

167167
metadata {
168-
name = "sample-r-app-deployment-${var.test_id}"
168+
name = "sample-remote-${var.test_id}"
169169
namespace = var.test_namespace
170170
labels = {
171171
app = "remote-app"

terraform/node/k8s/deploy/resources/remote-service-depl.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: node-remote-${TESTING_ID}
5-
namespace: node-sample-app-namespace
5+
namespace: sample-app-namespace
66
spec:
77
replicas: 1
88
selector:
@@ -34,7 +34,7 @@ apiVersion: v1
3434
kind: Service
3535
metadata:
3636
name: node-remote-service
37-
namespace: node-sample-app-namespace
37+
namespace: sample-app-namespace
3838
spec:
3939
selector:
4040
app: remote-app

terraform/python/eks/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ resource "kubernetes_service" "python_app_service" {
170170
resource "kubernetes_deployment" "python_r_app_deployment" {
171171

172172
metadata {
173-
name = "python-r-app-deployment-${var.test_id}"
173+
name = "python-remote-${var.test_id}"
174174
namespace = var.test_namespace
175175
labels = {
176176
app = "remote-app"

0 commit comments

Comments
 (0)