Source:
public KubernetesClient createClient() throws KubernetesAuthException { ConfigBuilder builder; if (StringUtils.isBlank(serviceAddress)) { LOGGER.log(FINE, "Autoconfiguring Kubernetes client"); builder = new ConfigBuilder(Config.autoConfigure(null)); } else { builder = new ConfigBuilder().withMasterUrl(serviceAddress); } if (auth != null) { builder = auth.decorate(builder, new KubernetesAuthConfig(builder.getMasterUrl(), caCertData, skipTlsVerify)); } if (skipTlsVerify) { builder.withTrustCerts(true); } if (caCertData != null) { builder.withCaCertData(Base64.encodeBase64String(caCertData.getBytes(UTF_8))); } builder = builder.withRequestTimeout(readTimeout * 1000).withConnectionTimeout(connectTimeout * 1000); builder.withMaxConcurrentRequestsPerHost(maxRequestsPerHost); if (!StringUtils.isBlank(namespace)) { builder.withNamespace(namespace); } else if (StringUtils.isBlank(builder.getNamespace())) { builder.withNamespace("default"); } LOGGER.log(FINE, "Creating Kubernetes client: {0}", this.toString()); LOGGER.log(FINE, "Proxy Settings for Cloud: " + useJenkinsProxy); if(useJenkinsProxy) { Jenkins jenkins = Jenkins.getInstanceOrNull(); LOGGER.log(FINE, "Jenkins Instance: " + jenkins); if (jenkins != null) { ProxyConfiguration p = jenkins.proxy; LOGGER.log(FINE,"Proxy Instance: " + p); if (p != null) { builder.withWebsocketTimeout(10000); builder.withHttpsProxy("http://" + p.name + ":" + p.port); builder.withHttpProxy("http://" + p.name + ":" + p.port); if (p.name != null) { String password = getProxyPasswordDecrypted(p); builder.withProxyUsername(p.name); builder.withProxyPassword(password); } builder.withNoProxy(p.getNoProxyHost().split("\n")); } } } return new DefaultKubernetesClient(builder.build()); }

Target:
public KubernetesClient createClient() throws KubernetesAuthException { ConfigBuilder builder; if (StringUtils.isBlank(serviceAddress)) { LOGGER.log(FINE, "Autoconfiguring Kubernetes client"); builder = new ConfigBuilder(Config.autoConfigure(null)); } else { builder = new ConfigBuilder().withMasterUrl(serviceAddress); } if (auth != null) { builder = auth.decorate(builder, new KubernetesAuthConfig(builder.getMasterUrl(), caCertData, skipTlsVerify)); } if (skipTlsVerify) { builder.withTrustCerts(true); } if (caCertData != null) { builder.withCaCertData(Base64.encodeBase64String(caCertData.getBytes(UTF_8))); } builder = builder.withRequestTimeout(readTimeout * 1000).withConnectionTimeout(connectTimeout * 1000); builder.withMaxConcurrentRequestsPerHost(maxRequestsPerHost); if (!StringUtils.isBlank(namespace)) { builder.withNamespace(namespace); } else if (StringUtils.isBlank(builder.getNamespace())) { builder.withNamespace("default"); } LOGGER.log(FINE, "Creating Kubernetes client: {0}", this.toString()); LOGGER.log(FINE, "Proxy Settings for Cloud: " + useJenkinsProxy); if(useJenkinsProxy) { Jenkins jenkins = Jenkins.getInstanceOrNull(); LOGGER.log(FINE, "Jenkins Instance: " + jenkins); if (jenkins != null) { ProxyConfiguration p = jenkins.proxy; LOGGER.log(FINE,"Proxy Instance: " + p); if (p != null) { builder.withHttpsProxy("http://" + p.name + ":" + p.port); builder.withHttpProxy("http://" + p.name + ":" + p.port); if (p.name != null) { String password = getProxyPasswordDecrypted(p); builder.withProxyUsername(p.name); builder.withProxyPassword(password); } builder.withNoProxy(p.getNoProxyHost().split("\n")); } } } return new DefaultKubernetesClient(builder.build()); }