Skip to content

[Multi_K8s-Plugin] Fix livestate drift detection and resource filtering#6673

Merged
khanhtc1202 merged 8 commits into
pipe-cd:masterfrom
mohammedfirdouss:feat/fix-livestate-drift-detection
Apr 21, 2026
Merged

[Multi_K8s-Plugin] Fix livestate drift detection and resource filtering#6673
khanhtc1202 merged 8 commits into
pipe-cd:masterfrom
mohammedfirdouss:feat/fix-livestate-drift-detection

Conversation

@mohammedfirdouss
Copy link
Copy Markdown
Contributor

@mohammedfirdouss mohammedfirdouss commented Apr 15, 2026

What this PR does:
Implements two missing livestate features in the kubernetes_multicluster plugin, porting them from the single-cluster kubernetes plugin:

  1. Drift detection ignore: Resources annotated with pipecd.dev/ignore-drift-detection: "true" are now excluded from drift comparison, matching the behaviour of the single-cluster plugin.
  2. Include/exclude resource filtering: The deploy target config now supports appStateInformer.includeResources and appStateInformer.excludeResources to control which resource types are included in the livestate drift check.

Why we need it:
Without drift detection ignore, applications with resources that are expected to drift at runtime (e.g. HPAs, Jobs managed by external controllers) would always show as OutOfSync in the PipeCD UI, even when everything is working correctly. Without include/exclude filtering, there was no way to scope the drift check to the resource types that matter for a given deploy target.

Which issue(s) this PR fixes:

Fixes #6446

Does this PR introduce a user-facing change?:

  • How are users affected by this change: Users can now annotate resources with pipecd.dev/ignore-drift-detection: "true" to exclude them from drift detection. Users can also configure appStateInformer.includeResources and appStateInformer.excludeResources per deploy target to scope the livestate comparison.
  • Is this breaking change: No
  • How to migrate (if breaking change): N/A

…ce filtering

Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
@mohammedfirdouss
Copy link
Copy Markdown
Contributor Author

@khanhtc1202 @Warashi This is ready for review.

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.

LGTM, thanks

@khanhtc1202 khanhtc1202 enabled auto-merge (squash) April 21, 2026 07:08
@khanhtc1202 khanhtc1202 merged commit e9d8065 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.

[LFX Mentorship T-1 2026] Kubernetes Multi-Cluster Plugin #6446

2 participants