Skip to content

Conversation

movence
Copy link
Contributor

@movence movence commented May 28, 2025

Description of the issue

Update the agent version to 1.300057.0b1161

container-insights-manifest-update.sh script, which is intended to update all sample files with the latest agent, Kubernetes, and Fluent (D/Bit) versions, is not updating all files as expected. After running the script, several files still reference an older version of the agent.

Description of changes

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

docker pull public.ecr.aws/cloudwatch-agent/cloudwatch-agent:1.300057.0b1161
1.300057.0b1161: Pulling from cloudwatch-agent/cloudwatch-agent
a4e9c760a1ee: Pull complete 
9b242823c4f3: Pull complete 
c78c05a45a46: Pull complete 
Digest: sha256:dd64abc867a303207ffc59403f01cc414c98a581fe3c23a5645ea074382a7f8d
Status: Downloaded newer image for public.ecr.aws/cloudwatch-agent/cloudwatch-agent:1.300057.0b1161
public.ecr.aws/cloudwatch-agent/cloudwatch-agent:1.300057.0b1161
## before the change
[11:34:48]➜  ~/works/workspace/other/amazon-cloudwatch-container-insights git:(main) ./container-insights-manifest-update.sh 
[11:35:26]➜  ~/works/workspace/other/amazon-cloudwatch-container-insights git:(main) ✗ gst | wc -l                            
      29

## after the change
[11:33:43]➜  ~/works/workspace/other/amazon-cloudwatch-container-insights git:(update-version-script) ./container-insights-manifest-update.sh 
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluentd/fluentd-configmap.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluentd/fluentd.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cloudwatch-namespace.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluentd-quickstart.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluent-bit-quickstart-windows.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluentd-quickstart-enhanced.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluent-bit-quickstart.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluent-bit-quickstart-enhanced.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-daemonset.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-configmap-enhanced.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-serviceaccount.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-daemonset-windows.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-configmap.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit-compatible.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit-configmap.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit-windows.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/cwagent-fluentd-xray/cwagent-fluentd-xray-quickstart.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/combination/combination.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/cwagent-sdkmetrics/cwagent-sdkmetrics.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/cwagent-statsd/cwagent-statsd.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/sidecar/combination/combination.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/sidecar/cwagent-sdkmetrics/cwagent-sdkmetrics.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/sidecar/cwagent-statsd/cwagent-statsd.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/sidecar/cwagent-emf/cwagent-emf.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-eks-windows-exporter.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-eks-fargate.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-eks.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_windows_exporter/sample-net-app.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_windows_exporter/windows-exporter.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/javajmx/cw_dashboard_javajmx.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/redis/cw_dashboard_redis.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/nginx-ingress/cw_dashboard_nginx_ingress_controller.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/haproxy-ingress/cw_dashboard_haproxy_ingress.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/appmesh/cw_dashboard_awsappmesh.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/kubernetes_api_server/cw_dashboard_kubernetes_api_server.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/memcached/cw_dashboard_memcached.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/fluent-bit/cw_dashboard_fluent_bit.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_traffic/redis/redis-traffic-sample.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_traffic/nginx-traffic/nginx-traffic-sample.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-k8s.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/combination/combination.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-sdkmetrics/cwagent-sdkmetrics.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-statsd/cwagent-statsd.yaml
Processing ./k8s-yaml-templates/fluentd/fluentd-configmap.yaml
Processing ./k8s-yaml-templates/fluentd/fluentd.yaml
Processing ./k8s-yaml-templates/cloudwatch-namespace.yaml
Processing ./k8s-yaml-templates/quickstart/cwagent-fluentd-quickstart.yaml
Processing ./k8s-yaml-templates/cwagent-statsd/cwagent-statsd-configmap.yaml
Processing ./k8s-yaml-templates/cwagent-statsd/cwagent-statsd-daemonset.yaml
Processing ./k8s-yaml-templates/cwagent-statsd/cwagent-statsd-deployment.yaml
Processing ./k8s-yaml-templates/cwagent-kubernetes-monitoring/cwagent-daemonset.yaml
Processing ./k8s-yaml-templates/cwagent-kubernetes-monitoring/cwagent-serviceaccount.yaml
Processing ./k8s-yaml-templates/cwagent-kubernetes-monitoring/cwagent-configmap.yaml
Processing ./k8s-quickstart/cwagent-version.yaml
Processing ./k8s-quickstart/cwagent-custom-resource-definitions.yaml
Processing ./k8s-quickstart/cwagent-operator-rendered.yaml
Processing ./ecs-task-definition-templates/deployment-mode/daemon-service/cwagent-ecs-instance-metric/cloudformation-quickstart/cwagent-ecs-instance-metric-cfn.json
Processing ./ecs-task-definition-templates/deployment-mode/daemon-service/cwagent-ecs-instance-metric/cwagent-ecs-instance-metric.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/combination/combination-ec2.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/combination/combination-fargate.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-sdkmetrics/cwagent-sdkmetrics-ec2.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-sdkmetrics/cwagent-sdkmetrics-fargate.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-statsd/cwagent-statsd-ec2.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-statsd/cwagent-statsd-fargate.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-emf/cwagent-emf-fargate.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-emf/cwagent-emf-ec2.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_cloudwatch_dashboards/javajmx/cw_dashboard_javajmx.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_cloudwatch_dashboards/redis/cw_dashboard_redis.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_cloudwatch_dashboards/appmesh/cw_dashboard_awsappmesh.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_cloudwatch_dashboards/memcached/cw_dashboard_memcached.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_traffic/redis/redis-traffic-sample.yaml
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_traffic/memcached/memcached-traffic-sample.yaml
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/cwagent-prometheus-task-definition.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/cloudformation-quickstart/cwagent-ecs-prometheus-metric-for-awsvpc.yaml
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/cloudformation-quickstart/cwagent-ecs-prometheus-metric-for-bridge-host.yaml
Version and manifest updates completed successfully!

[11:34:02]➜  ~/works/workspace/other/amazon-cloudwatch-container-insights git:(update-version-script) ✗ gst | wc -l
      53

Requirements

Before committing the code, please verify the following:

  • If this commit includes changes to existing sample configurations, you acknowledge that you have confirmed this will not impact existing customer behavior.
  • If not necessary, consider creating a new sample configuration for this change.

Copy link
Contributor

@okankoAMZ okankoAMZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I ran it gave me:

Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluentd/fluentd-configmap.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluentd/fluentd.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cloudwatch-namespace.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluentd-quickstart.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluent-bit-quickstart-windows.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluentd-quickstart-enhanced.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluent-bit-quickstart.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluent-bit-quickstart-enhanced.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-daemonset.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-configmap-enhanced.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-serviceaccount.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-daemonset-windows.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-configmap.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit-compatible.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit-configmap.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit-windows.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/cwagent-fluentd-xray/cwagent-fluentd-xray-quickstart.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/combination/combination.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/cwagent-sdkmetrics/cwagent-sdkmetrics.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/daemonset/cwagent-statsd/cwagent-statsd.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/sidecar/combination/combination.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/sidecar/cwagent-sdkmetrics/cwagent-sdkmetrics.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/sidecar/cwagent-statsd/cwagent-statsd.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/sidecar/cwagent-emf/cwagent-emf.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-eks-windows-exporter.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-eks-fargate.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-eks.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_windows_exporter/sample-net-app.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_windows_exporter/windows-exporter.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/javajmx/cw_dashboard_javajmx.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/redis/cw_dashboard_redis.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/nginx-ingress/cw_dashboard_nginx_ingress_controller.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/haproxy-ingress/cw_dashboard_haproxy_ingress.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/appmesh/cw_dashboard_awsappmesh.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/kubernetes_api_server/cw_dashboard_kubernetes_api_server.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/memcached/cw_dashboard_memcached.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_cloudwatch_dashboards/fluent-bit/cw_dashboard_fluent_bit.json
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_traffic/redis/redis-traffic-sample.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/sample_traffic/nginx-traffic/nginx-traffic-sample.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-k8s.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/combination/combination.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-sdkmetrics/cwagent-sdkmetrics.yaml
Processing ./k8s-deployment-manifest-templates/deployment-mode/service/cwagent-statsd/cwagent-statsd.yaml
Processing ./k8s-yaml-templates/fluentd/fluentd-configmap.yaml
Processing ./k8s-yaml-templates/fluentd/fluentd.yaml
Processing ./k8s-yaml-templates/cloudwatch-namespace.yaml
Processing ./k8s-yaml-templates/quickstart/cwagent-fluentd-quickstart.yaml
Processing ./k8s-yaml-templates/cwagent-statsd/cwagent-statsd-configmap.yaml
Processing ./k8s-yaml-templates/cwagent-statsd/cwagent-statsd-daemonset.yaml
Processing ./k8s-yaml-templates/cwagent-statsd/cwagent-statsd-deployment.yaml
Processing ./k8s-yaml-templates/cwagent-kubernetes-monitoring/cwagent-daemonset.yaml
Processing ./k8s-yaml-templates/cwagent-kubernetes-monitoring/cwagent-serviceaccount.yaml
Processing ./k8s-yaml-templates/cwagent-kubernetes-monitoring/cwagent-configmap.yaml
Processing ./k8s-quickstart/cwagent-version.yaml
Processing ./k8s-quickstart/cwagent-custom-resource-definitions.yaml
Processing ./k8s-quickstart/cwagent-operator-rendered.yaml
Processing ./ecs-task-definition-templates/deployment-mode/daemon-service/cwagent-ecs-instance-metric/cloudformation-quickstart/cwagent-ecs-instance-metric-cfn.json
Processing ./ecs-task-definition-templates/deployment-mode/daemon-service/cwagent-ecs-instance-metric/cwagent-ecs-instance-metric.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/combination/combination-ec2.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/combination/combination-fargate.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-sdkmetrics/cwagent-sdkmetrics-ec2.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-sdkmetrics/cwagent-sdkmetrics-fargate.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-statsd/cwagent-statsd-ec2.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-statsd/cwagent-statsd-fargate.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-emf/cwagent-emf-fargate.json
Processing ./ecs-task-definition-templates/deployment-mode/sidecar/cwagent-emf/cwagent-emf-ec2.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_cloudwatch_dashboards/javajmx/cw_dashboard_javajmx.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_cloudwatch_dashboards/redis/cw_dashboard_redis.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_cloudwatch_dashboards/appmesh/cw_dashboard_awsappmesh.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_cloudwatch_dashboards/memcached/cw_dashboard_memcached.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_traffic/redis/redis-traffic-sample.yaml
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/sample_traffic/memcached/memcached-traffic-sample.yaml
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/cwagent-prometheus-task-definition.json
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/cloudformation-quickstart/cwagent-ecs-prometheus-metric-for-awsvpc.yaml
Processing ./ecs-task-definition-templates/deployment-mode/replica-service/cwagent-prometheus/cloudformation-quickstart/cwagent-ecs-prometheus-metric-for-bridge-host.yaml
Version and manifest updates completed successfully!

Copy link
Contributor

@okankoAMZ okankoAMZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked via search tool for any other version that is not 1.3.33 couldn't find it!

LGTM

@TravisStark TravisStark force-pushed the update-version-script branch from 26015f1 to 6b5d686 Compare July 18, 2025 18:50
@TravisStark TravisStark changed the title use find instead prefix based lookup for version updates Update k8s version to 1.3.35 and cwagent version to 1.300057.0 and use find instead prefix based lookup for version updates Jul 18, 2025
@TravisStark
Copy link

Ran with update to 1.300057.0

@TravisStark TravisStark force-pushed the update-version-script branch from dc509fd to 9e9f058 Compare July 18, 2025 19:00
@TravisStark TravisStark merged commit 2e51a57 into main Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants