kubeconfig

package
v0.0.0-...-670b31e Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package kubeconfig contains abilities to create a simple, self-contained kubeconfig YAML file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteKubeconfigFile

func WriteKubeconfigFile(fileSystem afero.Fs, path, apiEndpoint, caData, certData, keyData string) error

WriteKubeconfigFile creates a self-contained kubeconfig file with the given key pair data.

Types

type Cluster

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

type Context

type Context struct {
	Cluster string
	User    string
}

type Kubeconfig

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

type NamedCluster

type NamedCluster struct {
	Name    string
	Cluster Cluster
}

type NamedContext

type NamedContext struct {
	Name    string
	Context Context
}

type NamedUser

type NamedUser struct {
	Name string
	User User
}

type User

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

Jump to

Keyboard shortcuts

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