Skip to content

Add suspend selector to get commands - #6001

Open
AkashKumar7902 wants to merge 1 commit into
fluxcd:mainfrom
AkashKumar7902:agent/suspend-selector
Open

Add suspend selector to get commands#6001
AkashKumar7902 wants to merge 1 commit into
fluxcd:mainfrom
AkashKumar7902:agent/suspend-selector

Conversation

@AkashKumar7902

Copy link
Copy Markdown

Closes #3886

What

  • Add --suspend-selector=any|suspended|active to flux get, defaulting to any for backward-compatible output.
  • Apply the selector consistently to named resources, leaf commands, aggregate commands, and watch events, in conjunction with label and status selectors.
  • Read the native suspend field for Flux resources, the reconcile-disabled annotation for ArtifactGenerator, and classify ExternalArtifact as active because it has no suspension state.
  • Add exhaustive adapter, command, aggregate, default-reset, invalid-input, and watch coverage.

This is a draft so maintainers can confirm the public flag name and the treatment of resource types without a native suspend field before it is marked ready.

Tests

  • make tidy fmt vet && make test

Local testing

  • Built baseline 1ed703a3 and signed candidate ef1fb5fd twice from commit-authenticated Git archives; each build pair was byte-identical and used SHA-bearing versions.
  • Exercised both binaries against a real Kubernetes 1.36.2 envtest API.
  • Verified baseline default output equals candidate default and explicit any output.
  • Verified active/suspended leaf and aggregate partitions, label/status intersection, special resource semantics, invalid-value rejection before cluster access, and passive-only namespaces.
  • Verified a real API watch suppresses enabled ArtifactGenerator events and emits disabled transitions.

Assisted-by: codex/gpt-5

Add a tri-state suspend selector so users can list any, suspended,
or active Flux resources without parsing table output.

Apply the selector consistently to leaf, aggregate, and watch results,

including types with alternate or unavailable suspension states.

Assisted-by: codex/gpt-5
Signed-off-by: Akash Kumar <meakash7902@gmail.com>
@AkashKumar7902
AkashKumar7902 marked this pull request as ready for review July 20, 2026 00:00
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.

[feature] ability to get suspended resources

1 participant