Skip to content

🌱 Register kubeconfig flag variable via RegisterFlags func - #1999

Merged
k8s-ci-robot merged 3 commits into
kubernetes-sigs:masterfrom
mercedes-benz:register-kubeconfig-flag
Oct 26, 2022
Merged

k8s-ci-robot merged 3 commits into
kubernetes-sigs:masterfrom
mercedes-benz:register-kubeconfig-flag

Conversation

@johannesfrey

@johannesfrey johannesfrey commented Sep 13, 2022 •

Copy link
Copy Markdown
Contributor

There have been reported issues (flag redefined) because CR registers the kubeconfig 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 <[email protected]>, Mercedes-Benz Tech Innovation GmbH (Provider Information)

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 13, 2022
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 13, 2022
@johannesfrey
johannesfrey force-pushed the register-kubeconfig-flag branch from 5415942 to 2ca6bec Compare September 15, 2022 07:20
@johannesfrey

Copy link
Copy Markdown
Contributor Author

/test pull-controller-runtime-test-master

@johannesfrey

Copy link
Copy Markdown
Contributor Author

/retest

@johannesfrey johannesfrey changed the title [WIP] 🌱 Register kubeconfig flag variable via RegisterFlags func 🌱 [WIP] Register kubeconfig flag variable via RegisterFlags func Sep 20, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 20, 2022
@johannesfrey

Copy link
Copy Markdown
Contributor Author

/label do-not-merge/work-in-progress

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@johannesfrey: The label(s) /label do-not-merge/work-in-progress cannot be applied. These labels are supported: api-review, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, team/katacoda, refactor

Details

In response to this:

/label do-not-merge/work-in-progress

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.

@sbueringer

Copy link
Copy Markdown
Member

/label do-not-merge/work-in-progress

I think if you move [WIP] to be a prefix it should work automatically

@sbueringer

Copy link
Copy Markdown
Member

/retitle [WIP] 🌱 Register kubeconfig flag variable via RegisterFlags func

@k8s-ci-robot k8s-ci-robot changed the title 🌱 [WIP] Register kubeconfig flag variable via RegisterFlags func [WIP] 🌱 Register kubeconfig flag variable via RegisterFlags func Sep 20, 2022
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 20, 2022
@johannesfrey

Copy link
Copy Markdown
Contributor Author

/label do-not-merge/work-in-progress

I think if you move [WIP] to be a prefix it should work automatically

Yeah, I had it like that but then workflow complains 😅

@sbueringer

Copy link
Copy Markdown
Member

/label do-not-merge/work-in-progress

I think if you move [WIP] to be a prefix it should work automatically

Yeah, I had it like that but then workflow complains sweat_smile

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

@johannesfrey johannesfrey changed the title [WIP] 🌱 Register kubeconfig flag variable via RegisterFlags func 🌱 Register kubeconfig flag variable via RegisterFlags func Oct 6, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 6, 2022
@johannesfrey

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@johannesfrey

Copy link
Copy Markdown
Contributor Author

/retest

Comment thread pkg/client/config/config.go Resolved
@alvaroaleman alvaroaleman added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Oct 26, 2022

@alvaroaleman alvaroaleman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 26, 2022
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants