k8s

package
v2.45.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeconfigAPIVersion = "v1"
	KubeconfigKind       = "Config"
	InstallHint          = `` /* 147-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func GetCommands

func GetCommands() *core.Commands

GetCommands returns cluster commands.

This function: - Gets the generated commands - Register handwritten marshalers - Apply handwritten overrides (of Command.Run)

func GetGeneratedCommands

func GetGeneratedCommands() *core.Commands

Types

type ExecCredential added in v2.33.0

type ExecCredential struct {
	// APIVersion defines the versioned schema of this representation of an object.
	// Servers should convert recognized schemas to the latest internal value, and
	// may reject unrecognized values.
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind is a string value representing the REST resource this object represents.
	// Servers may infer this from the endpoint the client submits requests to.
	Kind string `json:"kind,omitempty"`

	// Status is filled in by the plugin and holds the credentials that the transport
	// should use to contact the API.
	Status *ExecCredentialStatus `json:"status,omitempty"`
}

ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.

type ExecCredentialStatus added in v2.33.0

type ExecCredentialStatus struct {
	// Token is a bearer token used by the client for request authentication.
	Token string `json:"token,omitempty"`
}

ExecCredentialStatus holds credentials for the transport to use.

type KubeMapConfig added in v2.45.0

type KubeMapConfig struct {
	CurrentContext string
	// contains filtered or unexported fields
}

func LoadKubeMapConfig added in v2.45.0

func LoadKubeMapConfig(ctx context.Context, kubeconfigPath string) (*KubeMapConfig, error)

func NewKubeMapConfig added in v2.45.0

func NewKubeMapConfig() *KubeMapConfig

func (*KubeMapConfig) GetCluster added in v2.45.0

func (c *KubeMapConfig) GetCluster(name string) (*api.NamedCluster, error)

func (*KubeMapConfig) GetContext added in v2.45.0

func (c *KubeMapConfig) GetContext(name string) (*api.NamedContext, error)

func (*KubeMapConfig) GetUser added in v2.45.0

func (c *KubeMapConfig) GetUser(name string) (*api.NamedAuthInfo, error)

func (*KubeMapConfig) Kubeconfig added in v2.45.0

func (c *KubeMapConfig) Kubeconfig() api.Config

func (*KubeMapConfig) RemoveCluster added in v2.45.0

func (c *KubeMapConfig) RemoveCluster(name string) error

func (*KubeMapConfig) RemoveContext added in v2.45.0

func (c *KubeMapConfig) RemoveContext(name string) error

func (*KubeMapConfig) RemoveUser added in v2.45.0

func (c *KubeMapConfig) RemoveUser(name string) error

func (*KubeMapConfig) Save added in v2.45.0

func (c *KubeMapConfig) Save(kubeconfigPath string) error

func (*KubeMapConfig) SetCluster added in v2.45.0

func (c *KubeMapConfig) SetCluster(name string, cluster api.Cluster, overwrite bool) error

func (*KubeMapConfig) SetContext added in v2.45.0

func (c *KubeMapConfig) SetContext(name string, context api.Context, overwrite bool) error

func (*KubeMapConfig) SetUser added in v2.45.0

func (c *KubeMapConfig) SetUser(name string, user api.AuthInfo, overwrite bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL