Skip to content

feat: show Flux inventory resources with navigation - #613

Merged
nklmilojevic merged 1 commit into
mainfrom
feat/flux-inventory-561
Sep 16, 2026
Merged

nklmilojevic merged 1 commit into
mainfrom
feat/flux-inventory-561

Conversation

@nklmilojevic

Copy link
Copy Markdown
Owner

The Flux view shows the reconciliation chain but does not list the resources in the owner inventory. This change adds a Managed resources section for Kustomization and HelmRelease objects. Press Enter on an entry to open its resource view.

The list uses .status.inventory.entries without reading each managed resource. Navigation resolves API group, kind, and namespace through cluster discovery. Entries for unknown kinds or invalid scopes show warnings. Inventories with spec.kubeConfig remain visible but have no local navigation targets.

The list shows up to 500 entries and reports the omitted count. Live status and child expansion are outside this change.

Validation: Rust formatting, Clippy with warnings denied, and the full test suite. Three new tests cover navigation for both Flux kinds, API group collisions, namespace scope, remote cluster settings, invalid or absent entries, refresh, and large lists. No live cluster test was run.

Closes #612

Agreed discussion: #561

Read the owner inventory in the Flux view and provide resource targets by API group and namespace. Prevent local navigation for remote cluster inventories and report entries that cannot be resolved.

Closes #612
@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a Managed resources section to the Flux GitOps view for Kustomization and HelmRelease inventories.

  • Parses and displays up to 500 inventory entries without fetching each managed object.
  • Resolves navigation targets through group-aware cluster discovery and validates resource scope.
  • Disables local navigation for owners configured to reconcile against remote clusters.
  • Adds coverage for API-group collisions, scope handling, malformed inventories, refresh behavior, and list limits.
  • Documents the feature and its operational limitations.

Confidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, or repository-rule failures remain.

Group-qualified discovery, explicit scope checks, remote-cluster gating, bounded output, and focused tests support the new inventory-navigation behavior without exposing an established failure.

Important Files Changed
Filename Overview
src/app/gitops.rs Builds a group-aware discovery map and appends inventory findings to asynchronously gathered Flux results.
src/gitops.rs Parses, limits, validates, and creates navigation targets for Flux inventory entries.
src/app/tests/flux.rs Adds focused coverage for inventory navigation, malformed and remote inventories, refreshes, collisions, scopes, and list limits.
docs/features.md Documents managed-resource inventory display, navigation behavior, limits, and remote-cluster restrictions.
Sequence Diagram
sequenceDiagram
    actor User
    participant App
    participant API as Kubernetes API
    participant Discovery as Cluster discovery
    participant View as GitOps view

    User->>App: Open or refresh GitOps view
    App->>API: Read selected resource
    App->>API: Resolve and read Flux owner
    App->>Discovery: Build kind/group navigation map
    App->>App: Parse owner status.inventory.entries
    App->>View: Display up to 500 managed resources
    User->>View: Press Enter on inventory entry
    alt Local owner and valid discovered scope
        View->>App: Navigate using qualified plural, namespace, and name
    else Remote owner or invalid/unavailable kind
        View->>User: Show warning without navigation target
    end
Loading

Reviews (1): Last reviewed commit: "feat: show Flux inventory resources with..." | Re-trigger Greptile

@nklmilojevic
nklmilojevic merged commit d979f43 into main Sep 16, 2026
4 checks passed
@nklmilojevic
nklmilojevic deleted the feat/flux-inventory-561 branch September 16, 2026 12:52
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.

feat: show Flux inventory resources with navigation

1 participant