# Functions
ComposePredicates will compose a variable number of predicates and return a predicate that will allow events that are allowed by any of the given predicates.
GetOperatorNamespace returns the namespace where the operator is deployed.
No description provided by the author
GetWatchNamespace returns the namespace the operator should be watching for changes.
MapCephClusterNegativeConditions maps the status states from CephCluster resource into ocs status conditions.
MapCephClusterNoConditions sets status conditions to progressing.
MapExternalCephClusterNegativeConditions maps the status states from CephCluster resource into ocs status conditions.
MapNoobaaNegativeConditions records noobaa related conditions This will only look for negative conditions: !Available, Degraded, Progressing.
NewEventReporter returns EventReporter object.
RemoveExternalCephClusterNegativeConditions removes the External cluster negative conditions.
SetCompleteCondition sets the ConditionReconcileComplete to True and other Conditions to indicate that the reconciliation process has completed successfully.
SetErrorCondition sets the ConditionReconcileComplete to False in case of any errors during the reconciliation process.
SetProgressingCondition sets the ProgressingCondition to True and other conditions to false or Unknown.
SetVersionMismatchCondition sets the ConditionVersionMismatch to the status passed as argument, if the same status is not already present.
# Constants
EventReasonUninstallPending is used when the StorageCluster uninstall is Pending.
EventReasonValidationFailed is used when the StorageCluster spec validation fails.
ExternalClusterConnectingReason indicates the storage cluster is trying to connect to an external one.
ExternalClusterErrorReason indicates an error state.
ExternalClusterUnknownReason is for unknown cluster condition/state.
This configmap is purely for the OCS operator to use.
OperatorNamespaceEnvVar is the constant for env variable OPERATOR_NAMESPACE which is the namespace where operator pod is deployed.
This configmap is watched by rook-ceph-operator & is reserved only for manual overrides.
VersionValidReason indicates version in SC CR and operator is equal.
WatchNamespaceEnvVar is the constant for env variable WATCH_NAMESPACE which is the namespace where the watch activity happens.
# Variables
PhaseClusterExpanding is used when cluster is expanding capacity.
PhaseConnecting is used when cluster is connecting to external cluster.
PhaseDeleting is used when cluster is deleting.
PhaseError is used when SetErrorCondition is called.
PhaseIgnored is used when a resource is ignored.
PhaseNotReady is used when waiting for system to be ready after reconcile is successful.
PhaseOnboarding is used when consumer is Onboarding.
PhaseProgressing is used when SetProgressingCondition is called.
PhaseReady is used when SetCompleteCondition is called.
# Structs
EventReporter is custom events reporter type which allows user to limit the events.
MetadataChangedPredicate will only allow events that changed labels, annotations, or finalizers.