Repository navigation
Extend kubectl-style resource args to all Flux kinds and commands - #6135
Merged
Merged
Conversation
Resolve kubectl-style resource arguments through a table of Flux kinds, so sources and image types work in get and reconcile, e.g. "flux reconcile gitrepo/flux-system". Reject additional resource arguments instead of silently ignoring them. Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Extend kubectl-style resource arguments to the suspend, resume, export and delete commands. Suspend and resume accept several TYPE/NAME arguments of the same kind, e.g. "flux suspend gitrepo/podinfo gitrepo/flux-system". Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
The export loop returned after printing the first secret, so only the first source with credentials was exported. Print every source and each referenced secret once. Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
The envtest kubeconfig was always written to /tmp/kubeconfig-1ns, so concurrent test runs used each other's API servers. Write it to a unique temporary file and remove it when the test env stops. Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com> Co-authored-by: Nikolaus Schuetz <nikolauspschuetz@gmail.com>
The get, reconcile, delete and export commands read only the first name and silently ignored the rest. Process every name like suspend and resume do: report each failure, keep going, and return an error if any name failed. Several TYPE/NAME arguments of the same kind are accepted by all commands. Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com> Co-authored-by: immanuwell <pchpr.00@list.ru>
Commands like "flux reconcile kustomizations podinfo" failed because reconcile takes the singular form. When cobra finds no sub-command for a known Flux type name, map it like a TYPE/NAME argument. Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Replace flux-system in the new examples, which reads like a namespace. Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
matheuscscp
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#6134 resolved TYPE/NAME arguments only for direct children of
getandreconcile, so sources and image types were not supported. This PR resolves them through a table of Flux kinds and extends the syntax to the other resource commands.Examples:
Solved issues:
Superseded PRs (original authors are credited on commits with
Co-authored-by):