Repository navigation
Accept TYPE/NAME resource args in get/reconcile - #6134
Merged
stefanprodan merged 1 commit intoOct 22, 2026
Merged
Conversation
Allow the get and reconcile commands to take kubectl-style resource arguments, e.g. "flux get hr/podinfo" or "flux reconcile helmreleases.helm.toolkit.fluxcd.io/podinfo", so that commands from kubectl history can be reused. The arguments are rewritten to the existing "TYPE NAME" form before cobra dispatches, so sub-command flags and behavior are unchanged. An optional API version and group are checked against the registered Flux types. Arguments that don't match are left as they are. Signed-off-by: Souvik Biswas <souvikbiswas.dev@gmail.com>
stefanprodan
approved these changes
Oct 22, 2026
stefanprodan
left a comment
Member
There was a problem hiding this comment.
LGTM
Thanks @souvik-biswas-dev 🏅
PS. This partially covers the Flux type, we'll do a followup for the nested source/image commands.
Contributor
Author
|
Thanks for the quick review and the merge @stefanprodan Glad it's useful. If you're okay with it, I'd be happy to pick up the follow-up for the nested source/image commands (like |
Member
|
@souvik-biswas-dev I'm going to do a followup for this |
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.
Part of: #6130
flux getandflux reconcilenow accept kubectl-styleTYPE/NAMEresource arguments, so commands copied fromkubectlhistory work as-is. For example,flux get hr/podinfoandflux reconcile helmreleases.helm.toolkit.fluxcd.io/podinfonow behave the same asflux get helmrelease podinfoandflux reconcile helmrelease podinfo.How: the arguments are rewritten to the existing "TYPE NAME" form before cobra dispatches, so sub-command flags and behavior are unchanged. An optional API version and group are checked against the registered Flux types. Arguments that don't match are left as they are.
Scope: get and reconcile for runnable resource types; nested groups like "source git" aren't covered yet.
Tests: unit tests for the parsing and envtest tests comparing the new forms to the existing ones.