Package exec contains helper utilities for exec credential plugins.



    This section is empty.


    This section is empty.


    func LoadExecCredential

    func LoadExecCredential(data []byte) (runtime.Object, *rest.Config, error)

      LoadExecCredential loads the configuration needed for an exec plugin to communicate with a cluster.

      LoadExecCredential expects the provided data to be a serialized ExecCredential object (of any version). If the provided data is invalid (i.e., it cannot be unmarshalled into any known ExecCredential version), an error will be returned. A successfully unmarshalled ExecCredential will be returned as the first return value.

      If the provided data is successfully unmarshalled, but it does not contain cluster information (i.e., ExecCredential.Spec.Cluster == nil), then the returned rest.Config and error will be nil.

      Note that the returned rest.Config will use anonymous authentication, since the exec plugin has not returned credentials for this cluster yet.

      func LoadExecCredentialFromEnv

      func LoadExecCredentialFromEnv() (runtime.Object, *rest.Config, error)

        LoadExecCredentialFromEnv is a helper-wrapper around LoadExecCredential that loads from the well-known KUBERNETES_EXEC_INFO environment variable.

        When the KUBERNETES_EXEC_INFO environment variable is not set or is empty, then this function will immediately return an error.


        This section is empty.

        Source Files