Documentation ¶
Index ¶
- func GetContainerImageForK8sObject(k8sClient kubernetes.Interface, k8sObjectName, k8sObject, namespace string) (string, error)
- func KubeClientInit(kubeContext string) (*kubernetes.Clientset, error)
- func KubectlDrainNodeCommand(node string) string
- func KubectlTaintNodeCommand(node string) string
- func ParseComponentImage(kubectlExecOutput string, imageSection string) (string, error)
- func SetK8sContext(clusterName string)
- func SetK8sObjectImage(k8sClient kubernetes.Interface, ...) error
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 ¶
TODO replace this with client-go
func KubectlTaintNodeCommand ¶
TODO replace this with client-go
func ParseComponentImage ¶
ParseComponentImage takes in the full container image and returns back the container tag or the container image based on the argument received
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.