Skip to content

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

Closed as not planned
@chrischdi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions