Repository navigation
Conversation
|
@estroz: GitHub didn't allow me to request PR reviews from the following users: akoserwal, DirectXMan12. Note that only operator-framework members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn 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. |
ae4665c to
e718209
Compare
e718209 to
ef61373
Compare
flag.FlagSet instead of global--kubeconfig flag
jmrodri
left a comment
There was a problem hiding this comment.
overall lgtm, I would add a test though. And confirm or deny my understanding of the flag parsing. If I misunderstood it, then we should add a changelog entry. If not, no changelog entry required.
786d4f9 to
3046e84
Compare
|
|
||
| f "github.com/operator-framework/operator-sdk/pkg/test" | ||
|
|
||
| // This import tests double-registration of the --kubebuilder flag: |
There was a problem hiding this comment.
@jmrodri @camilamacedo86 confirmed that this import causes a panic w/o these changes.
pkg/client/config is imported (set up in an init() function). The SDK's test framework also adds this flag, which will panic if both are imported and the test framework is initialized. This commit only registers --kubeconfig if it is not already registered, and gets its value if so. pkg/test: only register --kubeconfig if not registered, get value if already registered test/e2e: add import of controller-runtime/pkg/client/config to test --kubebuilder registration CHANGELOG.md: add --kubeconfig double registration fix
6fb7e20 to
f20560c
Compare
|
Hi @akieling, SDK is in the version 0.18.2 already. So, 0.15.x is quite old and we would like to recommend you uprade your project. |
|
OK @camilamacedo86 . Thanks for the quick reply. |
Description of the change:
--kubeconfigif not registered, get value if already registeredMotivation for the change: controller-runtime currently adds the
--kubeconfigflag ifpkg/client/configis imported (set up in aninit()function). The SDK's test framework also adds this flag, which will panic if both packages are imported and the test framework is initialized.Closes: kubernetes-sigs/controller-runtime#878
/cc @joelanford @camilamacedo86 @DirectXMan12 @akoserwal
/kind bug