-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
🌱 Register kubeconfig flag variable via RegisterFlags func #1999
🌱 Register kubeconfig flag variable via RegisterFlags func #1999
Conversation
Signed-off-by: Johannes Frey <johannes.frey@mercedes-benz.com>
5415942
to
2ca6bec
Compare
/test pull-controller-runtime-test-master |
/retest |
/label do-not-merge/work-in-progress |
@johannesfrey: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I think if you move [WIP] to be a prefix it should work automatically |
/retitle [WIP] 🌱 Register kubeconfig flag variable via RegisterFlags func |
Yeah, I had it like that but then workflow complains 😅 |
This can be fixed/changed by bumping kubebuilder-release-tools to v0.2.0: https://github.com/kubernetes-sigs/controller-runtime/blob/master/.github/workflows/verify.yml#L12 |
/retest |
1 similar comment
/retest |
Signed-off-by: Johannes Frey <johannes.frey@mercedes-benz.com>
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.
thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, johannesfrey 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 have been reported issues (
flag redefined
) because CR registers thekubeconfig
flag to the default command line FlagSet via init function. See:This PR provides an exported func to register flags that defensively tries to register the kubeconfig flag if not already defined. It does only change the current behaviour by previously checking if has already been defined.
As a follow up the registration via init should probably removed in conjunction with a⚠️ release note, as it would be a breaking change for the user.
NOTE: I am not entirely sure if this really is the desired way to go and to start a discussion regarding the topic.
Johannes Frey <johannes.frey@mercedes-benz.com>, Mercedes-Benz Tech Innovation GmbH (Provider Information)