public static String getSystemPropertyOrEnvVar(String systemPropertyName, String defaultValue) { return getSystemPropertyOrEnvVar(systemPropertyName, convertSystemPropertyNameToEnvVar(systemPropertyName), defaultValue); }
public BaseClient(final OkHttpClient httpClient, Config config) throws KubernetesClientException { try { this.httpClient = httpClient; this.namespace = config.getNamespace(); this.configuration = config; this.apiVersion = config.getApiVersion(); if (config.getMasterUrl() == null) { throw new KubernetesClientException("Unknown Kubernetes master URL - " + "please set with the builder, or set with either system property \"" + Config.KUBERNETES_MASTER_SYSTEM_PROPERTY + "\"" + " or environment variable \"" + Utils.convertSystemPropertyNameToEnvVar(Config.KUBERNETES_MASTER_SYSTEM_PROPERTY) + "\""); } this.masterUrl = new URL(config.getMasterUrl()); } catch (Exception e) { throw KubernetesClientException.launderThrowable(e); } }
public static String getSystemPropertyOrEnvVar(String systemPropertyName, String defaultValue) { return getSystemPropertyOrEnvVar(systemPropertyName, convertSystemPropertyNameToEnvVar(systemPropertyName), defaultValue); }
public BaseClient(final OkHttpClient httpClient, Config config) throws KubernetesClientException { try { this.httpClient = httpClient; this.namespace = config.getNamespace(); this.configuration = config; this.apiVersion = config.getApiVersion(); if (config.getMasterUrl() == null) { throw new KubernetesClientException("Unknown Kubernetes master URL - " + "please set with the builder, or set with either system property \"" + Config.KUBERNETES_MASTER_SYSTEM_PROPERTY + "\"" + " or environment variable \"" + Utils.convertSystemPropertyNameToEnvVar(Config.KUBERNETES_MASTER_SYSTEM_PROPERTY) + "\""); } this.masterUrl = new URL(config.getMasterUrl()); } catch (Exception e) { throw KubernetesClientException.launderThrowable(e); } }