Skip to content

Commit 3d1dc43

Browse files
authored
Rename service name (#369)
*Issue description:* *Description of changes:* Shorten the remote deployment name so that the relevant pod name follow the regular regex pattern. See details here: aws/amazon-cloudwatch-agent#1553 *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. * [Test Java EKS](https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/13336222797/job/37251919576) * [Test Python EKS](https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/13335460362) * [Test Node EKS](https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/13335591495/job/37251408435) * [Test Dotnet EKS](https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/13336222797/job/37251919576) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent cb39c3d commit 3d1dc43

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

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-otlp-ocb/main.tf

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

156156
metadata {
157-
name = "sample-r-app-deployment-${var.test_id}"
157+
name = "sample-remote-${var.test_id}"
158158
namespace = var.test_namespace
159159
labels = {
160160
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/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/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)