controller-runtime icon indicating copy to clipboard operation
controller-runtime copied to clipboard

Import of controller-runtime calls flag for "kubeconfig"

Open chrischdi opened this issue 4 years ago • 13 comments

Hi there :-),

we are consuming cluster-api-provider-openstack which imports kubernetes-sigs/controller-runtime.

Because alias.go is importing sigs.k8s.io/controller-runtime/pkg/client/config it always defines the "kubeconfig" flag which then conflicts with other places where the same flag is getting defined. (e.g. inside kubernetes' e2e test framework https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/test_context.go#L321)

Of course we are able to workaround it by not directly using the functions via alias.go but I think this is against the reasons why it does exist?

One alternative would be to define a RegisterFlag function instead of defining the flag via func init() {...}, however this leads to a breaking change.

Christian Schlotter , Daimler TSS GmbH, Imprint

chrischdi avatar Feb 24 '21 07:02 chrischdi

Addition: the same thing happens when importing sigs.k8s.io/cluster-api/api/v1alpha4 (sorry, I did write cluster-api-provider-openstack here first but mixed up the repos).

chrischdi avatar Feb 25 '21 06:02 chrischdi

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

fejta-bot avatar May 26 '21 08:05 fejta-bot

/remove-lifecycle stale

chrischdi avatar Jun 02 '21 16:06 chrischdi

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Aug 31 '21 17:08 k8s-triage-robot

/remove-lifecycle stale

chrischdi avatar Aug 31 '21 18:08 chrischdi

/kind feature

palnabarun avatar Oct 06 '21 16:10 palnabarun

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 04 '22 16:01 k8s-triage-robot

/remove-lifecycle stale

chrischdi avatar Jan 18 '22 07:01 chrischdi

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Apr 18 '22 08:04 k8s-triage-robot

/remove-lifecycle stale

mk46 avatar Apr 20 '22 09:04 mk46

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jul 19 '22 09:07 k8s-triage-robot

/remove-lifecycle stale

mk46 avatar Jul 19 '22 13:07 mk46

FYI: I created following PR: https://github.com/kubernetes-sigs/controller-runtime/pull/1999

johannesfrey avatar Sep 13 '22 07:09 johannesfrey

Should we close this issue now that #1999 has been merged? Or should we keep this issue open until the init function is removed completely (if this is desired at all)?

johannesfrey avatar Oct 27 '22 07:10 johannesfrey

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 25 '23 08:01 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Feb 24 '23 08:02 k8s-triage-robot

Should we close this issue now that #1999 has been merged? Or should we keep this issue open until the init function is removed completely (if this is desired at all)?

Sorry for the late reply. I'm not sure if we want to drop the init function.

Pro:

  • it would be better if no flags are just implicitly registered because someone imports the config package

Con:

  • nobody seems to complain about it so it seems to work for most people

On the other hand, I think almost all controller are just run inside of a Pod and barely anyone is using a --kubeconfig command line flag.

IIRC component-base/logs also dropped the implicit registering of flags. So I'm slightly in favor of getting rid of the implicit flag registration (after whatever deprecation period / release notes it is appropriate)

@alvaroaleman @vincepri WDYT?

sbueringer avatar Mar 02 '23 17:03 sbueringer

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Apr 01 '23 18:04 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

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.

k8s-ci-robot avatar Apr 01 '23 18:04 k8s-ci-robot