Documentation ¶
Index ¶
- type ClientSet
- type K8sAPI
- type K8sWrapper
- func (K8sWrapper) ApplyYaml(kubeconfigpath string, yamlFilePath string) (string, error)
- func (K8sWrapper) CreateJob(clientset kubernetes.Interface, job *batchv1.Job, namespace string) error
- func (K8sWrapper) CreateNetworkPolicy(clientset kubernetes.Interface, networkpolicy *v1.NetworkPolicy, ...) error
- func (K8sWrapper) DeleteDeployment(clientset kubernetes.Interface, namespace string, deploymentName string) error
- func (K8sWrapper) DeleteJob(clientset kubernetes.Interface, namespace string, jobName string) error
- func (K8sWrapper) DeleteJobWithPods(clientset kubernetes.Interface, namespace string, jobName string) error
- func (K8sWrapper) DeletePod(clientset kubernetes.Interface, namespace string, podName string) error
- func (K8sWrapper) DeletePods(clientset kubernetes.Interface, namespace string, podNameContains string) error
- func (K8sWrapper) DeletePodsWithRetry(clientset kubernetes.Interface, namespace string, podNameContains string) error
- func (K8sWrapper) DeleteYaml(kubeconfigpath string, yamlFilePath string) (string, error)
- func (K8sWrapper) ExecuteKubectlCommand(cmdParameter []string) (string, error)
- func (K8sWrapper) GetAllPodsInNamespace(clientset kubernetes.Interface, namespace string) ([]corev1.Pod, error)
- func (K8sWrapper) GetArgoRollouts(clientset argo.Interface, namespace string) (*v1alpha1.RolloutList, error)
- func (K8sWrapper) GetArgoRolloutsWithSpecAnnotationFilter(clientset argo.Interface, namespace string, annotations map[string]string) ([]string, error)
- func (K8sWrapper) GetDeployment(clientset kubernetes.Interface, namespace string, deploymentName string) (v1.Deployment, error)
- func (K8sWrapper) GetDeploymentWithSpecAnnotationFilter(clientset kubernetes.Interface, namespace string, ...) ([]string, error)
- func (K8sWrapper) GetDeployments(clientset kubernetes.Interface, namespace string) (*v1.DeploymentList, error)
- func (K8sWrapper) GetLogFromFirstPod(clientset kubernetes.Interface, namespace string, podNameContains string, ...) (string, error)
- func (K8sWrapper) GetNamespaceWithLabelFilter(clientset kubernetes.Interface, labels map[string]string) ([]string, error)
- func (K8sWrapper) GetNamespaces(clientset kubernetes.Interface) (*v1.NamespaceList, error)
- func (K8sWrapper) GetPodLogs(clientset kubernetes.Interface, podName string, namespace string, ...) (string, error)
- func (K8sWrapper) GetRunningPods(clientset kubernetes.Interface, namespace string, podNameContains string) ([]corev1.Pod, error)
- func (K8sWrapper) GetServiceEntries(kubeconfigpath string, namespace string) (map[string]string, error)
- func (K8sWrapper) PatchResource(kubeconfigpath string, namespace string, resource string, resourceName string, ...) (string, error)
- func (K8sWrapper) ReadConfigMap(clientset kubernetes.Interface, namespace string, configMapName string) (*v1.ConfigMap, error)
- func (K8sWrapper) ReadConfigMapData(clientset kubernetes.Interface, namespace string, configMapName string) (map[string]string, error)
- func (K8sWrapper) RestartContainer(kubeconfigpath string, namespace string, podname string, containerName string) (string, error)
- func (K8sWrapper) RestartContainers(clientset kubernetes.Interface, kubeconfigpath string, namespace string, ...) (string, error)
- func (K8sWrapper) RolloutArogRolloutStatus(kubeconfigpath string, namespace string, argoRolloutName string) (string, error)
- func (K8sWrapper) RolloutDeploymentStatus(kubeconfigpath string, namespace string, deploymentName string) (string, error)
- func (K8sWrapper) RolloutRestartArgoRollouts(kubeconfigpath string, namespace string, argoRolloutName string) (string, error)
- func (K8sWrapper) RolloutRestartDeployment(kubeconfigpath string, namespace string, deploymentName string) (string, error)
- func (K8sWrapper) ScaleDeployment(kubeconfigpath string, namespace string, deploymentname string, scale int) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSet ¶
type ClientSet struct { K8sClientSet kubernetes.Interface ArgoRolloutClientSet argo.Interface }
type K8sAPI ¶
type K8sAPI interface { PatchResource(kubeconfigpath string, namespace string, resource string, resourceName string, patchJson string) (string, error) ScaleDeployment(kubeconfigpath string, namespace string, deploymentname string, scale int) (string, error) ApplyYaml(kubeconfigpath string, yamlFilePath string) (string, error) DeleteYaml(kubeconfigpath string, yamlFilePath string) (string, error) GetServiceEntries(kubeconfigpath string, namespace string) (map[string]string, error) RestartContainer(kubeconfigpath string, namespace string, podname string, containerName string) (string, error) RolloutRestartDeployment(kubeconfigpath string, namespace string, deploymentName string) (string, error) RolloutDeploymentStatus(kubeconfigpath string, namespace string, deploymentName string) (string, error) GetRunningPods(clientset kubernetes.Interface, namespace string, podNameContains string) ([]corev1.Pod, error) GetAllPodsInNamespace(clientset kubernetes.Interface, namespace string) ([]corev1.Pod, error) DeletePod(clientset kubernetes.Interface, namespace string, podName string) error DeletePodsWithRetry(clientset kubernetes.Interface, namespace string, podNameContains string) error DeletePods(clientset kubernetes.Interface, namespace string, podNameContains string) error GetPodLogs(clientset kubernetes.Interface, podName string, namespace string, container string, fromTime time.Time) (string, error) RestartContainers(clientset kubernetes.Interface, kubeconfigpath string, namespace string, podnamecontains string, containerName string) (string, error) GetLogFromFirstPod(clientset kubernetes.Interface, namespace string, podNameContains string, containerName string, logsFromTime time.Time) (string, error) CreateNetworkPolicy(clientset kubernetes.Interface, networkpolicy *networkingv1.NetworkPolicy, namespace string) error GetNamespaces(clientset kubernetes.Interface) (*corev1.NamespaceList, error) GetNamespaceWithLabelFilter(clientset kubernetes.Interface, labels map[string]string) ([]string, error) CreateJob(clientset kubernetes.Interface, job *batchv1.Job, namespace string) error DeleteJob(clientset kubernetes.Interface, namespace string, jobName string) error DeleteJobWithPods(clientset kubernetes.Interface, namespace string, jobName string) error DeleteDeployment(clientset kubernetes.Interface, namespace string, deploymentName string) error GetDeployments(clientset kubernetes.Interface, namespace string) (*appsv1.DeploymentList, error) GetDeployment(clientset kubernetes.Interface, namespace string, deploymentName string) (appsv1.Deployment, error) GetDeploymentWithSpecAnnotationFilter(clientset kubernetes.Interface, namespace string, annotationName map[string]string) ([]string, error) //GetArgoClient() GetArgoRollouts(clientset argo.Interface, namespace string) (*argov1alpha1.RolloutList, error) GetArgoRolloutsWithSpecAnnotationFilter(clientset argo.Interface, namespace string, annotations map[string]string) ([]string, error) RolloutRestartArgoRollouts(kubeconfigpath string, namespace string, argoRolloutName string) (string, error) RolloutArogRolloutStatus(kubeconfigpath string, namespace string, argoRolloutName string) (string, error) ReadConfigMap(clientset kubernetes.Interface, namespace string, configMapName string) (*corev1.ConfigMap, error) ReadConfigMapData(clientset kubernetes.Interface, namespace string, configMapName string) (map[string]string, error) ExecuteKubectlCommand(cmdParameter []string) (string, error) }
var K8s K8sAPI = K8sWrapper{}
type K8sWrapper ¶
type K8sWrapper struct{}
func (K8sWrapper) ApplyYaml ¶
func (K8sWrapper) ApplyYaml(kubeconfigpath string, yamlFilePath string) (string, error)
func (K8sWrapper) CreateJob ¶
func (K8sWrapper) CreateJob(clientset kubernetes.Interface, job *batchv1.Job, namespace string) error
func (K8sWrapper) CreateNetworkPolicy ¶
func (K8sWrapper) CreateNetworkPolicy(clientset kubernetes.Interface, networkpolicy *v1.NetworkPolicy, namespace string) error
func (K8sWrapper) DeleteDeployment ¶
func (K8sWrapper) DeleteDeployment(clientset kubernetes.Interface, namespace string, deploymentName string) error
func (K8sWrapper) DeleteJob ¶
func (K8sWrapper) DeleteJob(clientset kubernetes.Interface, namespace string, jobName string) error
func (K8sWrapper) DeleteJobWithPods ¶
func (K8sWrapper) DeleteJobWithPods(clientset kubernetes.Interface, namespace string, jobName string) error
func (K8sWrapper) DeletePod ¶
func (K8sWrapper) DeletePod(clientset kubernetes.Interface, namespace string, podName string) error
func (K8sWrapper) DeletePods ¶
func (K8sWrapper) DeletePods(clientset kubernetes.Interface, namespace string, podNameContains string) error
func (K8sWrapper) DeletePodsWithRetry ¶
func (K8sWrapper) DeletePodsWithRetry(clientset kubernetes.Interface, namespace string, podNameContains string) error
func (K8sWrapper) DeleteYaml ¶
func (K8sWrapper) DeleteYaml(kubeconfigpath string, yamlFilePath string) (string, error)
func (K8sWrapper) ExecuteKubectlCommand ¶
func (K8sWrapper) ExecuteKubectlCommand(cmdParameter []string) (string, error)
func (K8sWrapper) GetAllPodsInNamespace ¶
func (K8sWrapper) GetAllPodsInNamespace(clientset kubernetes.Interface, namespace string) ([]corev1.Pod, error)
func (K8sWrapper) GetArgoRollouts ¶
func (K8sWrapper) GetArgoRollouts(clientset argo.Interface, namespace string) (*v1alpha1.RolloutList, error)
func (K8sWrapper) GetArgoRolloutsWithSpecAnnotationFilter ¶
func (K8sWrapper) GetDeployment ¶
func (K8sWrapper) GetDeployment(clientset kubernetes.Interface, namespace string, deploymentName string) (v1.Deployment, error)
func (K8sWrapper) GetDeploymentWithSpecAnnotationFilter ¶
func (K8sWrapper) GetDeploymentWithSpecAnnotationFilter(clientset kubernetes.Interface, namespace string, annotations map[string]string) ([]string, error)
func (K8sWrapper) GetDeployments ¶
func (K8sWrapper) GetDeployments(clientset kubernetes.Interface, namespace string) (*v1.DeploymentList, error)
func (K8sWrapper) GetLogFromFirstPod ¶
func (K8sWrapper) GetLogFromFirstPod(clientset kubernetes.Interface, namespace string, podNameContains string, containerName string, logsFromTime Time) (string, error)
func (K8sWrapper) GetNamespaceWithLabelFilter ¶
func (K8sWrapper) GetNamespaceWithLabelFilter(clientset kubernetes.Interface, labels map[string]string) ([]string, error)
func (K8sWrapper) GetNamespaces ¶
func (K8sWrapper) GetNamespaces(clientset kubernetes.Interface) (*v1.NamespaceList, error)
func (K8sWrapper) GetPodLogs ¶
func (K8sWrapper) GetPodLogs(clientset kubernetes.Interface, podName string, namespace string, container string, fromTime Time) (string, error)
func (K8sWrapper) GetRunningPods ¶
func (K8sWrapper) GetRunningPods(clientset kubernetes.Interface, namespace string, podNameContains string) ([]corev1.Pod, error)
func (K8sWrapper) GetServiceEntries ¶
func (K8sWrapper) PatchResource ¶
func (K8sWrapper) ReadConfigMap ¶
func (K8sWrapper) ReadConfigMap(clientset kubernetes.Interface, namespace string, configMapName string) (*v1.ConfigMap, error)
func (K8sWrapper) ReadConfigMapData ¶
func (K8sWrapper) ReadConfigMapData(clientset kubernetes.Interface, namespace string, configMapName string) (map[string]string, error)
func (K8sWrapper) RestartContainer ¶
func (K8sWrapper) RestartContainers ¶
func (K8sWrapper) RestartContainers(clientset kubernetes.Interface, kubeconfigpath string, namespace string, podnamecontains string, containerName string) (string, error)
func (K8sWrapper) RolloutArogRolloutStatus ¶
func (K8sWrapper) RolloutDeploymentStatus ¶
func (K8sWrapper) RolloutRestartArgoRollouts ¶
func (K8sWrapper) RolloutRestartDeployment ¶
func (K8sWrapper) ScaleDeployment ¶
Click to show internal directories.
Click to hide internal directories.