Documentation
¶
Index ¶
- func CreateClusterRole(kubeClient kubeclient.Interface, newClusterRole *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error)
- func CreateClusterRoleBinding(kubeClient kubeclient.Interface, ...) (*rbacv1.ClusterRoleBinding, error)
- func CreateConfigMap(kubeClient kubeclient.Interface, newConfigMap *corev1.ConfigMap) (*corev1.ConfigMap, error)
- func CreateDaemonSet(kubeClient kubeclient.Interface, newDaemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error)
- func CreateServiceAccount(kubeClient kubeclient.Interface, newServiceAccount *corev1.ServiceAccount) (*corev1.ServiceAccount, error)
- func DeleteClusterRole(kubeClient kubeclient.Interface, name string) error
- func DeleteClusterRoleBinding(kubeClient kubeclient.Interface, name string) error
- func DeleteConfigMap(kubeClient kubeclient.Interface, namespace, name string) error
- func DeleteDaemonSet(kubeClient kubeclient.Interface, namespace, name string) error
- func DeleteServiceAccount(kubeClient kubeclient.Interface, namespace, name string) error
- func GetClusterRole(kubeClient kubeclient.Interface, name string) (*rbacv1.ClusterRole, error)
- func GetClusterRoleBinding(kubeClient kubeclient.Interface, name string) (*rbacv1.ClusterRoleBinding, error)
- func GetConfigMap(kubeClient kubeclient.Interface, namespace, name string) (*corev1.ConfigMap, error)
- func GetDaemonSet(kubeClient kubeclient.Interface, namespace, name string) (*appsv1.DaemonSet, error)
- func GetDeployment(kubeClient kubeclient.Interface, namespace, name string) (*appsv1.Deployment, error)
- func GetInClusterConfig() (*rest.Config, error)
- func GetObjMetaAccesser(obj interface{}) (metav1.Object, error)
- func GetServiceAccount(kubeClient kubeclient.Interface, namespace, name string) (*corev1.ServiceAccount, error)
- func IsContainerCompleted(status *corev1.ContainerStatus) bool
- func IsContainerInitializing(status *corev1.ContainerStatus) bool
- func IsContainerReady(status *corev1.ContainerStatus) bool
- func IsContainerRestarted(status *corev1.ContainerStatus) bool
- func IsContainerWaitingCrashLoopBackOff(status *corev1.ContainerStatus) bool
- func IsDaemonSetReady(daemonSet *appsv1.DaemonSet) bool
- func IsMountPointReadOnly(mp mount.MountPoint) bool
- func IsPodContainerInState(pod *corev1.Pod, containerName string, ...) bool
- func ListDeployments(kubeClient kubeclient.Interface, namespace string, ...) (*appsv1.DeploymentList, error)
- func NewLabelSelectorFromMap(labels map[string]string) (labels.Selector, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClusterRole ¶
func CreateClusterRole(kubeClient kubeclient.Interface, newClusterRole *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error)
CreateClusterRole creates a new ClusterRole. If the ClusterRole already exists, it will be returned.
func CreateClusterRoleBinding ¶
func CreateClusterRoleBinding(kubeClient kubeclient.Interface, newClusterRoleBinding *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, error)
CreateClusterRoleBinding creates a new ClusterRoleBinding. If the ClusterRoleBinding already exists, it will be returned.
func CreateConfigMap ¶
func CreateConfigMap(kubeClient kubeclient.Interface, newConfigMap *corev1.ConfigMap) (*corev1.ConfigMap, error)
CreateConfigMap creates a new ConfigMap in the given namespace. If the ConfigMap already exists, it will be returned.
func CreateDaemonSet ¶
func CreateDaemonSet(kubeClient kubeclient.Interface, newDaemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error)
CreateDaemonSet creates a new DaemonSet in the given namespace. If the DaemonSet already exists, it will be returned.
func CreateServiceAccount ¶
func CreateServiceAccount(kubeClient kubeclient.Interface, newServiceAccount *corev1.ServiceAccount) (*corev1.ServiceAccount, error)
func DeleteClusterRole ¶
func DeleteClusterRole(kubeClient kubeclient.Interface, name string) error
DeleteClusterRole deletes the ClusterRole with the given name.
func DeleteClusterRoleBinding ¶
func DeleteClusterRoleBinding(kubeClient kubeclient.Interface, name string) error
DeleteClusterRoleBinding deletes the ClusterRoleBinding with the given name.
func DeleteConfigMap ¶
func DeleteConfigMap(kubeClient kubeclient.Interface, namespace, name string) error
DeleteConfigMap deletes the ConfigMap with the given name in the given namespace.
func DeleteDaemonSet ¶
func DeleteDaemonSet(kubeClient kubeclient.Interface, namespace, name string) error
DeleteDaemonSet deletes the DaemonSet with the given name in the given namespace.
func DeleteServiceAccount ¶
func DeleteServiceAccount(kubeClient kubeclient.Interface, namespace, name string) error
func GetClusterRole ¶
func GetClusterRole(kubeClient kubeclient.Interface, name string) (*rbacv1.ClusterRole, error)
GetClusterRole returns the ClusterRole with the given name.
func GetClusterRoleBinding ¶
func GetClusterRoleBinding(kubeClient kubeclient.Interface, name string) (*rbacv1.ClusterRoleBinding, error)
GetClusterRoleBinding returns the ClusterRoleBinding with the given name.
func GetConfigMap ¶
func GetConfigMap(kubeClient kubeclient.Interface, namespace, name string) (*corev1.ConfigMap, error)
GetConfigMap returns the ConfigMap with the given name in the given namespace.
func GetDaemonSet ¶
func GetDaemonSet(kubeClient kubeclient.Interface, namespace, name string) (*appsv1.DaemonSet, error)
GetDaemonSet returns the DaemonSet with the given name in the given namespace.
func GetDeployment ¶
func GetDeployment(kubeClient kubeclient.Interface, namespace, name string) (*appsv1.Deployment, error)
GetDeployment returns the Deployment with the given name in the given namespace.
func GetInClusterConfig ¶
func GetObjMetaAccesser ¶
func GetServiceAccount ¶
func GetServiceAccount(kubeClient kubeclient.Interface, namespace, name string) (*corev1.ServiceAccount, error)
func IsContainerCompleted ¶
func IsContainerCompleted(status *corev1.ContainerStatus) bool
IsContainerCompleted returns true if the container is terminated with exit code 0.
func IsContainerInitializing ¶
func IsContainerInitializing(status *corev1.ContainerStatus) bool
IsContainerInitializing returns true if the container is waiting for initialization.
func IsContainerReady ¶
func IsContainerReady(status *corev1.ContainerStatus) bool
IsContainerReady returns true if the container is ready.
func IsContainerRestarted ¶
func IsContainerRestarted(status *corev1.ContainerStatus) bool
IsContainerRestarted returns true if the container is terminated and restarted at least once.
func IsContainerWaitingCrashLoopBackOff ¶
func IsContainerWaitingCrashLoopBackOff(status *corev1.ContainerStatus) bool
IsContainerWaitingCrashLoopBackOff returns true if the container is waiting for crash loop back off.
func IsDaemonSetReady ¶
IsDaemonSetReady checks if the DaemonSet is ready by comparing the number of ready pods with the desired number of pods.
func IsMountPointReadOnly ¶
func IsMountPointReadOnly(mp mount.MountPoint) bool
func IsPodContainerInState ¶
func IsPodContainerInState(pod *corev1.Pod, containerName string, conditionFunc func(*corev1.ContainerStatus) bool) bool
IsPodContainerInState checks if a container is in a desired state. The function searches through the container statuses of the pod of a pod (including init containers) to determine if a specific container is in the desired state of the conditionFunc.
func ListDeployments ¶
func ListDeployments(kubeClient kubeclient.Interface, namespace string, labelSelectors map[string]string) (*appsv1.DeploymentList, error)
ListDeployments lists Kubernetes deployments in a specified namespace that match the provided label selectors.
Parameters: - kubeClient: The Kubernetes client interface used to interact with the cluster. - namespace: The namespace in which to list the deployments. - labelSelectors: A map of label selectors to filter the deployments. If empty, all deployments in the namespace are listed.
Returns: - A DeploymentList containing the deployments that match the label selectors. - An error if there is any issue in listing the deployments.
Types ¶
This section is empty.