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 Details

    • decorate

      io.fabric8.kubernetes.client.ConfigBuilder decorate(io.fabric8.kubernetes.client.ConfigBuilder builder, KubernetesAuthConfig config) throws KubernetesAuthException
      Decorates a ConfigBuilder to 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 kubeconfig
      KubernetesAuthException - 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