Documentation ¶
Overview ¶
Package kubernetes will manage all kubernetes pods requirements
Index ¶
- func Client() (c *kubernetes.Clientset, err error)
- func CreateNamespace(clientset *kubernetes.Clientset, namespace string) (err error)
- func CreatePod(clientset *kubernetes.Clientset, m models.Pods) (podName string, err error)
- func CreateServiceAccountName(clientset *kubernetes.Clientset, namespace string, serviceAccount string) (serviceAccountName string, err error)
- func DeleteNamespace(clientset *kubernetes.Clientset, namespace string) (err error)
- func DeletePod(clientset *kubernetes.Clientset, namespace string, podName string) (err error)
- func GetNamespace(clientset *kubernetes.Clientset, namespace string) (err error)
- func GetServiceAccountName(clientset *kubernetes.Clientset, namespace string, serviceAccount string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Client ¶
func Client() (c *kubernetes.Clientset, err error)
Client return requirements to be able to connect to kubernetes cluster with the program running inside or outside of the cluster
func CreateNamespace ¶
func CreateNamespace(clientset *kubernetes.Clientset, namespace string) (err error)
CreateNamespace permit to create namespace
func CreateServiceAccountName ¶
func CreateServiceAccountName(clientset *kubernetes.Clientset, namespace string, serviceAccount string) (serviceAccountName string, err error)
CreateServiceAccountName permit to create service account that will be used while creating the pod
func DeleteNamespace ¶
func DeleteNamespace(clientset *kubernetes.Clientset, namespace string) (err error)
DeleteNamespace permit to delete created namespace
func DeletePod ¶
func DeletePod(clientset *kubernetes.Clientset, namespace string, podName string) (err error)
DeletePod permit to delete pod inside of specified namespace
func GetNamespace ¶
func GetNamespace(clientset *kubernetes.Clientset, namespace string) (err error)
GetNamespace check if namespace defined for jobs exist or not
func GetServiceAccountName ¶
func GetServiceAccountName(clientset *kubernetes.Clientset, namespace string, serviceAccount string) (err error)
GetServiceAccountName permit to get service account in specified namespace
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.