View Source K8s.Conn.Auth behaviour (k8s v2.2.0)
Authorization behaviour
Link to this section Summary
Callbacks
Creates a struct holding the information to authenticate against the API server.
Link to this section Callbacks
@callback create(auth_map :: map(), base_path :: String.t()) :: {:ok, struct()} | {:error, any()} | :skip
Creates a struct holding the information to authenticate against the API server.
arguments
Arguments
auth_map
- A map representing the.users[].user
part from a kubeconfig.base_path
- The path to the folder holding the kubeconfig file.
result
Result
The struct returned by this function MUST implement the
K8s.Conn.RequestOptions
protocol.
Return :skip
to signal to K8s.Conn
to skip a provider that would not
authenticate the current connection.
examples
Examples
See the various modules implementing this behaviour for examples.