-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Introduce possibility to create clusterctl plugins #8957
✨ Introduce possibility to create clusterctl plugins #8957
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need some time to look at additional transitive dependencies + test; in the meantime, it will be great if you can document plugins in https://cluster-api.sigs.k8s.io/clusterctl/provider-contract.html (might be there is a better place)
|
Tested this PR locally and it seems working right. |
Dependency seems ok (they are all already k8s deps) The only tricky one is sigs.k8s.io/kustomize/kustomize/v5 v5.0.1, which is big one, so I will ask other maintainers for an opinion on it (I'm +1) Also, the PR is lacking the necessary doc + test, so we should consider if to get this merged before code-freeze if @alexander-demicev can follow up in the next two weeks at least for docs (I'm +1) cc @CecileRobertMichon @sbueringer @killianmuldoon @enxebre @vincepri |
I'm +1 as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some documentation, most of what is described in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 3088c09ace205b3ce91afaee4810f7f1fd06d9db
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this!
/lgtm |
What this PR does / why we need it:
We would like
clusterctl
to support bootstrapping a management cluster using the CAPI Operator, but at the same time, we'd like to avoid introducing new code toclusterctl
for maintenance reasons (dependencies, etc.). One possible option for us is to enable the creation ofclusterctl
plugins in a similar way to kubectl.This PR introduces a change that enables the creation of such plugins. The code relies on the
kubectl
package and borrows some code from it, specifically https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/cmd.go#L115. In the current implementation, it will only be possible to create plugins for theclusterctl
commands and not for subcommands.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #