k8s

package module
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

README

sthingsK8s

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertKubeconfigFileToByteArray

func ConvertKubeconfigFileToByteArray(kubeconfigPath string) []byte

func CreateDynamicResourcesFromTemplate

func CreateDynamicResourcesFromTemplate(kubeconfig *rest.Config, templatedResource []byte, namespace string) (bool, error)

func CreateInClusterRestConfig

func CreateInClusterRestConfig() *rest.Config

func CreateNamespace added in v0.1.5

func CreateNamespace(kubeConfig *rest.Config, namespaceName string)

func CreateRestConfig

func CreateRestConfig(kubeconfig []byte) *rest.Config

func CreateRestMapperAndDynamicInterface

func CreateRestMapperAndDynamicInterface(kubeconfig *rest.Config) (meta.RESTMapper, dynamic.Interface)

func GetK8sNamespaces added in v0.1.5

func GetK8sNamespaces(kubeConfig *rest.Config) []string

func GetKubeConfig

func GetKubeConfig(kubeConfigPath string) (clusterConfig *rest.Config, clusterConnection string)

Types

type K8sResource

type K8sResource struct {
	Name       string `mapstructure:"name"`
	Kind       string `mapstructure:"kind"`
	ApiVersion string `mapstructure:"api-version"`
}

func GetK8sResourcesByKind

func GetK8sResourcesByKind(kubeconfig *rest.Config, apiVersion, kind, namespace string, debug bool) []K8sResource

Jump to

Keyboard shortcuts

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