kubeconfig

package
v0.0.0-...-e063410 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(ep *endpoints.Endpoint) ([]byte, error)

func NewClientConfig

func NewClientConfig(ctx context.Context, ep endpoints.Endpoint) (*rest.Config, error)

Types

type CertInfo

type CertInfo struct {
	ClientCertificateData string `json:"client-certificate-data"`
	ClientKeyData         string `json:"client-key-data"`
}

CertInfo holds the user certificate authentication data

type ClusterInfo

type ClusterInfo struct {
	CertificateAuthorityData string `json:"certificate-authority-data"`
	ProxyURL                 string `json:"proxy-url,omitempty"`
	Server                   string `json:"server"`
}

ClusterInfo holds the cluster data

type Clusters

type Clusters []struct {
	Cluster ClusterInfo `json:"cluster"`
	Name    string      `json:"name"`
}

Clusters hold an array of the clusters that would exist in the config file

type Context

type Context struct {
	Cluster string `json:"cluster"`
	User    string `json:"user"`
}

Context holds the cluster context

type Contexts

type Contexts []struct {
	Context Context `json:"context"`
	Name    string  `json:"name"`
}

Contexts holds an array of the contexts

type KubeConfig

type KubeConfig struct {
	APIVersion     string   `json:"apiVersion"`
	Clusters       Clusters `json:"clusters"`
	Contexts       Contexts `json:"contexts"`
	CurrentContext string   `json:"current-context"`
	Kind           string   `json:"kind"`
	Users          Users    `json:"users"`
}

KubeConfig holds the necessary data for creating a new KubeConfig file

type Users

type Users []struct {
	CertInfo CertInfo `json:"user"`
	Name     string   `json:"name"`
}

Users holds an array of the users that would exist in the config file

Jump to

Keyboard shortcuts

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