Skip to content

[Multi_K8s-Plugin] Config hash for StatefulSet and DaemonSet#6697

Merged
khanhtc1202 merged 2 commits into
pipe-cd:masterfrom
mohammedfirdouss:feat/config-hash-statefulset-daemonset
Apr 21, 2026
Merged

[Multi_K8s-Plugin] Config hash for StatefulSet and DaemonSet#6697
khanhtc1202 merged 2 commits into
pipe-cd:masterfrom
mohammedfirdouss:feat/config-hash-statefulset-daemonset

Conversation

@mohammedfirdouss
Copy link
Copy Markdown
Contributor

@mohammedfirdouss mohammedfirdouss commented Apr 20, 2026

What this PR does:
Extends the config hash annotation feature in the kubernetes_multicluster plugin to cover StatefulSet and DaemonSet workloads, in addition to the existing Deployment support.

When a ConfigMap or Secret referenced by a workload changes, PipeCD annotates the workload's pod template with a hash of the config content triggering a rollout automatically. Before this change, only Deployments received this annotation. StatefulSets and DaemonSets were silently skipped (a TODO comment in annotate.go line 55 noted this gap).

Why we need it:
StatefulSets and DaemonSets can reference ConfigMaps and Secrets just like Deployments. Without this fix, changes to those config resources would not trigger a restart of StatefulSet or DaemonSet pods, leaving them running stale configuration silently.

Which issue(s) this PR fixes:

Related to #6446

Does this PR introduce a user-facing change?:

  • How are users affected by this change: StatefulSet and DaemonSet pods now automatically restart when a referenced ConfigMap or Secret changes, matching the existing behaviour for Deployments.
  • Is this breaking change: No
  • How to migrate (if breaking change): N/A

Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
@mohammedfirdouss mohammedfirdouss requested a review from a team as a code owner April 20, 2026 08:02
@mohammedfirdouss mohammedfirdouss changed the title [Multi_K8s-Plugin] Add StatefulSet and DaemonSet support for config hash annotation [Multi_K8s-Plugin] Config hash for StatefulSet and DaemonSet Apr 20, 2026
Copy link
Copy Markdown
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@khanhtc1202 khanhtc1202 merged commit 366de96 into pipe-cd:master Apr 21, 2026
45 checks passed
@github-actions github-actions Bot mentioned this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants