Skip to content

Commit

Permalink
Merge pull request #1302 from Vlatombe/JENKINS-70493
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlatombe authored Jan 27, 2023
2 parents 43e9e49 + c2d6b2c commit 7ff395e
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,9 @@ public KubernetesClient createClient() throws KubernetesAuthException {
LOGGER.log(FINE, "Autoconfiguring Kubernetes client");
builder = new ConfigBuilder(Config.autoConfigure(null));
} else {
// although this will still autoconfigure based on Config constructor notes
// In future releases (2.4.x) the public constructor will be empty.
// The current functionality will be provided by autoConfigure().
// This is a necessary change to allow us distinguish between auto configured values and builder values.
builder = new ConfigBuilder().withMasterUrl(serviceAddress);
// Using Config.empty() disables autoconfiguration when both serviceAddress and auth are set
builder = auth == null ? new ConfigBuilder() : new ConfigBuilder(Config.empty());
builder = builder.withMasterUrl(serviceAddress);
}

if (auth != null) {
Expand Down

0 comments on commit 7ff395e

Please sign in to comment.