Documentation ¶
Index ¶
- func ParseK8SYAML(data []byte) (runtime.Object, error)
- type KubeCtl
- func (kc *KubeCtl) CreateAutoscaler(autoscaler *v1beta2.HorizontalPodAutoscaler, namespace string) (*v1beta2.HorizontalPodAutoscaler, error)
- func (kc *KubeCtl) CreateConfigMap(configMap *corev1.ConfigMap, namespace string) (*corev1.ConfigMap, error)
- func (kc *KubeCtl) CreateDeployment(deployment *appsv1.Deployment, namespace string) (*appsv1.Deployment, error)
- func (kc *KubeCtl) CreateNamespace(namespace *corev1.Namespace) (*corev1.Namespace, error)
- func (kc *KubeCtl) CreatePVC(pvc *corev1.PersistentVolumeClaim, namespace string) (*corev1.PersistentVolumeClaim, error)
- func (kc *KubeCtl) CreatePod(pod *corev1.Pod, namespace string) (*corev1.Pod, error)
- func (kc *KubeCtl) CreateService(service *corev1.Service, namespace string) (*corev1.Service, error)
- func (kc *KubeCtl) CreateStorageClass(storageClass *v1.StorageClass) (*v1.StorageClass, error)
- func (kc *KubeCtl) DeleteAutoscaler(name string, namespace string) error
- func (kc *KubeCtl) DeleteConfigMap(name string, namespace string) error
- func (kc *KubeCtl) DeleteDeployment(name string, namespace string) error
- func (kc *KubeCtl) DeleteNamespace(name string) error
- func (kc *KubeCtl) DeletePVC(name string, namespace string) error
- func (kc *KubeCtl) DeletePod(name string, namespace string) error
- func (kc *KubeCtl) DeleteService(name string, namespace string) error
- func (kc *KubeCtl) DeleteStorageClass(name string) error
- func (kc *KubeCtl) GetAutoscaler(name string, namespace string) (*v1beta2.HorizontalPodAutoscaler, error)
- func (kc *KubeCtl) GetConfigMap(name string, namespace string) (*corev1.ConfigMap, error)
- func (kc *KubeCtl) GetConfigMaps(namespace string) ([]*corev1.ConfigMap, error)
- func (kc *KubeCtl) GetDeployment(name string, namespace string) (*appsv1.Deployment, error)
- func (kc *KubeCtl) GetDeployments(namespace string) ([]*appsv1.Deployment, error)
- func (kc *KubeCtl) GetNamespace(name string) (*corev1.Namespace, error)
- func (kc *KubeCtl) GetNamespaces() ([]*corev1.Namespace, error)
- func (kc *KubeCtl) GetNode(name string) (*corev1.Node, error)
- func (kc *KubeCtl) GetNodeExternalIP(name string) (string, error)
- func (kc *KubeCtl) GetNodeInternalIP(name string) (string, error)
- func (kc *KubeCtl) GetNodes() ([]*corev1.Node, error)
- func (kc *KubeCtl) GetPVC(name string, namespace string) (*corev1.PersistentVolumeClaim, error)
- func (kc *KubeCtl) GetPVCs(namespace string) ([]*corev1.PersistentVolumeClaim, error)
- func (kc *KubeCtl) GetPod(name string, namespace string) (*corev1.Pod, error)
- func (kc *KubeCtl) GetPods(namespace string) ([]*corev1.Pod, error)
- func (kc *KubeCtl) GetService(name string, namespace string) (*corev1.Service, error)
- func (kc *KubeCtl) GetServices(namespace string) ([]*corev1.Service, error)
- func (kc *KubeCtl) GetStorageClass(name string) (*v1.StorageClass, error)
- func (kc *KubeCtl) IsPodCompleted(pod *corev1.Pod) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KubeCtl ¶
type KubeCtl struct {
Clientset kubernetes.Interface
}
KubeCtl object is used to interact with the kubernetes cluster. Use the export function New to Get a KubeCtl object.
func New ¶
func New(clientset kubernetes.Interface) *KubeCtl
New is the API to New a kubectl object and you need to pass two parameters 1. The kubernetes clientset object from the client-go library. You can also use the fake-client for testing 2. The namespace of the kubernetes you want to manipulate
func (*KubeCtl) CreateAutoscaler ¶ added in v0.2.9
func (kc *KubeCtl) CreateAutoscaler(autoscaler *v1beta2.HorizontalPodAutoscaler, namespace string) (*v1beta2.HorizontalPodAutoscaler, error)
CreateAutoscaler will create a autoscaler
func (*KubeCtl) CreateConfigMap ¶ added in v0.2.9
func (kc *KubeCtl) CreateConfigMap(configMap *corev1.ConfigMap, namespace string) (*corev1.ConfigMap, error)
CreateConfigMap will create the configMap by the configMap object
func (*KubeCtl) CreateDeployment ¶
func (kc *KubeCtl) CreateDeployment(deployment *appsv1.Deployment, namespace string) (*appsv1.Deployment, error)
CreateDeployment will get the external IP address of node
func (*KubeCtl) CreateNamespace ¶ added in v0.1.13
CreateNamespace will create the namespace by the namespace object
func (*KubeCtl) CreatePVC ¶
func (kc *KubeCtl) CreatePVC(pvc *corev1.PersistentVolumeClaim, namespace string) (*corev1.PersistentVolumeClaim, error)
CreatePVC will create the PVC by the PVC object
func (*KubeCtl) CreateService ¶
func (kc *KubeCtl) CreateService(service *corev1.Service, namespace string) (*corev1.Service, error)
CreateService will create the service by the service object
func (*KubeCtl) CreateStorageClass ¶
func (kc *KubeCtl) CreateStorageClass(storageClass *v1.StorageClass) (*v1.StorageClass, error)
CreateStorageClass will get the external IP address of node
func (*KubeCtl) DeleteAutoscaler ¶ added in v0.2.9
DeleteAutoscaler will delete a autoscaler
func (*KubeCtl) DeleteConfigMap ¶ added in v0.2.9
DeleteConfigMap will delete the configMap by the configMap name
func (*KubeCtl) DeleteDeployment ¶
DeleteDeployment will delete deploy
func (*KubeCtl) DeleteNamespace ¶ added in v0.1.13
DeleteNamespace will delete the namespace by the namespace name
func (*KubeCtl) DeleteService ¶
DeleteService will delete the service by the service name
func (*KubeCtl) DeleteStorageClass ¶
DeleteStorageClass willl delete storage class
func (*KubeCtl) GetAutoscaler ¶ added in v0.2.9
func (kc *KubeCtl) GetAutoscaler(name string, namespace string) (*v1beta2.HorizontalPodAutoscaler, error)
GetAutoscaler will get a autoscaler
func (*KubeCtl) GetConfigMap ¶ added in v0.2.9
GetConfigMap will get the configMap object by the configMap name
func (*KubeCtl) GetConfigMaps ¶ added in v0.2.9
GetConfigMaps will get all configMaps from the k8s cluster
func (*KubeCtl) GetDeployment ¶
GetDeployment will get deploy
func (*KubeCtl) GetDeployments ¶
func (kc *KubeCtl) GetDeployments(namespace string) ([]*appsv1.Deployment, error)
GetDeployments will get deploys
func (*KubeCtl) GetNamespace ¶ added in v0.1.13
GetNamespace will get the namespace object by the namespace name
func (*KubeCtl) GetNamespaces ¶ added in v0.1.13
GetNamespaces will get all namespaces from the k8s cluster
func (*KubeCtl) GetNodeExternalIP ¶
GetNodeExternalIP will get the external IP address of node
func (*KubeCtl) GetNodeInternalIP ¶
GetNodeInternalIP wil get the internal IP address of node
func (*KubeCtl) GetPVCs ¶
func (kc *KubeCtl) GetPVCs(namespace string) ([]*corev1.PersistentVolumeClaim, error)
GetPVCs will get all PVCs from the k8s cluster
func (*KubeCtl) GetService ¶
GetService will get the service object by the service name
func (*KubeCtl) GetServices ¶
GetServices will get all services from the k8s cluster
func (*KubeCtl) GetStorageClass ¶
func (kc *KubeCtl) GetStorageClass(name string) (*v1.StorageClass, error)
GetStorageClass will get storage class