kubectl

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaybeSuccessfulStatuscodeList = []int{
	100,
	101,
	102,
	103,

	200,
	201,
	202,
	203,
	204,
	205,
	206,
	207,
	208,
	226,
}

MaybeSuccessfulStatuscodeList from https://www.w3.org/Protocols/HTTP/HTRESP.html

Functions

func ApiServerAddr

func ApiServerAddr() (string, error)

func ExecKubectl added in v1.5.4

func ExecKubectl(kubectlPath string, args []string) (out string, errStr string)

func ExtractKubectl added in v1.5.4

func ExtractKubectl() (string, error)

func GetServerVersion added in v1.0.1

func GetServerVersion(serverAddr string) (string, error)

func GetServiceAccountToken

func GetServiceAccountToken(tokenPath string) (string, error)

func KubectlToolApi

func KubectlToolApi(args []string)

func SecretToken added in v1.5.2

func SecretToken(tokenPath string) (string, error)

Types

type K8sRequestOption

type K8sRequestOption struct {
	TokenPath string
	Token     string
	Server    string
	Api       string
	Method    string
	PostData  string
	Url       string
	Anonymous bool
}

Jump to

Keyboard shortcuts

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