kubectl_plugin_base

package
v0.0.0-...-21b2222 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindKubeCTL

func FindKubeCTL() (path string, err error)

func GetContextClusterName

func GetContextClusterName(contextName string) (clusterName string, err error)

func GetContextNamespace

func GetContextNamespace(contextName string) (namespace string, err error)

func GetCurrentContextName

func GetCurrentContextName() (name string, err error)

func GetServiceAccountToken

func GetServiceAccountToken(namespace string, name string) (token string, err error)

func RunKubectl

func RunKubectl(args ...string) (output []byte, err error)

func SetContext

func SetContext(contextName string, clusterName string, username string, namespace string) (err error)

func SetTokenCredentials

func SetTokenCredentials(username string, token string) (err error)

func UseContext

func UseContext(contextName string) (err error)

Types

type Cluster

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

func GetCluster

func GetCluster(clusterName string) (cluster Cluster, err error)

Jump to

Keyboard shortcuts

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