Documentation

Overview

    Package exec contains helper utilities for exec credential plugins.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    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 client.authentication.k8s.io ExecCredential object (of any version). If the provided data is invalid (i.e., it cannot be unmarshalled into any known client.authentication.k8s.io 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.

        Types

        This section is empty.

        Source Files