Skip to content

[Question] It looks like BuildConfigFromFlags already do the fall back to incluster config, why we need to do that explicitly?  #3

Description

@linearregression

In controller:

if kubeconfig != "" {
config, err = clientcmd.BuildConfigFromFlags("", kubeconfig)
} else {
config, err = rest.InClusterConfig()
}

But it looks like:
BuildConfigFromFlags already do the fall back to incluster config as in
https://github.com/kubernetes/client-go/blob/2f45bcbf57f0cfde510a33e7d94a4c89955ff17b/tools/clientcmd/client_config.go#L529-L534

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions