Skip to content

feat(k8s-infra): add updateStrategy support for otel-agent DaemonSet#830

Open
noqcks wants to merge 2 commits intoSigNoz:mainfrom
noqcks:feat/daemonset-update-strategy
Open

feat(k8s-infra): add updateStrategy support for otel-agent DaemonSet#830
noqcks wants to merge 2 commits intoSigNoz:mainfrom
noqcks:feat/daemonset-update-strategy

Conversation

@noqcks
Copy link
Copy Markdown

@noqcks noqcks commented Feb 24, 2026

What

Adds otelAgent.updateStrategy support 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

  • Template the updateStrategy field in otel-agent/daemonset.yaml (guarded by {{- with }} so it's a no-op when empty)
  • Add otelAgent.updateStrategy: {} default in values.yaml

Usage

otelAgent:
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: "50%"

Note: there was a prior PR (#454) for this that went stale.

Summary by CodeRabbit

  • New Features
    • Added configurable update strategy for OpenTelemetry agent deployment, enabling customization of how updates are rolled out across your infrastructure.

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%"
@noqcks noqcks requested a review from a team as a code owner February 24, 2026 19:40
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 24, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
OTEL Agent DaemonSet Update Strategy Configuration
charts/k8s-infra/templates/otel-agent/daemonset.yaml, charts/k8s-infra/values.yaml
Adds optional updateStrategy configuration block to DaemonSet spec with conditional template rendering and values initialization.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Suggested reviewers

  • Nageshbansal
  • therealpandey

Poem

🐰 A daemonset's dance, now graceful and spry,
With updateStrategy rolling on by,
Configuration gentle, a conditional treat,
Making Kubernetes updates more neat! 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding updateStrategy support for the otel-agent DaemonSet in the k8s-infra chart, which is the primary focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
charts/k8s-infra/values.yaml (1)

590-593: Consider adding a @default annotation for documentation consistency.

The otelDeployment.strategy field at line 1047 documents its Kubernetes default with # @default -- "RollingUpdate". otelAgent.updateStrategy has no such annotation — when {} is used (the default), Kubernetes falls back to RollingUpdate with maxUnavailable: 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.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4aa9dc and 54c7ca5.

📒 Files selected for processing (2)
  • charts/k8s-infra/templates/otel-agent/daemonset.yaml
  • charts/k8s-infra/values.yaml

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.

1 participant