Skip to content

fix: enable Flux actions for HelmChart resources - #611

Merged
nklmilojevic merged 2 commits into
mainfrom
fix/610-helmchart-actions
Sep 16, 2026
Merged

nklmilojevic merged 2 commits into
mainfrom
fix/610-helmchart-actions

Conversation

@nklmilojevic

@nklmilojevic nklmilojevic commented Sep 16, 2026

Copy link
Copy Markdown
Owner

HelmChart resources could not open the Flux action menu because the supported resource list omitted helmcharts. Enable the existing actions so users can suspend, resume, and reconcile selected or marked charts with t.

Check both the API group and resource plural before opening the Flux menu. This prevents unrelated CRDs with the same plural from receiving Flux patches. Tests cover each supported resource in its correct group, an unrelated group, and an incorrect Flux group.

Update the help text and documentation. Tests also check the API paths and patch bodies for all three actions, cancellation, read-only mode, and the restriction of force reconcile to Flux HelmRelease resources.

Validation: just check (format check, Clippy with warnings denied, and the full test suite).

Closes #610

Discussion and approved scope: #605. The maintainer approved implementation in the work request.

HelmChart was missing from the supported Flux resource list. Enable suspend, resume, and reconcile through the existing API patches, with tests and help updates.

Closes #610
@nklmilojevic
nklmilojevic marked this pull request as ready for review September 16, 2026 12:29
@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR enables existing Flux suspend, resume, and reconcile actions for HelmChart resources while tightening eligibility to exact Flux API group/resource pairs.

  • Adds source.toolkit.fluxcd.io/helmcharts to the Flux action-menu gate.
  • Prevents same-plural resources from unrelated or incorrect API groups from receiving Flux actions.
  • Adds action, bulk-selection, cancellation, read-only, and force-reconcile coverage.
  • Updates user-facing help and feature documentation.

Confidence Score: 5/5

The PR appears safe to merge; the previous API-group eligibility issue is fully addressed and no new actionable failures remain.

Flux action eligibility now requires the exact supported API group and plural, and the added tests verify that matching plurals in unrelated or incorrect Flux groups cannot open the menu. The previously reported plural-only gate is therefore fully fixed.

Important Files Changed
Filename Overview
src/app/helpers.rs Replaces plural-only Flux eligibility with exact API group and resource matching, including HelmChart.
src/app/tests/flux.rs Covers HelmChart action requests and verifies API-group isolation, cancellation, read-only behavior, and force-reconcile restrictions.
src/app/mod.rs Removes the obsolete plural-only Flux resource allowlist.
src/app/actions.rs Updates the unsupported-action warning to mention HelmChart.
src/ui.rs Updates contextual help to advertise HelmChart support.
docs/features.md Documents HelmChart among supported Flux resources.
docs/keys.md Updates the action-menu keyboard reference with HelmChart support.
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User presses t] --> B{Selected API group and plural}
    B -->|Recognized Flux resource| C[Open Flux action menu]
    B -->|Other resource identity| D[Show unsupported-resource warning]
    C --> E{Chosen action}
    E -->|Suspend or resume| F[Patch spec.suspend]
    E -->|Reconcile now| G[Patch requestedAt annotation]
    E -->|Force reconcile| H{Flux HelmRelease?}
    H -->|Yes| I[Apply force-reconcile patch]
    H -->|No| J[Action unavailable]
Loading

Reviews (2): Last reviewed commit: "fix: check API groups before enabling Fl..." | Re-trigger Greptile

Comment thread src/app/mod.rs Outdated
"helmreleases",
"gitrepositories",
"helmrepositories",
"helmcharts",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Flux gate ignores API group

If an unrelated CRD uses the helmcharts plural in another API group, this plural-only allowlist exposes the Flux action menu for it. Suspend and resume then patch an unsupported spec.suspend field, while reconcile adds a Flux-specific annotation, resulting in an API error or a misleading successful no-op. Include the Flux API group in the eligibility check.

Resource plurals can also belong to unrelated CRDs. Match each supported Flux resource to its API group before opening the action menu, and test valid and conflicting groups through keyboard input.
@nklmilojevic
nklmilojevic merged commit e2bb429 into main Sep 16, 2026
4 checks passed
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.

fix: enable Flux actions for HelmChart resources

1 participant