Documentation
¶
Overview ¶
Package clusterutils provides functions to handle cluster actions
Index ¶
- func AllPodsHaveAnnotations(ctx context.Context, crudClient client.Client, namespace, clusterName string, ...) (bool, error)
- func AllPodsHaveLabels(ctx context.Context, crudClient client.Client, namespace, clusterName string, ...) (bool, error)
- func Get(ctx context.Context, crudClient client.Client, namespace, name string) (*apiv1.Cluster, error)
- func GetPrimary(ctx context.Context, crudClient client.Client, namespace, clusterName string) (*corev1.Pod, error)
- func GetReplicas(ctx context.Context, crudClient client.Client, namespace, clusterName string) (*corev1.PodList, error)
- func HasAnnotations(cluster *apiv1.Cluster, annotations map[string]string) bool
- func HasLabels(cluster *apiv1.Cluster, labels map[string]string) bool
- func ListPods(ctx context.Context, crudClient client.Client, namespace, clusterName string) (*corev1.PodList, error)
- func ScaleSize(ctx context.Context, crudClient client.Client, namespace, clusterName string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllPodsHaveAnnotations ¶
func AllPodsHaveAnnotations( ctx context.Context, crudClient client.Client, namespace, clusterName string, annotations map[string]string, ) (bool, error)
AllPodsHaveAnnotations verifies if the annotations defined in a map are included in all the pods of a cluster
func AllPodsHaveLabels ¶
func AllPodsHaveLabels( ctx context.Context, crudClient client.Client, namespace, clusterName string, labels map[string]string, ) (bool, error)
AllPodsHaveLabels verifies if the labels defined in a map are included in all the pods of a cluster
func Get ¶
func Get( ctx context.Context, crudClient client.Client, namespace, name string, ) (*apiv1.Cluster, error)
Get gets a cluster given name and namespace
func GetPrimary ¶
func GetPrimary( ctx context.Context, crudClient client.Client, namespace, clusterName string, ) (*corev1.Pod, error)
GetPrimary gets the primary pod of a cluster
func GetReplicas ¶
func GetReplicas( ctx context.Context, crudClient client.Client, namespace, clusterName string, ) (*corev1.PodList, error)
GetReplicas gets a slice containing all the replica pods of a cluster
func HasAnnotations ¶
HasAnnotations verifies that the annotations of a cluster contain a specified annotations map
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.