package
0.0.0-20240815173558-303cc3735024
Repository: https://github.com/libopenstorage/operator.git
Documentation: pkg.go.dev
# Functions
AddDefaultRegistryToImage adds default registry to image.
ComponentsPausedForMigration returns true if the daemonset migration is going on and the components are waiting for storage pods to migrate first.
DeepEqualObject compare two objects.
DeepEqualObjects compares two arrays of objects.
DeepEqualPodTemplate compares if two pod template specs are same.
ExtractVolumesAndMounts returns a list of Kubernetes volumes and volume mounts from the given StorageCluster volume specs.
GetCustomAnnotations returns custom annotations for different StorageCluster components from spec.
GetCustomLabels returns custom labels for different StorageCluster components from spec.
GetImageMajorVersion returns the major version for a given image.
GetImageURN returns the complete image name based on the registry and repo.
GetStorageClusterCondition returns the condition based on source and type.
GetTopologySpreadConstraints returns pod topology spread constraints spec.
GetTopologySpreadConstraintsFromNodes returns pod topology spread constraints spec.
HasNodeAffinityChanged checks if the nodeAffinity in the cluster is same as the node affinity in the given affinity.
HasPullSecretChanged checks if the imagePullSecret in the cluster is the only one in the given list of pull secrets.
HasResourceListChanged compares two resource lists.
HasResourcesChanged compares two resources, reflect.DeepEqual does not work due to the format may change, for example CPU 0.1 and 100m should be the same.
HasSchedulerStateChanged checks if the stork has been enabled/disabled in the StorageCluster.
HaveTolerationsChanged checks if the tolerations in the cluster are same as the given list of tolerations.
HaveTopologySpreadConstraintsChanged checks if the deployment has pod topology spread constraints changed.
IsPartialSecretRef is a helper method that checks if a SecretRef is partially specified (i.e.
UpdateLiveStorageClusterLifecycle updates live storage cluster phase only to report cluster lifecycle.
UpdateStorageClusterCondition update condition based on source and type.
# Constants
AllStoragelessNodesReason is added to an event when all the nodes in the cluster is labelled as storageless.
ClusterOnlineReason is added to an event when a cluster comes online.
DefaultImageRegistry is the default registry when no registry is provided.
DefaultStorageClusterUniqueLabelKey is the controller revision hash of storage cluster.
FailedComponentReason is added to an event when setting up or removing a component fails.
FailedPlacementReason is added to an event when operator can't schedule a Pod to a specified node.
FailedPreFlight is added to denote pre-flight failure.
FailedStoragePodReason is added to an event when the status of a Pod of a cluster is 'Failed'.
FailedSyncReason is added to an event when the status of the cluster could not be synced.
FailedToEvictVM indicates that the eviction of a virtual machine failed during PX update.
FailedValidationReason is added to an event when operator validations fail.
InvalidMinAvailable is added to an event when minAvailable value for PodDisruptionBudget provided by the user is invalid.
MigrationCompletedReason is added to an event when the migration is completed.
MigrationDryRunCompletedReason is added to an event when dry run is completed.
MigrationDryRunFailedReason is added to an event when dry run fails.
MigrationFailedReason is added to an event when the migration fails.
MigrationPendingReason is added to an event when the migration is in pending state.
NodeTypeKey is the key of the label used to set node as storage or storageless.
PassedPreFlight is added to denote pre-flight Passed.
StoragelessNodeValue is the value for storage node.
StorageNodeValue is the value for storage node.
StoragePartitioningEnvKey is the storage spec environment variable used to set storage/storageless node type.
StorkSchedulerName is the default scheduler for px-csi-ext pods.
TelemetryDisabledReason is added to an event when the telemetry is disabled by operator.
TelemetryEnabledReason is added to an event when the telemetry is enabled by operator.
UnevenStorageNodesReason is added to an event when there are uneven number of storage nodes are labelled across zones.
UpdatePausedReason is added to an event when operator pauses update of the storage cluster or node.
ValidMinAvailable is added to an event when minAvailable value for PodDisruptionBudget is valid.
# Structs
VMPodEviction has info about the virt-launcher pod that needs to be evicted before upgrading PX on a node.