Documentation ¶
Index ¶
- func AreStatefulSetStatusesStale(ctx context.Context, c *scyllav1.ScyllaCluster, client client.Client) (bool, error)
- func GetMemberServicesForRack(ctx context.Context, r scyllav1.RackSpec, c *scyllav1.ScyllaCluster, ...) ([]corev1.Service, error)
- func LoggerForCluster(c *scyllav1.ScyllaCluster) log.Logger
- func MarkAsReplaceCandidate(ctx context.Context, member *corev1.Service, kubeClient kubernetes.Interface) error
- func NewControllerRef(c *scyllav1.ScyllaCluster) metav1.OwnerReference
- func PatchService(ctx context.Context, old, new *corev1.Service, kubeClient kubernetes.Interface) error
- func PatchStatefulSet(ctx context.Context, old, new *appsv1.StatefulSet, ...) error
- func RefFromInt32(i int32) *int32
- func RefFromString(s string) *string
- func ScaleStatefulSet(ctx context.Context, sts *appsv1.StatefulSet, amount int32, ...) error
- func UpgradeStatefulSetScyllaImage(ctx context.Context, sts *appsv1.StatefulSet, image string, ...) error
- func VerifyOwner(obj, owner metav1.Object) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreStatefulSetStatusesStale ¶
func AreStatefulSetStatusesStale(ctx context.Context, c *scyllav1.ScyllaCluster, client client.Client) (bool, error)
StatefulSetStatusesStale checks if the StatefulSet Objects of a Cluster have been observed by the StatefulSet controller. If they haven't, their status might be stale, so it's better to wait and process them later.
func LoggerForCluster ¶
func LoggerForCluster(c *scyllav1.ScyllaCluster) log.Logger
LoggerForCluster returns a logger that will log with context about the current cluster
func MarkAsReplaceCandidate ¶ added in v1.0.0
func MarkAsReplaceCandidate(ctx context.Context, member *corev1.Service, kubeClient kubernetes.Interface) error
MarkAsReplaceCandidate patches member service with special label indicating that service must be replaced.
func NewControllerRef ¶
func NewControllerRef(c *scyllav1.ScyllaCluster) metav1.OwnerReference
NewControllerRef returns an OwnerReference to the provided Cluster Object
func PatchService ¶
func PatchService(ctx context.Context, old, new *corev1.Service, kubeClient kubernetes.Interface) error
PatchService patches the old Service so that it matches the new Service.
func PatchStatefulSet ¶
func PatchStatefulSet(ctx context.Context, old, new *appsv1.StatefulSet, kubeClient kubernetes.Interface) error
PatchStatefulSet patches the old StatefulSet so that it matches the new StatefulSet.
func RefFromInt32 ¶
RefFromInt32 is a helper function that takes a int32 and outputs a reference to that int.
func RefFromString ¶
RefFromString is a helper function that takes a string and outputs a reference to that string. Useful for initializing a string pointer from a literal.
func ScaleStatefulSet ¶
func ScaleStatefulSet(ctx context.Context, sts *appsv1.StatefulSet, amount int32, kubeClient kubernetes.Interface) error
ScaleStatefulSet attempts to scale a StatefulSet by the given amount
func UpgradeStatefulSetScyllaImage ¶
func UpgradeStatefulSetScyllaImage(ctx context.Context, sts *appsv1.StatefulSet, image string, kubeClient kubernetes.Interface) error
UpgradeStatefulSetScyllaImage attempts to set the image of a StatefulSet
func VerifyOwner ¶
VerifyOwner checks if the owner Object is the controller of the obj Object and returns an error if it isn't.
Types ¶
This section is empty.