public class Config extends Object
Constructor and Description |
---|
Config()
Deprecated.
use
autoConfigure(String) or ConfigBuilder instead |
Config(String masterUrl,
String apiVersion,
String namespace,
boolean trustCerts,
boolean disableHostnameVerification,
String caCertFile,
String caCertData,
String clientCertFile,
String clientCertData,
String clientKeyFile,
String clientKeyData,
String clientKeyAlgo,
String clientKeyPassphrase,
String username,
String password,
String oauthToken,
int watchReconnectInterval,
int watchReconnectLimit,
int connectionTimeout,
int requestTimeout,
long rollingTimeout,
long scaleTimeout,
int loggingInterval,
int maxConcurrentRequests,
int maxConcurrentRequestsPerHost,
boolean http2Disable,
String httpProxy,
String httpsProxy,
String[] noProxy,
Map<Integer,String> errorMessages,
String userAgent,
okhttp3.TlsVersion[] tlsVersions,
long websocketTimeout,
long websocketPingInterval,
String proxyUsername,
String proxyPassword,
String trustStoreFile,
String trustStorePassphrase,
String keyStoreFile,
String keyStorePassphrase,
String impersonateUsername,
String[] impersonateGroups,
Map<String,List<String>> impersonateExtras,
OAuthTokenProvider oauthTokenProvider,
Map<String,String> customHeaders,
int requestRetryBackoffLimit,
int requestRetryBackoffInterval,
int uploadConnectionTimeout,
int uploadRequestTimeout) |
Config(String masterUrl,
String apiVersion,
String namespace,
boolean trustCerts,
boolean disableHostnameVerification,
String caCertFile,
String caCertData,
String clientCertFile,
String clientCertData,
String clientKeyFile,
String clientKeyData,
String clientKeyAlgo,
String clientKeyPassphrase,
String username,
String password,
String oauthToken,
int watchReconnectInterval,
int watchReconnectLimit,
int connectionTimeout,
int requestTimeout,
long rollingTimeout,
long scaleTimeout,
int loggingInterval,
int maxConcurrentRequests,
int maxConcurrentRequestsPerHost,
String httpProxy,
String httpsProxy,
String[] noProxy,
Map<Integer,String> errorMessages,
String userAgent,
okhttp3.TlsVersion[] tlsVersions,
long websocketTimeout,
long websocketPingInterval,
String proxyUsername,
String proxyPassword,
String trustStoreFile,
String trustStorePassphrase,
String keyStoreFile,
String keyStorePassphrase,
String impersonateUsername,
String[] impersonateGroups,
Map<String,List<String>> impersonateExtras)
Deprecated.
|
public static final String KUBERNETES_DISABLE_AUTO_CONFIG_SYSTEM_PROPERTY
Config
object in the default constructorpublic static final String KUBERNETES_MASTER_SYSTEM_PROPERTY
public static final String KUBERNETES_API_VERSION_SYSTEM_PROPERTY
public static final String KUBERNETES_TRUST_CERT_SYSTEM_PROPERTY
public static final String KUBERNETES_DISABLE_HOSTNAME_VERIFICATION_SYSTEM_PROPERTY
public static final String KUBERNETES_CA_CERTIFICATE_FILE_SYSTEM_PROPERTY
public static final String KUBERNETES_CA_CERTIFICATE_DATA_SYSTEM_PROPERTY
public static final String KUBERNETES_CLIENT_CERTIFICATE_FILE_SYSTEM_PROPERTY
public static final String KUBERNETES_CLIENT_CERTIFICATE_DATA_SYSTEM_PROPERTY
public static final String KUBERNETES_CLIENT_KEY_FILE_SYSTEM_PROPERTY
public static final String KUBERNETES_CLIENT_KEY_DATA_SYSTEM_PROPERTY
public static final String KUBERNETES_CLIENT_KEY_ALGO_SYSTEM_PROPERTY
public static final String KUBERNETES_CLIENT_KEY_PASSPHRASE_SYSTEM_PROPERTY
public static final String KUBERNETES_AUTH_BASIC_USERNAME_SYSTEM_PROPERTY
public static final String KUBERNETES_AUTH_BASIC_PASSWORD_SYSTEM_PROPERTY
public static final String KUBERNETES_AUTH_TRYKUBECONFIG_SYSTEM_PROPERTY
public static final String KUBERNETES_AUTH_TRYSERVICEACCOUNT_SYSTEM_PROPERTY
public static final String KUBERNETES_AUTH_SERVICEACCOUNT_TOKEN_FILE_SYSTEM_PROPERTY
public static final String KUBERNETES_OAUTH_TOKEN_SYSTEM_PROPERTY
public static final String KUBERNETES_WATCH_RECONNECT_INTERVAL_SYSTEM_PROPERTY
public static final String KUBERNETES_WATCH_RECONNECT_LIMIT_SYSTEM_PROPERTY
public static final String KUBERNETES_CONNECTION_TIMEOUT_SYSTEM_PROPERTY
public static final String KUBERNETES_UPLOAD_CONNECTION_TIMEOUT_SYSTEM_PROPERTY
public static final String KUBERNETES_UPLOAD_REQUEST_TIMEOUT_SYSTEM_PROPERTY
public static final String KUBERNETES_REQUEST_TIMEOUT_SYSTEM_PROPERTY
public static final String KUBERNETES_REQUEST_RETRY_BACKOFFLIMIT_SYSTEM_PROPERTY
public static final String KUBERNETES_REQUEST_RETRY_BACKOFFINTERVAL_SYSTEM_PROPERTY
public static final String KUBERNETES_ROLLING_TIMEOUT_SYSTEM_PROPERTY
public static final String KUBERNETES_LOGGING_INTERVAL_SYSTEM_PROPERTY
public static final String KUBERNETES_SCALE_TIMEOUT_SYSTEM_PROPERTY
public static final String KUBERNETES_WEBSOCKET_TIMEOUT_SYSTEM_PROPERTY
public static final String KUBERNETES_WEBSOCKET_PING_INTERVAL_SYSTEM_PROPERTY
public static final String KUBERNETES_MAX_CONCURRENT_REQUESTS
public static final String KUBERNETES_MAX_CONCURRENT_REQUESTS_PER_HOST
public static final String KUBERNETES_IMPERSONATE_USERNAME
public static final String KUBERNETES_IMPERSONATE_GROUP
public static final String KUBERNETES_TRUSTSTORE_PASSPHRASE_PROPERTY
public static final String KUBERNETES_TRUSTSTORE_FILE_PROPERTY
public static final String KUBERNETES_KEYSTORE_PASSPHRASE_PROPERTY
public static final String KUBERNETES_KEYSTORE_FILE_PROPERTY
public static final String KUBERNETES_TLS_VERSIONS
public static final String KUBERNETES_TRYNAMESPACE_PATH_SYSTEM_PROPERTY
public static final String KUBERNETES_NAMESPACE_PATH
public static final String KUBERNETES_NAMESPACE_FILE
public static final String KUBERNETES_NAMESPACE_SYSTEM_PROPERTY
public static final String KUBERNETES_KUBECONFIG_FILE
public static final String KUBERNETES_SERVICE_HOST_PROPERTY
public static final String KUBERNETES_SERVICE_PORT_PROPERTY
public static final String KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH
public static final String KUBERNETES_SERVICE_ACCOUNT_CA_CRT_PATH
public static final String KUBERNETES_HTTP2_DISABLE
public static final String KUBERNETES_HTTP_PROXY
public static final String KUBERNETES_HTTPS_PROXY
public static final String KUBERNETES_ALL_PROXY
public static final String KUBERNETES_NO_PROXY
public static final String KUBERNETES_PROXY_USERNAME
public static final String KUBERNETES_PROXY_PASSWORD
public static final String KUBERNETES_USER_AGENT
public static final String DEFAULT_MASTER_URL
public static final Long DEFAULT_ROLLING_TIMEOUT
public static final Long DEFAULT_SCALE_TIMEOUT
public static final int DEFAULT_LOGGING_INTERVAL
public static final Long DEFAULT_WEBSOCKET_TIMEOUT
public static final Long DEFAULT_WEBSOCKET_PING_INTERVAL
public static final Integer DEFAULT_MAX_CONCURRENT_REQUESTS
public static final Integer DEFAULT_MAX_CONCURRENT_REQUESTS_PER_HOST
public static final Integer DEFAULT_REQUEST_RETRY_BACKOFFLIMIT
public static final Integer DEFAULT_REQUEST_RETRY_BACKOFFINTERVAL
public static final int DEFAULT_UPLOAD_CONNECTION_TIMEOUT
public static final int DEFAULT_UPLOAD_REQUEST_TIMEOUT
public static final String HTTP_PROTOCOL_PREFIX
public static final String HTTPS_PROTOCOL_PREFIX
@Deprecated public Config()
autoConfigure(String)
or ConfigBuilder
instead@Deprecated public Config(String masterUrl, String apiVersion, String namespace, boolean trustCerts, boolean disableHostnameVerification, String caCertFile, String caCertData, String clientCertFile, String clientCertData, String clientKeyFile, String clientKeyData, String clientKeyAlgo, String clientKeyPassphrase, String username, String password, String oauthToken, int watchReconnectInterval, int watchReconnectLimit, int connectionTimeout, int requestTimeout, long rollingTimeout, long scaleTimeout, int loggingInterval, int maxConcurrentRequests, int maxConcurrentRequestsPerHost, String httpProxy, String httpsProxy, String[] noProxy, Map<Integer,String> errorMessages, String userAgent, okhttp3.TlsVersion[] tlsVersions, long websocketTimeout, long websocketPingInterval, String proxyUsername, String proxyPassword, String trustStoreFile, String trustStorePassphrase, String keyStoreFile, String keyStorePassphrase, String impersonateUsername, String[] impersonateGroups, Map<String,List<String>> impersonateExtras)
public Config(String masterUrl, String apiVersion, String namespace, boolean trustCerts, boolean disableHostnameVerification, String caCertFile, String caCertData, String clientCertFile, String clientCertData, String clientKeyFile, String clientKeyData, String clientKeyAlgo, String clientKeyPassphrase, String username, String password, String oauthToken, int watchReconnectInterval, int watchReconnectLimit, int connectionTimeout, int requestTimeout, long rollingTimeout, long scaleTimeout, int loggingInterval, int maxConcurrentRequests, int maxConcurrentRequestsPerHost, boolean http2Disable, String httpProxy, String httpsProxy, String[] noProxy, Map<Integer,String> errorMessages, String userAgent, okhttp3.TlsVersion[] tlsVersions, long websocketTimeout, long websocketPingInterval, String proxyUsername, String proxyPassword, String trustStoreFile, String trustStorePassphrase, String keyStoreFile, String keyStorePassphrase, String impersonateUsername, String[] impersonateGroups, Map<String,List<String>> impersonateExtras, OAuthTokenProvider oauthTokenProvider, Map<String,String> customHeaders, int requestRetryBackoffLimit, int requestRetryBackoffInterval, int uploadConnectionTimeout, int uploadRequestTimeout)
public static Config empty()
Config
class without any automatic configuration
(i.e. reading system properties/environment variables to load defaults.)
You can also reuse this object to build your own Config
object
without any auto configuration like this:
Config configFromBuilder = new ConfigBuilder(Config.empty())
// ...
.build();
public static Config autoConfigure(String context)
context
- if null will use current-contextpublic static void configFromSysPropsOrEnvVars(Config config)
public static Config fromKubeconfig(String kubeconfigContents) throws IOException
IOException
public static Config fromKubeconfig(String context, String kubeconfigContents, String kubeconfigPath)
public static String getKubeconfigFilename()
protected static io.fabric8.kubernetes.client.Config.ExecCredential getExecCredentialFromExecConfig(io.fabric8.kubernetes.api.model.ExecConfig exec, File configFile) throws IOException, InterruptedException
IOException
InterruptedException
protected static List<String> getAuthenticatorCommandFromExecConfig(io.fabric8.kubernetes.api.model.ExecConfig exec, File configFile, String systemPathValue)
protected static String getCommandWithFullyQualifiedPath(String command, String pathValue)
public static String getKeyAlgorithm(InputStream inputStream) throws IOException
IOException
public String getOauthToken()
public void setOauthToken(String oauthToken)
public String getPassword()
public void setPassword(String password)
public String getUsername()
public void setUsername(String username)
public String getImpersonateUsername()
public void setImpersonateUsername(String impersonateUsername)
public String[] getImpersonateGroups()
public void setImpersonateGroups(String... impersonateGroup)
@Deprecated public String getImpersonateGroup()
getImpersonateGroups()
instead@Deprecated public void setImpersonateGroup(String impersonateGroup)
setImpersonateGroups(String...)
insteadimpersonateGroup
- ImpersonateGroup stringpublic String getClientKeyPassphrase()
public void setClientKeyPassphrase(String clientKeyPassphrase)
public String getClientKeyAlgo()
public void setClientKeyAlgo(String clientKeyAlgo)
public String getClientKeyData()
public void setClientKeyData(String clientKeyData)
public String getClientKeyFile()
public void setClientKeyFile(String clientKeyFile)
public String getClientCertData()
public void setClientCertData(String clientCertData)
public String getClientCertFile()
public void setClientCertFile(String clientCertFile)
public String getCaCertData()
public void setCaCertData(String caCertData)
public String getCaCertFile()
public void setCaCertFile(String caCertFile)
public String getApiVersion()
public void setApiVersion(String apiVersion)
public String getMasterUrl()
public void setMasterUrl(String masterUrl)
public boolean isTrustCerts()
public void setTrustCerts(boolean trustCerts)
public boolean isDisableHostnameVerification()
public void setDisableHostnameVerification(boolean disableHostnameVerification)
public int getWatchReconnectInterval()
public void setWatchReconnectInterval(int watchReconnectInterval)
public int getWatchReconnectLimit()
public void setWatchReconnectLimit(int watchReconnectLimit)
public static io.fabric8.kubernetes.api.model.ConfigBuilder builder()
public int getConnectionTimeout()
public void setConnectionTimeout(int connectionTimeout)
public int getUploadConnectionTimeout()
public void setUploadConnectionTimeout(int connectionTimeout)
public int getUploadRequestTimeout()
public void setUploadRequestTimeout(int requestTimeout)
public int getRequestTimeout()
public void setRequestTimeout(int requestTimeout)
public int getRequestRetryBackoffLimit()
public void setRequestRetryBackoffLimit(int requestRetryBackoffLimit)
public int getRequestRetryBackoffInterval()
public void setRequestRetryBackoffInterval(int requestRetryBackoffInterval)
public long getRollingTimeout()
public void setRollingTimeout(long rollingTimeout)
public long getScaleTimeout()
public void setScaleTimeout(long scaleTimeout)
public int getLoggingInterval()
public void setLoggingInterval(int loggingInterval)
public boolean isHttp2Disable()
public void setHttp2Disable(boolean http2Disable)
public void setHttpProxy(String httpProxy)
public String getHttpProxy()
public void setHttpsProxy(String httpsProxy)
public String getHttpsProxy()
public void setNoProxy(String[] noProxy)
public String[] getNoProxy()
public String getNamespace()
public void setNamespace(String namespace)
public String getUserAgent()
public void setUserAgent(String userAgent)
public okhttp3.TlsVersion[] getTlsVersions()
public void setTlsVersions(okhttp3.TlsVersion[] tlsVersions)
public long getWebsocketTimeout()
public void setWebsocketTimeout(long websocketTimeout)
public long getWebsocketPingInterval()
public void setWebsocketPingInterval(long websocketPingInterval)
public int getMaxConcurrentRequests()
public void setMaxConcurrentRequests(int maxConcurrentRequests)
public int getMaxConcurrentRequestsPerHost()
public void setMaxConcurrentRequestsPerHost(int maxConcurrentRequestsPerHost)
public String getProxyUsername()
public void setProxyUsername(String proxyUsername)
public String getProxyPassword()
public void setProxyPassword(String proxyPassword)
public RequestConfig getRequestConfig()
public void setTrustStorePassphrase(String trustStorePassphrase)
public String getTrustStorePassphrase()
public void setKeyStorePassphrase(String keyStorePassphrase)
public String getKeyStorePassphrase()
public void setTrustStoreFile(String trustStoreFile)
public String getTrustStoreFile()
public void setKeyStoreFile(String keyStoreFile)
public String getKeyStoreFile()
public OAuthTokenProvider getOauthTokenProvider()
public void setOauthTokenProvider(OAuthTokenProvider oauthTokenProvider)
public Boolean getAutoConfigure()
public List<io.fabric8.kubernetes.api.model.NamedContext> getContexts()
NamedContext
s that exist in the kube configNamedContext
public void setContexts(List<io.fabric8.kubernetes.api.model.NamedContext> contexts)
public io.fabric8.kubernetes.api.model.NamedContext getCurrentContext()
null
if there's noneNamedContext
public void setCurrentContext(io.fabric8.kubernetes.api.model.NamedContext context)
public File getFile()
null
if no file was used.public Readiness getReadiness()
public void setAuthProvider(io.fabric8.kubernetes.api.model.AuthProviderConfig authProvider)
public io.fabric8.kubernetes.api.model.AuthProviderConfig getAuthProvider()
Copyright © 2015–2020 Red Hat. All rights reserved.