kubernetes

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultKubeConfigFileName

func GetDefaultKubeConfigFileName() string

GetDefaultKubeConfigFileName gets the default file name of the kubeconfig

func UpdateKubeConfig

func UpdateKubeConfig(kubeconfig *KubeConfig, user UserData, updateContext bool, serverName string)

UpdateKubeConfig updates the local kubeconfig (~/.kube/config) with the given user.

Types

type KubeConfig

type KubeConfig struct {
	// FileName is the file name of the kubeconfig file
	FileName string
	// contains filtered or unexported fields
}

KubeConfig holds a kubeconfig and its file name

func GetKubeConfig

func GetKubeConfig(argument string) (*KubeConfig, error)

GetKubeConfig loads a kubeconfig from the given file or a default file

type Server

type Server struct {
	Name    string
	Address string
}

Server indicates a specific configured Kubernetes context.

func GetServers

func GetServers(kubeconfig *KubeConfig) []Server

GetServers gets a list of all configured contexts.

type UserData

type UserData struct {
	Name         string
	ClientID     string
	ClientSecret string
	IDToken      string
	RefreshToken string
	IssuerURL    string
}

UserData holds information about an authorized data

Jump to

Keyboard shortcuts

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