Documentation
¶
Index ¶
- func GetPrimaryPod(ctx context.Context, cli client.Client, cr *v2.PerconaPGCluster) (*corev1.Pod, error)
- func GetReplicaPods(ctx context.Context, cli client.Client, cr *v2.PerconaPGCluster) ([]corev1.Pod, error)
- func SuspendInstance(ctx context.Context, cli client.Client, instanceKey client.ObjectKey) (bool, error)
- func UnsuspendInstance(ctx context.Context, cli client.Client, instanceKey client.ObjectKey) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPrimaryPod ¶
func GetPrimaryPod(ctx context.Context, cli client.Client, cr *v2.PerconaPGCluster) (*corev1.Pod, error)
GetPrimaryPod returns the primary pod. K8SPG-882
func GetReplicaPods ¶ added in v2.9.0
func GetReplicaPods(ctx context.Context, cli client.Client, cr *v2.PerconaPGCluster) ([]corev1.Pod, error)
GetReplicaPods lists the replica pods for a given cluster.
func SuspendInstance ¶ added in v2.9.0
func SuspendInstance(ctx context.Context, cli client.Client, instanceKey client.ObjectKey) (bool, error)
SuspendInstance suspends an instance by setting the AnnotationInstanceSuspended annotation on the StatefulSet. Returns true if the instance was suspended. Caller is responsible for waiting for the instance to be suspended.
func UnsuspendInstance ¶ added in v2.9.0
func UnsuspendInstance(ctx context.Context, cli client.Client, instanceKey client.ObjectKey) (bool, error)
UnsuspendInstance unsuspends an instance by removing the AnnotationInstanceSuspended annotation on the StatefulSet. Returns true if the instance was unsuspended. Caller is responsible for waiting for the instance to be unsuspended.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.