Documentation ¶
Index ¶
- func GetContainers(pod *corev1.Pod) []string
- func GetHealthyReplicasCount(replicaset *appsv1.ReplicaSet) (int64, error)
- func GetOwnerName(pod corev1.Pod) (string, error)
- func Init() error
- func PodKind(pod corev1.Pod) string
- type Client
- func (client Client) CreateEphemeralContainer(pod *corev1.Pod, container, name, image string, ttl int) error
- func (client Client) EvictPod(pod corev1.Pod) error
- func (client Client) Exec(namespace, pod, container string, command []string, script string) (*bytes.Buffer, error)
- func (client Client) GetClusterRole(name, namespace string) (*rbacv1.ClusterRole, error)
- func (client Client) GetConfigMap(name, namespace string) (*corev1.ConfigMap, error)
- func (client Client) GetDaemonSet(name, namespace string) (*appsv1.DaemonSet, error)
- func (client Client) GetDaemonsetFromPod(pod *corev1.Pod) (*appsv1.DaemonSet, error)
- func (client Client) GetDeployment(name, namespace string) (*appsv1.Deployment, error)
- func (client Client) GetDeploymentFromPod(pod *corev1.Pod) (*appsv1.Deployment, error)
- func (client Client) GetLeaseHolder() (<-chan string, error)
- func (client Client) GetNamespace(name string) (*corev1.Namespace, error)
- func (client Client) GetNode(name string) (*corev1.Node, error)
- func (client Client) GetNodeFromPod(pod *corev1.Pod) (*corev1.Node, error)
- func (client Client) GetPod(pod, namespace string) (*corev1.Pod, error)
- func (client Client) GetReplicaSet(name, namespace string) (*appsv1.ReplicaSet, error)
- func (client Client) GetReplicasetFromPod(pod *corev1.Pod) (*appsv1.ReplicaSet, error)
- func (client Client) GetRole(name, namespace string) (*rbacv1.Role, error)
- func (client Client) GetSecret(name, namespace string) (*corev1.Secret, error)
- func (client Client) GetService(name, namespace string) (*corev1.Service, error)
- func (client Client) GetServiceAccount(name, namespace string) (*corev1.ServiceAccount, error)
- func (client Client) GetStatefulSet(name, namespace string) (*appsv1.StatefulSet, error)
- func (client Client) GetStatefulsetFromPod(pod *corev1.Pod) (*appsv1.StatefulSet, error)
- func (client Client) GetTarget(resource, name, namespace string) (any, error)
- func (client Client) GetWatcherEndpointSlices(labelSelector, namespace string) (<-chan watch.Event, error)
- func (client Client) ListPods(ctx context.Context, opts metav1.ListOptions) (*corev1.PodList, error)
- type DrainClient
- type KubernetesClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContainers ¶
func GetHealthyReplicasCount ¶
func GetHealthyReplicasCount(replicaset *appsv1.ReplicaSet) (int64, error)
Types ¶
type Client ¶
func (Client) CreateEphemeralContainer ¶
func (Client) GetClusterRole ¶
func (client Client) GetClusterRole(name, namespace string) (*rbacv1.ClusterRole, error)
func (Client) GetConfigMap ¶
func (Client) GetDaemonSet ¶
func (Client) GetDaemonsetFromPod ¶
func (Client) GetDeployment ¶
func (client Client) GetDeployment(name, namespace string) (*appsv1.Deployment, error)
func (Client) GetDeploymentFromPod ¶
func (Client) GetLeaseHolder ¶
func (Client) GetNamespace ¶
func (Client) GetNodeFromPod ¶
func (Client) GetReplicaSet ¶
func (client Client) GetReplicaSet(name, namespace string) (*appsv1.ReplicaSet, error)
func (Client) GetReplicasetFromPod ¶
func (Client) GetService ¶
func (Client) GetServiceAccount ¶
func (client Client) GetServiceAccount(name, namespace string) (*corev1.ServiceAccount, error)
func (Client) GetStatefulSet ¶
func (client Client) GetStatefulSet(name, namespace string) (*appsv1.StatefulSet, error)
func (Client) GetStatefulsetFromPod ¶
func (Client) GetWatcherEndpointSlices ¶
type DrainClient ¶
type DrainClient interface { GetPod(name, namespace string) (*corev1.Pod, error) GetNodeFromPod(pod *corev1.Pod) (*corev1.Node, error) ListPods(ctx context.Context, options metav1.ListOptions) (*corev1.PodList, error) EvictPod(pod corev1.Pod) error GetReplicaSet(name, namespace string) (*appsv1.ReplicaSet, error) }
type KubernetesClient ¶
type KubernetesClient interface { GetPod(pod, namespace string) (*corev1.Pod, error) GetDeployment(name, namespace string) (*appsv1.Deployment, error) GetDaemonSet(name, namespace string) (*appsv1.DaemonSet, error) GetStatefulSet(name, namespace string) (*appsv1.StatefulSet, error) GetReplicaSet(name, namespace string) (*appsv1.ReplicaSet, error) GetNode(name string) (*corev1.Node, error) GetDeploymentFromPod(pod *corev1.Pod) (*appsv1.Deployment, error) GetDaemonsetFromPod(pod *corev1.Pod) (*appsv1.DaemonSet, error) GetStatefulsetFromPod(pod *corev1.Pod) (*appsv1.StatefulSet, error) GetReplicasetFromPod(pod *corev1.Pod) (*appsv1.ReplicaSet, error) GetNodeFromPod(pod *corev1.Pod) (*corev1.Node, error) GetTarget(resource, name, namespace string) (any, error) GetNamespace(name string) (*corev1.Namespace, error) GetConfigMap(name, namespace string) (*corev1.ConfigMap, error) GetSecret(name, namespace string) (*corev1.Secret, error) GetService(name, namespace string) (*corev1.Service, error) GetServiceAccount(name, namespace string) (*corev1.ServiceAccount, error) GetRole(name, namespace string) (*rbacv1.Role, error) GetClusterRole(name, namespace string) (*rbacv1.ClusterRole, error) GetWatcherEndpointSlices(labelSelector, namespace string) (<-chan watch.Event, error) GetLeaseHolder() (<-chan string, error) Exec(namespace, pod, container string, command []string, script string) (*bytes.Buffer, error) CreateEphemeralContainer(pod *corev1.Pod, container, name string, ttl int) error ListPods(ctx context.Context, opts metav1.ListOptions) (*corev1.PodList, error) EvictPod(pod corev1.Pod) error }
need to be renamed to Client all the actionners need to depend on this interface so we can rename it to Client without generating errors
Click to show internal directories.
Click to hide internal directories.