View Source Kubereq.Kubeconfig (kubereq v0.2.1)
This is the Pluggable.Token for the pipeline loading the Kubernetes config.
Summary
Types
The %Kubereq.Kubeconfig{} struct holds information required to connect to
Kubernetes clusters
Functions
Loads the Kubernetes config by running the given pipeline. Returns the
resulting %Kubereq.Kubeconfig{}.
Creates a new %Kubereq.Kubeconfig{} struct with the given fields
Sets the current context. This function sets current_cluster and
current_user in the given Kubereq.Kubeconfig.t()
Types
@type t() :: %Kubereq.Kubeconfig{ assigns: map(), clusters: [map()], contexts: [map()], current_cluster: map(), current_context: String.t(), current_user: map(), halted: boolean(), users: [map()] }
The %Kubereq.Kubeconfig{} struct holds information required to connect to
Kubernetes clusters
For descriptions of the fields, refer to the kubeconfig.v1 documentation.
Functions
Loads the Kubernetes config by running the given pipeline. Returns the
resulting %Kubereq.Kubeconfig{}.
pipeline can be passed in the form of {pipeline_module, opts} tuples,
a single pipeline_module or a list of either.
Example
Single pipeline module without opts passed as module:
Kubereq.Kubeconfig.load(Kubereq.Kubeconfig.Default)Single pipeline module with opts:
Kubereq.Kubeconfig.load({Kubereq.Kubeconfig.File, path: "/path/to/kubeconfig"})List of either:
Kubereq.Kubeconfig.load([
Kubereq.Kubeconfig.ENV,
{Kubereq.Kubeconfig.File, path: ".kube/config", relative_to_home?: true},
Kubereq.Kubeconfig.ServiceAccount
])
Creates a new %Kubereq.Kubeconfig{} struct with the given fields
Sets the current context. This function sets current_cluster and
current_user in the given Kubereq.Kubeconfig.t()