Interface KubernetesAuth
- All Known Implementing Classes:
KubernetesAuthCertificate,KubernetesAuthKeystore,KubernetesAuthKubeconfig,KubernetesAuthToken,KubernetesAuthUsernamePassword
public interface KubernetesAuth
Abstracts away a Kubernetes authentication either through kubeconfig format or
ConfigBuilder.-
Method Summary
Modifier and TypeMethodDescriptionio.fabric8.kubernetes.api.model.ConfigBuilderbuildConfigBuilder(KubernetesAuthConfig config, String context, String clusterName, String username) buildKubeConfig(KubernetesAuthConfig config) Builds a kube config file content based on the current authentication object.io.fabric8.kubernetes.client.ConfigBuilderdecorate(io.fabric8.kubernetes.client.ConfigBuilder builder, KubernetesAuthConfig config) Decorates aConfigBuilderto connect using the current authentication object.
-
Method Details
-
decorate
io.fabric8.kubernetes.client.ConfigBuilder decorate(io.fabric8.kubernetes.client.ConfigBuilder builder, KubernetesAuthConfig config) throws KubernetesAuthException Decorates aConfigBuilderto connect using the current authentication object.- Parameters:
builder- the configuration to decorate- Returns:
- the decorated configuration
- Throws:
KubernetesAuthException- if anything fails during the processing of the authentication configuration
-
buildKubeConfig
String buildKubeConfig(KubernetesAuthConfig config) throws com.fasterxml.jackson.core.JsonProcessingException, KubernetesAuthException Builds a kube config file content based on the current authentication object.- Returns:
- Kubeconfig file content corresponding to this authentication object.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if something fails while generating the json document for kubeconfigKubernetesAuthException- if something fails while dealing with credentials
-
buildConfigBuilder
io.fabric8.kubernetes.api.model.ConfigBuilder buildConfigBuilder(KubernetesAuthConfig config, String context, String clusterName, String username) throws KubernetesAuthException - Throws:
KubernetesAuthException
-