kubeconfig

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

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

type ClusterData

type ClusterData struct {
	CertificateAuthorityData string `yaml:"certificate-authority-data"`
	Server                   string `yaml:"server"`
}

type Context

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

type ContextData

type ContextData struct {
	Cluster string `yaml:"cluster"`
	User    string `yaml:"user"`
}

type Exec

type Exec struct {
	APIVersion string      `yaml:"apiVersion"`
	Command    string      `yaml:"command"`
	Env        interface{} `yaml:"env"`
	Args       []string    `yaml:"args"`
}

type KubeConfig

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

func Read

func Read(path, cluster string) (*KubeConfig, error)

func (*KubeConfig) Write

func (t *KubeConfig) Write(dirname string) error

type User

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

type UserData

type UserData struct {
	ClientCertificateData string `yaml:"client-certificate-data"`
	ClientKeyData         string `yaml:"client-key-data"`
	Exec                  Exec   `yaml:"exec"`
}

Jump to

Keyboard shortcuts

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