kube

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

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ENV_VAULTPAL_KUBECONFIG_FILE = "VAULTPAL_KUBECONFIG_FILE"

Variables

This section is empty.

Functions

func StringToBase64String

func StringToBase64String(s string) string

func WriteKubeconfig

func WriteKubeconfig(cluster string, role string) error

Types

type Cluster

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

type ClusterEntry

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

type Config

type Config struct {
	ApiVersion     string         `yaml:"apiVersion"`
	Kind           string         `yaml:"kind"`
	Clusters       []ClusterEntry `yaml:"clusters"`
	Contexts       []ContextEntry `yaml:"contexts"`
	Users          []UserEntry    `yaml:"users"`
	CurrentContext string         `yaml:"current-context"`
}

type Context

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

type ContextEntry

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

type User

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

type UserEntry

type UserEntry 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