kubeconfig

package
v1.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildKubeConfigForUser

func BuildKubeConfigForUser(cms []*ConfigMeta) ([]byte, error)

BuildKubeConfigForUser build kubeConfig for specified user, aggregate if there are clusters more than one. Only token way support.

func BuildKubeConfigFromRestConfig

func BuildKubeConfigFromRestConfig(config *rest.Config) ([]byte, error)

BuildKubeConfigFromRestConfig build kubeConfig from config use cert way

func LoadKubeConfigFromBytes

func LoadKubeConfigFromBytes(kubeConfig []byte) (*rest.Config, error)

LoadKubeConfigFromBytes load kubeConfig form raw config

Types

type ConfigMeta

type ConfigMeta struct {
	Config  *rest.Config
	Cluster string
	User    string
	Token   string
}

ConfigMeta is meta of kubeConfig

Jump to

Keyboard shortcuts

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