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 GetStatefulSetForRack(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster, ...) (*appsv1.StatefulSet, 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 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
- type StrategicMergePatchFunc
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 GetStatefulSetForRack ¶ added in v1.1.0
func GetStatefulSetForRack(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster, kubeClient kubernetes.Interface) (*appsv1.StatefulSet, error)
GetStatefulSetForRack returns rack underlying StatefulSet.
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 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 ¶
type StrategicMergePatchFunc ¶ added in v1.1.0
The StrategicMergePatchFunc type is an adapter to allow the use of ordinary functions as Strategic Merge Patch.
func (StrategicMergePatchFunc) Data ¶ added in v1.1.0
func (f StrategicMergePatchFunc) Data(obj runtime.Object) ([]byte, error)
Data returns the raw data representing the patch.
func (StrategicMergePatchFunc) Type ¶ added in v1.1.0
func (f StrategicMergePatchFunc) Type() types.PatchType
Type returns PatchType of Strategic Merge Patch