I create a kube config in code with ConfigBuilder, and I don't want to load the default kube config file, so I use the withAutoConfig method of the ConfigBuilder to set the autoConfig to false, but it's not working, the default kube config file still loaded.
after inverstigate, I found the default constructor of the ConfigBuilder will create a new Config
public ConfigBuilder() {
this(new Config());
}
below is the default constructor of the Config, It will get the autoConfig value from system properties or env, not from the configBuilder
Describe the bug
I create a kube config in code with
ConfigBuilder
, and I don't want to load the default kube config file, so I use thewithAutoConfig
method of theConfigBuilder
to set the autoConfig to false, but it's not working, the default kube config file still loaded.after inverstigate, I found the default constructor of the
ConfigBuilder
will create a newConfig
below is the default constructor of the
Config
, It will get the autoConfig value from system properties or env, not from the configBuilderFabric8 Kubernetes Client version
6.12.1
Steps to reproduce
ConfigBuilder
, set the autoConfig to falseExpected behavior
no default kubeConfig file loaded if autoConfig is false
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.23
Environment
Windows
Fabric8 Kubernetes Client Logs
No response
Additional context
No response