Skip to content

Conversation

@IvoGoman
Copy link
Contributor

@IvoGoman IvoGoman commented Oct 17, 2025

Description

all reconciliation is skipped if suspend annotation is set. This includes regular reconciliation and deletion. Deletion may be handled after the annotation is removed.

For controllers such as Catalog/Plugin the provisioned Flux resources are suspended as well. Ensuring no changes are performed in-cluster or on remote clusters.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@IvoGoman IvoGoman requested a review from a team as a code owner October 17, 2025 15:31
@IvoGoman IvoGoman force-pushed the feat/reconcile-actions branch from 8a9c0c0 to 056f0b9 Compare October 17, 2025 16:00
@abhijith-darshan
Copy link
Contributor

abhijith-darshan commented Oct 17, 2025

Maybe we could do this in lifecycle pkg instead? If suspend annotation exists then each greenhouse object can implement the suspend interface to set the necessary suspend field. Wdyt?

Along the same lines of skip reconcile etc…

@IvoGoman
Copy link
Contributor Author

Maybe we could do this in lifecycle pkg instead? If suspend annotation exists then each greenhouse object can implement the suspend interface to set the necessary suspend field. Wdyt?

Along the same lines of skip reconcile etc…

The EnsureSuspended(..) is part of the reconciler interface of the lifecycle package. The Reconcile(..) ensures suspend logic of the individual controllers is called before anything else. That way the suspending can be handled in EnsureSuspended(..) and the EnsureCreated(..) ensures that reconciliation is resumed also for child resources.
By default now the Suspend Logic is "just" skipping reconciliation. But for some resources (Plugin/Catalog) it also ensures that child resources will be suspended.
Kept it as an annotation so suspending/resuming the resource would be the same interaction via kubectl. Copying this to a spec Field in the resource would also allow us to interact with the resource from UI/kubectl without a CD tool detecting a drift.

For the reconcile we could think about keeping the annotation. That way the UI could set a timestamp when a reconcile is requested for the Plugin. So that the controller does the needful. For kubectl interaction the annotation would need to be updated. Then we can in the first place ensure that this annotation will always trigger reconciliation on the resources and we can set the reconcile annotation on managed flux resources if they have changed.

@IvoGoman IvoGoman added this to the Deployment tool switch milestone Oct 22, 2025
@uwe-mayer
Copy link
Contributor

Nice, thx for adding this!
I am sure you have thought about it: Can we have some kind of docs on how this works?

@IvoGoman
Copy link
Contributor Author

Nice, thx for adding this! I am sure you have thought about it: Can we have some kind of docs on how this works?

Started to look into refactoring the docs as a whole. New entries are currently logged here: #1521

all reconciliation is skipped if suspend annotation is set.
This includes regular reconciliation and deletion. Deletion
may be handled after the annotation is removed.

For controllers such as Catalog/Plugin the provisioned
Flux resources are suspended as well. Ensuring no changes
are performed in-cluster or on remote clusters.
@IvoGoman IvoGoman force-pushed the feat/reconcile-actions branch from 244d867 to a8f9130 Compare October 27, 2025 15:36
Copy link
Contributor

@abhijith-darshan abhijith-darshan left a comment

Choose a reason for hiding this comment

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

🚀

(P.S - We need a follow-up ticket to update the E2E's for Plugin & Catalog)

@IvoGoman IvoGoman merged commit 79345e3 into main Oct 28, 2025
20 checks passed
@IvoGoman IvoGoman deleted the feat/reconcile-actions branch October 28, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] - Plugin can be suspended [FEAT] - Annotation to skip/ignore resources during reconciliation

4 participants