feat(k8s-infra): add updateStrategy support for otel-agent DaemonSet#830
feat(k8s-infra): add updateStrategy support for otel-agent DaemonSet#830noqcks wants to merge 2 commits intoSigNoz:mainfrom
Conversation
The otel-agent DaemonSet currently has no configurable updateStrategy, defaulting to RollingUpdate with maxUnavailable: 1. On large clusters this makes rollouts very slow. This adds an `otelAgent.updateStrategy` value (defaulting to empty/no override) that gets templated into the DaemonSet spec, consistent with how strategy was added for the otel-collector Deployment in SigNoz#807. Usage: otelAgent: updateStrategy: type: RollingUpdate rollingUpdate: maxUnavailable: "50%"
📝 WalkthroughWalkthroughThis update adds optional updateStrategy configuration to the OTEL Agent DaemonSet in the Helm chart. The template now conditionally includes the updateStrategy block from values, allowing users to customize DaemonSet update behavior. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
charts/k8s-infra/values.yaml (1)
590-593: Consider adding a@defaultannotation for documentation consistency.The
otelDeployment.strategyfield at line 1047 documents its Kubernetes default with#@default-- "RollingUpdate".otelAgent.updateStrategyhas no such annotation — when{}is used (the default), Kubernetes falls back toRollingUpdatewithmaxUnavailable: 1, which is the very behaviour this PR aims to let users override. Documenting it reduces the need to follow the ref link.📝 Suggested addition
# otelAgent.updateStrategy -- Update strategy for the OtelAgent DaemonSet. # ref: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/ + # `@default` -- Kubernetes default: RollingUpdate with maxUnavailable: 1 # `@section` -- OpenTelemetry Agent (DaemonSet) updateStrategy: {}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@charts/k8s-infra/values.yaml` around lines 590 - 593, Add a `@default` annotation to the otelAgent.updateStrategy documentation to mirror otelDeployment.strategy: state that when updateStrategy is {} the Kubernetes default is "RollingUpdate" with maxUnavailable: 1; update the comment immediately above the updateStrategy key (referencing otelAgent.updateStrategy) to include this `@default` note so users know the effective behavior without following the ref link.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@charts/k8s-infra/values.yaml`:
- Around line 590-593: Add a `@default` annotation to the otelAgent.updateStrategy
documentation to mirror otelDeployment.strategy: state that when updateStrategy
is {} the Kubernetes default is "RollingUpdate" with maxUnavailable: 1; update
the comment immediately above the updateStrategy key (referencing
otelAgent.updateStrategy) to include this `@default` note so users know the
effective behavior without following the ref link.
What
Adds
otelAgent.updateStrategysupport to the k8s-infra chart's DaemonSet template, consistent with how strategy was added for the otel-collector Deployment in #807.Why
The otel-agent DaemonSet defaults to
maxUnavailable: 1. On large clusters (40+ nodes), this makes rollouts very slow. Users should be able to configure this via values.Changes
updateStrategyfield inotel-agent/daemonset.yaml(guarded by{{- with }}so it's a no-op when empty)otelAgent.updateStrategy: {}default invalues.yamlUsage
Note: there was a prior PR (#454) for this that went stale.
Summary by CodeRabbit