We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6f672e commit c2d6b2cCopy full SHA for c2d6b2c
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesFactoryAdapter.java
@@ -107,8 +107,9 @@ public KubernetesClient createClient() throws KubernetesAuthException {
107
LOGGER.log(FINE, "Autoconfiguring Kubernetes client");
108
builder = new ConfigBuilder(Config.autoConfigure(null));
109
} else {
110
- // Using Config.empty() disables autoconfiguration
111
- builder = new ConfigBuilder(Config.empty()).withMasterUrl(serviceAddress);
+ // Using Config.empty() disables autoconfiguration when both serviceAddress and auth are set
+ builder = auth == null ? new ConfigBuilder() : new ConfigBuilder(Config.empty());
112
+ builder = builder.withMasterUrl(serviceAddress);
113
}
114
115
if (auth != null) {
0 commit comments