k8s

package
v1.27.7 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNecessaryCliAppsAvailable added in v1.27.5

func CheckNecessaryCliAppsAvailable()

func CsvStr2arr

func CsvStr2arr(str string) []string

func CsvStr2arrSep

func CsvStr2arrSep(str string, sep string) []string

func CurrentContext

func CurrentContext() string

func DownloadEverything

func DownloadEverything(types []*ApiResourceType) string

func GroupByNamespace

func GroupByNamespace(all []*Resource) map[string][]*Resource

func ListAvailableContexts

func ListAvailableContexts() []string

func MapStrValOrElse

func MapStrValOrElse(dict map[string]string, key string, fallback string) string

func ParseStdOutTable

func ParseStdOutTable(table string) []map[string]string

func PipeToCommand

func PipeToCommand(input string, app string, args ...string) string

func RunCommand

func RunCommand(app string, args ...string) string

func SplitLines

func SplitLines(s string) []string

func Str2boolOrElse

func Str2boolOrElse(str string, fallback bool) bool

func WierdKubectlArray2arr

func WierdKubectlArray2arr(strIn string) []string

Types

type ApiResourceType

type ApiResourceType struct {
	Name          string
	ShortNames    []string
	Namespaced    bool
	Kind          string
	Verbs         []string
	ApiVersion    ApiVersion
	QualifiedName string
}

func (*ApiResourceType) IsSecret

func (r *ApiResourceType) IsSecret() bool

type ApiResourceTypesAccessible

type ApiResourceTypesAccessible struct {
	All        []*ApiResourceType
	Global     []*ApiResourceType
	Namespaced []*ApiResourceType
}

type ApiResourceTypesResponse

type ApiResourceTypesResponse struct {
	All        []*ApiResourceType
	Accessible ApiResourceTypesAccessible
}

func ApiResourceTypes

func ApiResourceTypes() ApiResourceTypesResponse

type ApiVersion

type ApiVersion struct {
	Version string
	Name    string
}

type Resource

type Resource struct {
	Kind              string           `yaml:"kind"`
	ApiVersion        string           `yaml:"apiVersion"`
	MetaData          ResourceMetadata `yaml:"metadata"`
	SourceYaml        string
	QualifiedTypeName string
}

func ParseResourceList

func ParseResourceList(in map[string]interface{}) []*Resource

func ParseResources

func ParseResources(in string) []*Resource

func ParseSingleResource

func ParseSingleResource(item interface{}, _ int) *Resource

func (*Resource) IsGlobal

func (r *Resource) IsGlobal() bool

func (*Resource) IsNamespaced

func (r *Resource) IsNamespaced() bool

func (*Resource) IsSecret

func (r *Resource) IsSecret() bool

type ResourceMetadata

type ResourceMetadata struct {
	Name      string `yaml:"name"`
	Namespace string `yaml:"namespace"`
}

type StdOutTableColumn

type StdOutTableColumn struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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