File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/main/java/org/csanchez/jenkins/plugins/kubernetes Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,9 @@ public KubernetesClient createClient() throws KubernetesAuthException {
107107 LOGGER .log (FINE , "Autoconfiguring Kubernetes client" );
108108 builder = new ConfigBuilder (Config .autoConfigure (null ));
109109 } else {
110- // although this will still autoconfigure based on Config constructor notes
111- // In future releases (2.4.x) the public constructor will be empty.
112- // The current functionality will be provided by autoConfigure().
113- // This is a necessary change to allow us distinguish between auto configured values and builder values.
114- builder = new ConfigBuilder ().withMasterUrl (serviceAddress );
110+ // Using Config.empty() disables autoconfiguration when both serviceAddress and auth are set
111+ builder = auth == null ? new ConfigBuilder () : new ConfigBuilder (Config .empty ());
112+ builder = builder .withMasterUrl (serviceAddress );
115113 }
116114
117115 if (auth != null ) {
You can’t perform that action at this time.
0 commit comments