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

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions