Skip to content

Import of controller-runtime calls flag for "kubeconfig" #1396

Closed as not planned

Description

@chrischdi

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

Activity

  1. chrischdi commented on Feb 25, 2021

    @chrischdi
    MemberAuthor

    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).

  2. fejta-bot commented on May 26, 2021

    @fejta-bot

    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

  3. added
    lifecycle/stale
    on May 26, 2021
  4. chrischdi commented on Jun 2, 2021

    @chrischdi
    MemberAuthor

    /remove-lifecycle stale

  5. removed
    lifecycle/stale
    on Jun 2, 2021
  6. k8s-triage-robot commented on Aug 31, 2021

    @k8s-triage-robot

    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

  7. added
    lifecycle/stale
    on Aug 31, 2021
  8. chrischdi commented on Aug 31, 2021

    @chrischdi
    MemberAuthor

    /remove-lifecycle stale

  9. removed
    lifecycle/stale
    on Aug 31, 2021
  10. palnabarun commented on Oct 6, 2021

    @palnabarun
    Member

    /kind feature

  11. added
    kind/feature
    on Oct 6, 2021
  12. k8s-triage-robot commented on Jan 4, 2022

    @k8s-triage-robot

    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

  13. added
    lifecycle/stale
    on Jan 4, 2022
  14. chrischdi commented on Jan 18, 2022

    @chrischdi
    MemberAuthor

    /remove-lifecycle stale

  15. removed
    lifecycle/stale
    on Jan 18, 2022
  16. 4 remaining items

  17. k8s-triage-robot commented on Jul 19, 2022

    @k8s-triage-robot

    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

  18. added
    lifecycle/stale
    on Jul 19, 2022
  19. mk46 commented on Jul 19, 2022

    @mk46

    /remove-lifecycle stale

  20. removed
    lifecycle/stale
    on Jul 19, 2022
  21. johannesfrey commented on Sep 13, 2022

    @johannesfrey
    Contributor

    FYI: I created following PR: #1999

  22. johannesfrey commented on Oct 27, 2022

    @johannesfrey
    Contributor

    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)?

  23. k8s-triage-robot commented on Jan 25, 2023

    @k8s-triage-robot

    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

  24. added
    lifecycle/stale
    on Jan 25, 2023
  25. k8s-triage-robot commented on Feb 24, 2023

    @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

  26. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Feb 24, 2023
  27. sbueringer commented on Mar 2, 2023

    @sbueringer
    Member

    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?

  28. k8s-triage-robot commented on Apr 1, 2023

    @k8s-triage-robot

    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

  29. k8s-ci-robot commented on Apr 1, 2023

    @k8s-ci-robot
    Contributor

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

    Details

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featurelifecycle/rotten

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions