k8s

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContainerImageForK8sObject added in v0.4.0

func GetContainerImageForK8sObject(k8sClient kubernetes.Interface, k8sObjectName, k8sObject, namespace string) (string, error)

GetContainerImageForK8sObject is used to return the container image from for the object Supports deployment and Daemonsets as of now for apps/v1 api The clienset would have already been initialized with the specific k8s context to be used with

Usage: kubeClient, _ := k8s.KubeClientInit("cluster-name") containerImage, _ := k8s.GetContainerImageForK8sObject(kubeClient, "aws-node", "daemonset", "kube-system")

func KubeClientInit added in v0.4.0

func KubeClientInit(kubeContext string) (*kubernetes.Clientset, error)

KubeClientInit returns back clientSet

func KubectlDrainNodeCommand

func KubectlDrainNodeCommand(node string) string

TODO replace this with client-go

func KubectlTaintNodeCommand

func KubectlTaintNodeCommand(node string) string

TODO replace this with client-go

func ParseComponentImage

func ParseComponentImage(kubectlExecOutput string, imageSection string) (string, error)

ParseComponentImage takes in the full container image and returns back the container tag or the container image based on the argument received

func SetK8sContext

func SetK8sContext(clusterName string)

TODO replace this with client-go

func SetK8sObjectImage added in v0.4.0

func SetK8sObjectImage(k8sClient kubernetes.Interface, k8sObject, k8sObjectName, containerName, containerImage, k8sNamespace string) error

SetK8sObjectImage will set the image version for the deployment/daemonset object requested to update for

Types

This section is empty.

Jump to

Keyboard shortcuts

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