Skip to content

Add support for UpdateStrategy when collector mode is Deployment #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

sky333999
Copy link
Contributor

@sky333999 sky333999 commented Jun 10, 2025

Description of changes: The CRD supports configuring UpdateStrategy when the collector mode is a DaemonSet, but not when its a Deployment. This extends support for configuring it for Deployments as well.

Testing:

  • Prior to this change, any modifications to the AmazonCloudWatchAgent custom resource would fail validations when its of type deployment as per follows:
kubectl patch amazoncloudwatchagents cloudwatch-agent-ci -n amazon-cloudwatch --type merge -p '{"spec":{"tolerations":[{"operator":"Exists"}]}}'
Error: UPGRADE FAILED: cannot patch "cloudwatch-agent-ci" with kind AmazonCloudWatchAgent: admission webhook "[vamazoncloudwatchagentcreateupdate.kb.io](http://vamazoncloudwatchagentcreateupdate.kb.io/)" denied the request: the OpenTelemetry Collector mode is set to deployment, which does not support the attribute 'updateStrategy'
  • Deployed a dev version of the operator with the change, and the same command after succeeds as per follows:
kubectl patch amazoncloudwatchagents cloudwatch-agent-ci -n amazon-cloudwatch --type merge -p '{"spec":{"tolerations":[{"operator":"Exists"}]}}'                                                    
amazoncloudwatchagent.cloudwatch.aws.amazon.com/cloudwatch-agent-ci patched

image

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

Copy link
Contributor

@mitali-salvi mitali-salvi left a comment

Choose a reason for hiding this comment

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

Were we able to test this ?

@sky333999 sky333999 merged commit da2eec0 into main Jun 11, 2025
10 checks passed
@sky333999 sky333999 deleted the sky333999/deployment-update branch June 11, 2025 17:01
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.

3 participants