kubeconfig

package
v0.0.0-...-5c47c4c Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: EPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKubeConfig

func CreateKubeConfig(cmdRslv execInfo.InfoExecCreator, kubeConfigParams *model.KubeConfigParams, containerInfo *model.ContainerInfo) error

CreateKubeConfig creates a kubeconfig located at $KUBECONFIG if set. If it is not set then fall back to $HOME/.kube/config

Types

type ClusterInfo

type ClusterInfo struct {
	CertificateAuthority string `yaml:"certificate-authority"`
	Server               string `yaml:"server"`
}

type Clusters

type Clusters struct {
	Cluster ClusterInfo `yaml:"cluster"`
	Name    string      `yaml:"name"`
}

type Context

type Context struct {
	Cluster   string `yaml:"cluster"`
	Namespace string `yaml:"namespace"`
	User      string `yaml:"user"`
}

type Contexts

type Contexts struct {
	Context Context `yaml:"context"`
	Name    string  `yaml:"name"`
}

type KubeConfig

type KubeConfig struct {
	APIVersion     string     `yaml:"apiVersion"`
	Clusters       []Clusters `yaml:"clusters"`
	Users          []Users    `yaml:"users"`
	Contexts       []Contexts `yaml:"contexts"`
	CurrentContext string     `yaml:"current-context"`
	Kind           string     `yaml:"kind"`
}

type User

type User struct {
	Token string `yaml:"token"`
}

type Users

type Users struct {
	Name string `yaml:"name"`
	User User   `yaml:"user"`
}

Jump to

Keyboard shortcuts

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