com.coralogix.zio.k8s.client.config

Type members

Classlikes

Defines ZIO Config descriptors for all the configuration data types of zio-k8s

Defines ZIO Config descriptors for all the configuration data types of zio-k8s

sealed trait K8sAuthentication

Type of authentication to use with the Kubernetes cluster

Type of authentication to use with the Kubernetes cluster

Companion
object
Companion
class
case class K8sClientConfig(debug: Boolean, serverCertificate: K8sServerCertificate)

Configuration for the HTTP connection towards the Kubernetes API

Configuration for the HTTP connection towards the Kubernetes API

Value Params
debug

Enables detailed debug logging

serverCertificate

The server certificate to use

case class K8sClusterConfig(host: Uri, authentication: K8sAuthentication, client: K8sClientConfig)

Configures the zio-k8s client

Configures the zio-k8s client

This is the top level configuration class.

Value Params
authentication

Authentication method to use

client

HTTP client configuration

host

URL of the Kubernetes API

Configured Kubernetes server certifications

Configured Kubernetes server certifications

K8sServerCertificate.Insecure should only be used for testing purposes.

Companion
object
Companion
class
sealed trait KeySource

Abstraction for configuring keys

Abstraction for configuring keys

Companion
object
object KeySource
Companion
class
case class Kubeconfig(clusters: List[KubeconfigCluster], contexts: List[KubeconfigContext], users: List[KubeconfigUser], `current-context`: String)
Companion
object
object Kubeconfig
Companion
class
case class KubeconfigCluster(name: String, cluster: KubeconfigClusterInfo)
Companion
object
Companion
class
case class KubeconfigClusterInfo(server: String, `certificate-authority`: Option[String], `certificate-authority-data`: Option[String])
Companion
object
case class KubeconfigContext(name: String, context: KubeconfigContextInfo)
Companion
object
Companion
class
case class KubeconfigContextInfo(cluster: String, user: String, namespace: Option[String])
Companion
object
case class KubeconfigUser(name: String, user: KubeconfigUserInfo)
Companion
object
Companion
class
case class KubeconfigUserInfo(`client-certificate`: Option[String], `client-certificate-data`: Option[String], `client-key`: Option[String], `client-key-data`: Option[String], token: Option[String], username: Option[String], password: Option[String])
Companion
object
Companion
class

Value members

Concrete methods

def kubeconfig(context: Option[String], debug: Boolean, disableHostnameVerification: Boolean): ZLayer[Blocking & System, Throwable, Has[K8sClusterConfig]]

Layer producing a K8sClusterConfig by loading a kubeconfig file

Layer producing a K8sClusterConfig by loading a kubeconfig file

If the KUBECONFIG environment variable is set, that will be used as the kubeconfig file's path, otherwise ~/.kube/config based on the current user's home directory.

To use a specific kubeconfig file path, use kubeconfigFile.

Value Params
context

Override the current context in the configuration file and use another one

debug

Enable debug request/response logging

disableHostnameVerification

Disables hostname verification on the SSL connection

def kubeconfigFile(configPath: Path, context: Option[String], debug: Boolean, disableHostnameVerification: Boolean): ZLayer[Blocking, Throwable, Has[K8sClusterConfig]]

Layer setting up a com.coralogix.zio.k8s.client.model.K8sCluster by loading a specific kubeconfig file

Layer setting up a com.coralogix.zio.k8s.client.model.K8sCluster by loading a specific kubeconfig file

Value Params
configPath

Path to the kubeconfig file to load

context

Override the current context in the configuration file and use another one

debug

Enable debug request/response logging

disableHostnameVerification

Disables hostname verification on the SSL connection

def serviceAccount(debug: Boolean): ZLayer[Any, Nothing, Has[K8sClusterConfig]]

Layer producing a K8sClusterConfig using the default service account when running from inside a pod.

Layer producing a K8sClusterConfig using the default service account when running from inside a pod.

Value Params
debug

Enable debug request/response logging

Concrete fields

val defaultConfigChain: ZLayer[System & Blocking, Throwable, Has[K8sClusterConfig]]

Layer producing a K8sClusterConfig that first tries to load a kubeconfig and if it cannot find one fallbacks to using the default service account token.

Layer producing a K8sClusterConfig that first tries to load a kubeconfig and if it cannot find one fallbacks to using the default service account token.

For more customization see kubeconfig and serviceAccount or provide a K8sClusterConfig manually.

val k8sCluster: ZLayer[Blocking & Has[K8sClusterConfig], Throwable, Has[K8sCluster]]

Layer producing a com.coralogix.zio.k8s.client.model.K8sCluster from a provided K8sClusterConfig

Layer producing a com.coralogix.zio.k8s.client.model.K8sCluster from a provided K8sClusterConfig

This can be used to either set up from a configuration source with zio-config or provide the hostname and token programmatically for the Kubernetes client.

Inherited fields

ZIO Config descriptor for K8sClusterConfig

ZIO Config descriptor for K8sClusterConfig

Inherited from
Descriptors