Documentation ¶
Index ¶
- Constants
- func AddGenericProgressingStatusCondition(conditions *[]metav1.Condition, conditionType string, obj runtime.Object, ...)
- func AggregateStatusConditions(conditions []metav1.Condition, condition metav1.Condition) (metav1.Condition, error)
- func FilterObjectMapByLabel[T metav1.Object](objects map[string]T, selector labels.Selector) map[string]T
- func FindContainerStatus(pod *corev1.Pod, containerName string) *corev1.ContainerStatus
- func FindNodeConfigCondition(conditions []scyllav1alpha1.NodeConfigCondition, ...) *scyllav1alpha1.NodeConfigCondition
- func FindNodeStatus(nodeStatuses []scyllav1alpha1.NodeConfigNodeStatus, nodeName string) *scyllav1alpha1.NodeConfigNodeStatus
- func FindScyllaContainerStatus(pod *corev1.Pod) *corev1.ContainerStatus
- func FindStatusConditionsWithSuffix(conditions []metav1.Condition, suffix string) []metav1.Condition
- func GenerateMergePatch(original runtime.Object, modified runtime.Object) ([]byte, error)
- func GetNodePointerArrayFromArray(nodes []corev1.Node) []*corev1.Node
- func GetObjects[CT, T kubeinterfaces.ObjectInterface](ctx context.Context, controller metav1.Object, ...) (map[string]T, error)
- func GetObjectsWithFilter[CT, T kubeinterfaces.ObjectInterface](ctx context.Context, controller metav1.Object, ...) (map[string]T, error)
- func GetPodCondition(conditions []corev1.PodCondition, conditionType corev1.PodConditionType) *corev1.PodCondition
- func GetRequiredScyllaHosts(sc *scyllav1.ScyllaCluster, services map[string]*corev1.Service) ([]string, error)
- func GetScyllaContainerID(pod *corev1.Pod) (string, error)
- func GetScyllaHost(statefulsetName string, ordinal int32, services map[string]*corev1.Service) (string, error)
- func GetScyllaIPFromService(svc *corev1.Service) (string, error)
- func IsDaemonSetRolledOut(ds *appsv1.DaemonSet) (bool, error)
- func IsNodeConfigSelectingNode(nc *scyllav1alpha1.NodeConfig, node *corev1.Node) (bool, error)
- func IsNodeTuned(ncnss []scyllav1alpha1.NodeConfigNodeStatus, nodeName string) bool
- func IsNodeTunedForContainer(nc *scyllav1alpha1.NodeConfig, nodeName string, containerID string) bool
- func IsOrphanedPV(pv *corev1.PersistentVolume, nodes []*corev1.Node) (bool, error)
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodReadyWithPositiveLiveCheck(ctx context.Context, client corev1client.PodsGetter, pod *corev1.Pod) (bool, *corev1.Pod, error)
- func IsScyllaContainerRunning(pod *corev1.Pod) bool
- func IsScyllaPod(pod *corev1.Pod) bool
- func IsStatefulSetRolledOut(sts *appsv1.StatefulSet) (bool, error)
- func NewScyllaClient(cfg *scyllaclient.Config) (*scyllaclient.Client, error)
- func NewScyllaClientForLocalhost() (*scyllaclient.Client, error)
- func NewScyllaClientFromToken(hosts []string, authToken string) (*scyllaclient.Client, error)
- func Prune[T kubeinterfaces.ObjectInterface](ctx context.Context, requiredObjects []T, existingObjects map[string]T, ...) error
- func RunSync(conditions *[]metav1.Condition, ...) error
- func SetAggregatedNodeConditions(nodeName string, conditions *[]metav1.Condition, generation int64) error
- func SetAggregatedWorkloadConditions(conditions *[]metav1.Condition, generation int64) error
- func SetNodeConfigStatusCondition(conditions *[]scyllav1alpha1.NodeConfigCondition, ...)
- func SetNodeStatus(nodeStatuses []scyllav1alpha1.NodeConfigNodeStatus, ...) []scyllav1alpha1.NodeConfigNodeStatus
- func SetRackCondition(rackStatus *scyllav1.RackStatus, newCondition scyllav1.RackConditionType)
- func SetStatusConditionFromError(conditions *[]metav1.Condition, err error, conditionType string, ...)
- type ControlleeManagerGetObjectsFuncs
- func (f ControlleeManagerGetObjectsFuncs[CT, T]) GetControllerUncached(ctx context.Context, name string, opts metav1.GetOptions) (CT, error)
- func (f ControlleeManagerGetObjectsFuncs[CT, T]) ListObjects(selector labels.Selector) ([]T, error)
- func (f ControlleeManagerGetObjectsFuncs[CT, T]) PatchObject(ctx context.Context, name string, pt types.PatchType, data []byte, ...) (T, error)
- type ControlleeManagerGetObjectsInterface
- type DeleteFuncType
- type EnqueueFuncType
- type GetFuncType
- type HandlerOperationType
- type Handlers
- func (h *Handlers[T]) Enqueue(depth int, untypedObj kubeinterfaces.ObjectInterface, op HandlerOperationType)
- func (h *Handlers[T]) EnqueueAll(depth int, untypedObj kubeinterfaces.ObjectInterface, op HandlerOperationType)
- func (h *Handlers[QT]) EnqueueOwner(depth int, obj kubeinterfaces.ObjectInterface, operation HandlerOperationType)
- func (h *Handlers[QT]) EnqueueOwnerFunc(enqueueFunc EnqueueFuncType) EnqueueFuncType
- func (h *Handlers[T]) EnqueueWithFilterFunc(filterFunc func(T) bool) EnqueueFuncType
- func (h *Handlers[T]) HandleAdd(obj kubeinterfaces.ObjectInterface, enqueueFunc EnqueueFuncType)
- func (h *Handlers[T]) HandleAddWithDepth(depth int, obj any, enqueueFunc EnqueueFuncType)
- func (h *Handlers[T]) HandleDelete(obj any, enqueueFunc EnqueueFuncType)
- func (h *Handlers[T]) HandleDeleteWithDepth(depth int, obj any, enqueueFunc EnqueueFuncType)
- func (h *Handlers[QT]) HandleUpdate(old, cur any, enqueueFunc EnqueueFuncType, deleteFunc DeleteFuncType)
- func (h *Handlers[QT]) HandleUpdateWithDepth(depth int, oldUntyped, curUntyped any, enqueueFunc EnqueueFuncType, ...)
- type InformerHandler
- type KeyFuncType
- type PruneControlFuncs
- type PruneControlInterface
- type RequeueError
Constants ¶
View Source
const ( HandlerOperationTypeAdd = "Add" HandlerOperationTypeUpdate = "Update" HandlerOperationTypeDelete = "Delete" )
Variables ¶
This section is empty.
Functions ¶
func AddGenericProgressingStatusCondition ¶ added in v1.8.0
func AggregateStatusConditions ¶ added in v1.8.0
func FilterObjectMapByLabel ¶ added in v1.9.0
func FindContainerStatus ¶ added in v1.8.0
func FindContainerStatus(pod *corev1.Pod, containerName string) *corev1.ContainerStatus
func FindNodeConfigCondition ¶
func FindNodeConfigCondition(conditions []scyllav1alpha1.NodeConfigCondition, conditionType scyllav1alpha1.NodeConfigConditionType) *scyllav1alpha1.NodeConfigCondition
FindNodeConfigCondition finds the conditionType in conditions.
func FindNodeStatus ¶
func FindNodeStatus(nodeStatuses []scyllav1alpha1.NodeConfigNodeStatus, nodeName string) *scyllav1alpha1.NodeConfigNodeStatus
func FindScyllaContainerStatus ¶
func FindScyllaContainerStatus(pod *corev1.Pod) *corev1.ContainerStatus
func FindStatusConditionsWithSuffix ¶ added in v1.8.0
func FindStatusConditionsWithSuffix(conditions []metav1.Condition, suffix string) []metav1.Condition
FindStatusConditionsWithSuffix finds all conditions that end with the suffix, except the identity.
func GenerateMergePatch ¶
func GetObjects ¶ added in v1.9.0
func GetObjects[CT, T kubeinterfaces.ObjectInterface]( ctx context.Context, controller metav1.Object, controllerGVK schema.GroupVersionKind, selector labels.Selector, control ControlleeManagerGetObjectsInterface[CT, T], ) (map[string]T, error)
func GetObjectsWithFilter ¶ added in v1.9.0
func GetObjectsWithFilter[CT, T kubeinterfaces.ObjectInterface]( ctx context.Context, controller metav1.Object, controllerGVK schema.GroupVersionKind, selector labels.Selector, filterFunc func(T) bool, control ControlleeManagerGetObjectsInterface[CT, T], ) (map[string]T, error)
func GetPodCondition ¶
func GetPodCondition(conditions []corev1.PodCondition, conditionType corev1.PodConditionType) *corev1.PodCondition
func GetRequiredScyllaHosts ¶
func GetScyllaHost ¶
func IsNodeConfigSelectingNode ¶
func IsNodeConfigSelectingNode(nc *scyllav1alpha1.NodeConfig, node *corev1.Node) (bool, error)
func IsNodeTuned ¶
func IsNodeTuned(ncnss []scyllav1alpha1.NodeConfigNodeStatus, nodeName string) bool
func IsNodeTunedForContainer ¶
func IsNodeTunedForContainer(nc *scyllav1alpha1.NodeConfig, nodeName string, containerID string) bool
func IsOrphanedPV ¶
func IsPodReady ¶
func IsPodReadyWithPositiveLiveCheck ¶
func IsPodReadyWithPositiveLiveCheck(ctx context.Context, client corev1client.PodsGetter, pod *corev1.Pod) (bool, *corev1.Pod, error)
func IsScyllaPod ¶ added in v1.9.0
func IsStatefulSetRolledOut ¶
func IsStatefulSetRolledOut(sts *appsv1.StatefulSet) (bool, error)
func NewScyllaClient ¶ added in v1.8.0
func NewScyllaClient(cfg *scyllaclient.Config) (*scyllaclient.Client, error)
func NewScyllaClientForLocalhost ¶ added in v1.8.0
func NewScyllaClientForLocalhost() (*scyllaclient.Client, error)
func NewScyllaClientFromToken ¶
func NewScyllaClientFromToken(hosts []string, authToken string) (*scyllaclient.Client, error)
func Prune ¶ added in v1.9.0
func Prune[T kubeinterfaces.ObjectInterface](ctx context.Context, requiredObjects []T, existingObjects map[string]T, control PruneControlInterface, eventRecorder record.EventRecorder) error
func SetAggregatedNodeConditions ¶ added in v1.9.0
func SetAggregatedWorkloadConditions ¶ added in v1.9.0
func SetNodeConfigStatusCondition ¶ added in v1.9.0
func SetNodeConfigStatusCondition(conditions *[]scyllav1alpha1.NodeConfigCondition, newCondition scyllav1alpha1.NodeConfigCondition)
SetNodeConfigStatusCondition sets the corresponding condition in conditions to newCondition. conditions must be non-nil. If the condition of the specified type already exists (all fields of the existing condition are updated to newCondition, LastTransitionTime is set to now if the new status differs from the old status) If a condition of the specified type does not exist (LastTransitionTime is set to now() if unset, and newCondition is appended)
func SetNodeStatus ¶
func SetNodeStatus(nodeStatuses []scyllav1alpha1.NodeConfigNodeStatus, status *scyllav1alpha1.NodeConfigNodeStatus) []scyllav1alpha1.NodeConfigNodeStatus
func SetRackCondition ¶
func SetRackCondition(rackStatus *scyllav1.RackStatus, newCondition scyllav1.RackConditionType)
Types ¶
type ControlleeManagerGetObjectsFuncs ¶ added in v1.9.0
type ControlleeManagerGetObjectsFuncs[CT, T kubeinterfaces.ObjectInterface] struct { GetControllerUncachedFunc func(ctx context.Context, name string, opts metav1.GetOptions) (CT, error) ListObjectsFunc func(selector labels.Selector) ([]T, error) PatchObjectFunc func(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (T, error) }
func (ControlleeManagerGetObjectsFuncs[CT, T]) GetControllerUncached ¶ added in v1.9.0
func (f ControlleeManagerGetObjectsFuncs[CT, T]) GetControllerUncached(ctx context.Context, name string, opts metav1.GetOptions) (CT, error)
func (ControlleeManagerGetObjectsFuncs[CT, T]) ListObjects ¶ added in v1.9.0
func (f ControlleeManagerGetObjectsFuncs[CT, T]) ListObjects(selector labels.Selector) ([]T, error)
func (ControlleeManagerGetObjectsFuncs[CT, T]) PatchObject ¶ added in v1.9.0
type ControlleeManagerGetObjectsInterface ¶ added in v1.9.0
type ControlleeManagerGetObjectsInterface[CT, T kubeinterfaces.ObjectInterface] interface { GetControllerUncached(ctx context.Context, name string, opts metav1.GetOptions) (CT, error) ListObjects(selector labels.Selector) ([]T, error) PatchObject(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (T, error) }
type DeleteFuncType ¶ added in v1.9.0
type DeleteFuncType = func(any)
type EnqueueFuncType ¶ added in v1.9.0
type EnqueueFuncType func(int, kubeinterfaces.ObjectInterface, HandlerOperationType)
type GetFuncType ¶ added in v1.9.0
type HandlerOperationType ¶ added in v1.9.0
type HandlerOperationType string
type Handlers ¶ added in v1.9.0
type Handlers[T kubeinterfaces.ObjectInterface] struct { // contains filtered or unexported fields }
func NewHandlers ¶ added in v1.9.0
func NewHandlers[T kubeinterfaces.ObjectInterface](queue workqueue.RateLimitingInterface, keyFunc KeyFuncType, scheme *runtime.Scheme, gvk schema.GroupVersionKind, getterLister kubeinterfaces.GetterLister[T]) (*Handlers[T], error)
func (*Handlers[T]) Enqueue ¶ added in v1.9.0
func (h *Handlers[T]) Enqueue(depth int, untypedObj kubeinterfaces.ObjectInterface, op HandlerOperationType)
func (*Handlers[T]) EnqueueAll ¶ added in v1.9.0
func (h *Handlers[T]) EnqueueAll(depth int, untypedObj kubeinterfaces.ObjectInterface, op HandlerOperationType)
func (*Handlers[QT]) EnqueueOwner ¶ added in v1.9.0
func (h *Handlers[QT]) EnqueueOwner(depth int, obj kubeinterfaces.ObjectInterface, operation HandlerOperationType)
func (*Handlers[QT]) EnqueueOwnerFunc ¶ added in v1.9.0
func (h *Handlers[QT]) EnqueueOwnerFunc(enqueueFunc EnqueueFuncType) EnqueueFuncType
func (*Handlers[T]) EnqueueWithFilterFunc ¶ added in v1.9.0
func (h *Handlers[T]) EnqueueWithFilterFunc(filterFunc func(T) bool) EnqueueFuncType
func (*Handlers[T]) HandleAdd ¶ added in v1.9.0
func (h *Handlers[T]) HandleAdd(obj kubeinterfaces.ObjectInterface, enqueueFunc EnqueueFuncType)
func (*Handlers[T]) HandleAddWithDepth ¶ added in v1.9.0
func (h *Handlers[T]) HandleAddWithDepth(depth int, obj any, enqueueFunc EnqueueFuncType)
func (*Handlers[T]) HandleDelete ¶ added in v1.9.0
func (h *Handlers[T]) HandleDelete(obj any, enqueueFunc EnqueueFuncType)
func (*Handlers[T]) HandleDeleteWithDepth ¶ added in v1.9.0
func (h *Handlers[T]) HandleDeleteWithDepth(depth int, obj any, enqueueFunc EnqueueFuncType)
func (*Handlers[QT]) HandleUpdate ¶ added in v1.9.0
func (h *Handlers[QT]) HandleUpdate(old, cur any, enqueueFunc EnqueueFuncType, deleteFunc DeleteFuncType)
func (*Handlers[QT]) HandleUpdateWithDepth ¶ added in v1.9.0
func (h *Handlers[QT]) HandleUpdateWithDepth(depth int, oldUntyped, curUntyped any, enqueueFunc EnqueueFuncType, deleteFunc DeleteFuncType)
type InformerHandler ¶ added in v1.9.0
type InformerHandler struct { Informer cache.SharedIndexInformer Handler cache.ResourceEventHandler }
type KeyFuncType ¶ added in v1.9.0
type PruneControlFuncs ¶ added in v1.9.0
type PruneControlFuncs struct {
DeleteFunc func(ctx context.Context, name string, opts metav1.DeleteOptions) error
}
func (*PruneControlFuncs) Delete ¶ added in v1.9.0
func (pcf *PruneControlFuncs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
type PruneControlInterface ¶ added in v1.9.0
type RequeueError ¶
type RequeueError struct {
// contains filtered or unexported fields
}
func NewRequeueError ¶
func NewRequeueError(reasons ...string) *RequeueError
func (*RequeueError) Error ¶
func (e *RequeueError) Error() string
Click to show internal directories.
Click to hide internal directories.