Skip to content

flux: Add setting to allow actions on Flux-managed resources - #1366

Open
DhruvShetty22 wants to merge 2 commits into
headlamp-k8s:mainfrom
DhruvShetty22:flux-allow-managed-actions
Open

DhruvShetty22 wants to merge 2 commits into
headlamp-k8s:mainfrom
DhruvShetty22:flux-allow-managed-actions

Conversation

@DhruvShetty22

@DhruvShetty22 DhruvShetty22 commented Oct 17, 2026 •

Copy link
Copy Markdown

Since flux 0.7.0 (#579), the Edit, Scale, Delete and Rollback actions are hidden on resources managed by Flux, to avoid drift from the state in Git.

This PR adds an opt-in plugin setting, off by default, that brings those actions back. The "Flux managed" chip stays visible as a reminder that Flux will revert the changes.

Fixes #1293

Screenshots

Before:
2026-10-17-180726_hyprshot
After:
image
Setting:
2026-10-17-182810_hyprshot

Notes for the Reviewer

  • The default is off, so existing users see no change and the anti-drift behaviour from Flux block changing owned resources #579 stays the default.
  • This is one global setting( A per-cluster setting).
  • Changes apply without reloading Headlamp.

Since 0.7.0 the plugin hides Edit, Scale, Delete and Rollback on
resources managed by Flux, to avoid drifting from the state in Git.
Some users rely on those actions to try out changes in test or QA
clusters.

Add an "allowFluxManagedActions" setting, off by default, under a new
"Resource actions" section in the plugin settings, with a note that
Flux reverts such changes. It is wired up to the header actions in
the next commit.

Signed-off-by: Dhruv Shetty <sdhruv23@iitk.ac.in>
When "allowFluxManagedActions" is on, keep the Edit, Scale, Delete and
Rollback header actions on Flux-managed resources instead of hiding
them. The "Flux managed" chip stays, in warning colour, with a tooltip
saying that changes will be reverted on the next reconciliation, so
users still know they are changing a resource that Flux owns. The
read-only View YAML button is only added when the edit actions are
hidden, as Edit already shows the YAML.

With the setting off, which is the default, nothing changes.

Move the processing into processFluxHeaderActions() so it can be unit
tested without registering the processor, and document the setting in
the README.

Signed-off-by: Dhruv Shetty <sdhruv23@iitk.ac.in>
@DhruvShetty22

Copy link
Copy Markdown
Author

@illume Tagging you for review.
This could be a great addition for users that relied on those actions to try out changes in test or QA clusters.

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.

Re-Enable edit buttons for flux-managed resources

1 participant