package kube
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=3c6916dea849fb2842c4a2e8a92b6cdd
sha512=b57daa3bb4879e1f33efc157cf5c648f88455e0f7c87484d572096d46345d6a8081cc7cefb4887aa95507af8daf73b3b8570b8583106953a5ba96a874159ff00
doc/kube/Kube/Config/index.html
Module Kube.ConfigSource
Kubernetes connection and authentication configuration.
type tls = {ca_pem : string option;client_certificate_pem : string option;client_key_pem : string option;insecure_skip_verify : bool;server_name : string option;
}val make_impersonation :
?uid:string ->
?groups:string list ->
?extra:(string * string list) list ->
user:string ->
unit ->
(impersonation, string) resultValidate Kubernetes user impersonation state. Extra keys must be lowercase; their header suffixes are percent-escaped when requests are prepared.
type t = {server : Uri.t;namespace : string option;credential : credential;tls : tls;proxy_url : Uri.t option;impersonation : impersonation option;
}val make :
?namespace:string ->
?credential:credential ->
?tls:tls ->
?proxy_url:Uri.t ->
?impersonation:impersonation ->
Uri.t ->
tConstruct a validated client configuration. Explicit proxy URLs may use the http, https, or socks5 kubeconfig schemes; transport support is checked when a connection is opened.
Load one kubeconfig and select its current or explicitly named context.
Merge kubeconfigs using first-file-wins name resolution. Relative certificate, key, and token paths are resolved against the file that defines their entry.
Prefer in-cluster configuration when service environment variables exist; otherwise load every path in KUBECONFIG, or the standard user path.
Resolve only bearer-token credentials. Prefer authorization_header for general request code.
Resolve the current Authorization value, refreshing token files and expiring exec-plugin credentials when needed.
Whether the credential bytes originated outside the OCaml heap. Inline, basic, and exec-plugin credentials are necessarily `Heap; token files are read directly into protected memory and are `Protected.
val with_authorization_secret :
?hardened:bool ->
t ->
(origin:credential_origin -> Secret.t option -> 'a) ->
('a, string) resultResolve the current Authorization value into a scoped Secret.t. The value is destroyed when the callback returns or raises. Token files are read with Secret_unix without first creating an OCaml string. Other credential kinds remain available for compatibility but are marked as heap-originating so security-sensitive callers can reject them.
Return the validated Kubernetes impersonation headers for this config.