Documentation ¶
Index ¶
Constants ¶
const (
// KubernetesEndpoint is the kubernetes endpoint name in a stored context
KubernetesEndpoint = "kubernetes"
)
Variables ¶
This section is empty.
Functions ¶
func ConfigFromContext ¶
ConfigFromContext resolves a kubernetes client config for the specified context. If kubeconfigOverride is specified, use this config file instead of the context defaults.ConfigFromContext if command.ContextDockerHost is specified as the context name, fallsback to the default user's kubeconfig file
Types ¶
type Endpoint ¶
type Endpoint struct { EndpointMeta TLSData *context.TLSData }
Endpoint is a typed wrapper around a context-store generic endpoint describing a Kubernetes endpoint, with TLS data
func FromKubeConfig ¶
FromKubeConfig creates a Kubernetes endpoint from a Kubeconfig file
func (*Endpoint) KubernetesConfig ¶
func (c *Endpoint) KubernetesConfig() clientcmd.ClientConfig
KubernetesConfig creates the kubernetes client config from the endpoint
type EndpointMeta ¶
type EndpointMeta struct { context.EndpointMetaBase DefaultNamespace string `json:",omitempty"` AuthProvider *clientcmdapi.AuthProviderConfig `json:",omitempty"` Exec *clientcmdapi.ExecConfig `json:",omitempty"` UsernamePassword *UsernamePassword `json:"usernamePassword,omitempty"` }
EndpointMeta is a typed wrapper around a context-store generic endpoint describing a Kubernetes endpoint, without TLS data
func EndpointFromContext ¶
func EndpointFromContext(metadata store.Metadata) *EndpointMeta
EndpointFromContext extracts kubernetes endpoint info from current context
func (*EndpointMeta) ResolveDefault ¶
func (c *EndpointMeta) ResolveDefault(stackOrchestrator command.Orchestrator) (interface{}, *store.EndpointTLSData, error)
ResolveDefault returns endpoint metadata for the default Kubernetes endpoint, which is derived from the env-based kubeconfig.
func (*EndpointMeta) WithTLSData ¶
WithTLSData loads TLS materials for the endpoint
type UsernamePassword ¶
type UsernamePassword struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` }
UsernamePassword contains username/password auth info