Documentation ¶
Index ¶
- Constants
- Variables
- func CheckFileExists(filePath string) error
- func GetProviderAPIServerDeployment(instance *ocsv1.StorageCluster) *appsv1.Deployment
- func GetProviderAPIServerSecret(instance *ocsv1.StorageCluster) *corev1.Secret
- func GetProviderAPIServerService(instance *ocsv1.StorageCluster) *corev1.Service
- func NewUpgradeable(cl client.Client) (conditions.Condition, error)
- func RandomString(l int) string
- func ReadinessSet()
- func ReadinessUnset()
- func StorageClassByV1Resource(resourceName corev1.ResourceName) string
- type CleanupPolicyType
- type ClusterClaimCreator
- type ExternalResource
- type ImageMap
- type MatchingLabelsSelector
- type Platform
- type ReconcileStrategy
- type SnapshotClassConfiguration
- type SnapshotterType
- type StorageClassConfiguration
- type StorageClassProvisionerType
- type StorageClusterReconciler
- func (r *StorageClusterReconciler) CreateOrUpdatePrometheusRules(ctx context.Context, rule *monitoringv1.PrometheusRule) error
- func (r *StorageClusterReconciler) DevicesDefaultToFastForThisPlatform() (bool, error)
- func (r *StorageClusterReconciler) PlatformsShouldSkipObjectStore() (bool, error)
- func (r *StorageClusterReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (r *StorageClusterReconciler) SetOperatorConditions(message string, reason string, isUpgradeable v1.ConditionStatus, ...) error
- func (r *StorageClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
- type UninstallModeType
Constants ¶
const ( RookCephMonSecretName = "rook-ceph-mon" FsidKey = "fsid" OdfOperatorNamePrefix = "odf-operator" ClusterClaimCRDName = "clusterclaims.cluster.open-cluster-management.io" )
const ( // KMSConfigMapName is the name configmap which has KMS config details KMSConfigMapName = "ocs-kms-connection-details" // CSIKMSConfigMapName is the name of configmap provided to the CSI Operator CSIKMSConfigMapName = "csi-kms-connection-details" // KMSTokenSecretName is the name of the secret which has KMS token details KMSTokenSecretName = "ocs-kms-token" // CSIKMSTokenSecretName is the name of the secret which has the KMS token details of encrypted storage class CSIKMSTokenSecretName = "ceph-csi-kms-token" // KMSProviderKey is the key in config map to get the KMS provider name KMSProviderKey = "KMS_PROVIDER" // VaultKMSProvider a constant to represent 'vault' KMS provider VaultKMSProvider = "vault" // VaultTokenAuthMethod is the key to represent vault token based authentication VaultTokenAuthMethod = "token" // VaultSAAuthMethod is the key to represent vault k8s service account based authentication VaultSAAuthMethod = "kubernetes" // IbmKeyProtectKMSProvider a constant to represent IBM hpcs KMS provider IbmKeyProtectKMSProvider = "ibmkeyprotect" // ThalesKMSProvider a constant to represent Thales (using KMIP) KMS provider ThalesKMSProvider = "kmip" )
const ( // ReconcileStrategyUnknown is the same as default ReconcileStrategyUnknown ReconcileStrategy = "" // ReconcileStrategyInit means reconcile once and ignore if it exists ReconcileStrategyInit ReconcileStrategy = "init" // ReconcileStrategyIgnore means never reconcile ReconcileStrategyIgnore ReconcileStrategy = "ignore" // ReconcileStrategyManage means always reconcile ReconcileStrategyManage ReconcileStrategy = "manage" // ReconcileStrategyStandalone means to renconcile the component exclusively (NooBaa) ReconcileStrategyStandalone ReconcileStrategy = "standalone" // DeviceTypeSSD represents the DeviceType SSD DeviceTypeSSD = "ssd" // DeviceTypeHDD represents the DeviceType HDD DeviceTypeHDD = "hdd" // DeviceTypeNVMe represents the DeviceType NVMe DeviceTypeNVMe = "nvme" // AzureDisk represents Azure Premium Managed Disks provisioner for StorageClass AzureDisk StorageClassProvisionerType = "kubernetes.io/azure-disk" // EBS represents AWS EBS provisioner for StorageClass EBS StorageClassProvisionerType = "kubernetes.io/aws-ebs" )
const ( // CleanupPolicyAnnotation defines the cleanup policy for data and metadata during uninstall CleanupPolicyAnnotation = "uninstall.ocs.openshift.io/cleanup-policy" // CleanupPolicyDelete when set, modifies the cleanup policy for Rook to delete the DataDirHostPath on uninstall CleanupPolicyDelete CleanupPolicyType = "delete" // CleanupPolicyRetain when set, modifies the cleanup policy for Rook to not cleanup the DataDirHostPath and the disks on uninstall CleanupPolicyRetain CleanupPolicyType = "retain" // UninstallModeAnnotation defines the uninstall mode UninstallModeAnnotation = "uninstall.ocs.openshift.io/mode" // UninstallModeForced when set, sets the uninstall mode for Rook and Noobaa to forced. UninstallModeForced UninstallModeType = "forced" // UninstallModeGraceful when set, sets the uninstall mode for Rook and Noobaa to graceful. UninstallModeGraceful UninstallModeType = "graceful" )
const (
// DisasterRecoveryTargetAnnotation signifies that the cluster is intended to be used for Disaster Recovery
DisasterRecoveryTargetAnnotation = "ocs.openshift.io/clusterIsDisasterRecoveryTarget"
)
const (
MonitoringNamespace = "openshift-monitoring"
)
Variables ¶
var ( ClusterClaimGroup = "odf" OdfVersion = fmt.Sprintf("version.%s.openshift.io", ClusterClaimGroup) StorageSystemName = fmt.Sprintf("storagesystemname.%s.openshift.io", ClusterClaimGroup) StorageClusterName = fmt.Sprintf("storageclustername.%s.openshift.io", ClusterClaimGroup) StorageClusterCount = fmt.Sprintf("count.storageclusters.%s.openshift.io", ClusterClaimGroup) StorageClusterDROptimized = fmt.Sprintf("droptimized.%s.openshift.io", ClusterClaimGroup) CephFsid = fmt.Sprintf("cephfsid.%s.openshift.io", ClusterClaimGroup) )
var ReadinessChecker healthz.Checker = func(_ *http.Request) error { if operatorReady { return nil } return errors.New("StorageCluster is not ready yet") }
var SkipObjectStorePlatforms = []configv1.PlatformType{ configv1.AWSPlatformType, configv1.GCPPlatformType, configv1.AzurePlatformType, configv1.IBMCloudPlatformType, }
SkipObjectStorePlatforms is a list of all PlatformTypes where CephObjectStores will not be deployed.
var TuneFastPlatforms = []configv1.PlatformType{ configv1.OvirtPlatformType, configv1.IBMCloudPlatformType, configv1.AzurePlatformType, }
TuneFastPlatforms is a list of all PlatformTypes where TuneFastDeviceClass has to be set True.
Functions ¶
func CheckFileExists ¶
CheckFileExists checks for existence of file in given filepath
func GetProviderAPIServerDeployment ¶
func GetProviderAPIServerDeployment(instance *ocsv1.StorageCluster) *appsv1.Deployment
func GetProviderAPIServerSecret ¶
func GetProviderAPIServerSecret(instance *ocsv1.StorageCluster) *corev1.Secret
func GetProviderAPIServerService ¶
func GetProviderAPIServerService(instance *ocsv1.StorageCluster) *corev1.Service
func NewUpgradeable ¶
func NewUpgradeable(cl client.Client) (conditions.Condition, error)
NewUpgradeable returns a Conditions interface to Get or Set OperatorConditions
func RandomString ¶
RandomString - Generate a random string of A-Z chars with len = l
func ReadinessSet ¶
func ReadinessSet()
func ReadinessUnset ¶
func ReadinessUnset()
func StorageClassByV1Resource ¶
func StorageClassByV1Resource(resourceName corev1.ResourceName) string
StorageClassByV1Resource returns storageclass name from resource name
Types ¶
type CleanupPolicyType ¶
type CleanupPolicyType string
CleanupPolicyType is a string representing cleanup policy
type ClusterClaimCreator ¶
type ExternalResource ¶
type ExternalResource struct { Kind string `json:"kind"` Data map[string]string `json:"data"` Name string `json:"name"` }
ExternalResource contains a list of External Cluster Resources
type MatchingLabelsSelector ¶
MatchingLabelsSelector filters the list/delete operation on the given label selector (or index in the case of cached lists). A struct is used because labels.Selector is an interface, which cannot be aliased.
func (MatchingLabelsSelector) ApplyToList ¶
func (m MatchingLabelsSelector) ApplyToList(opts *client.ListOptions)
ApplyToList applies this configuration to the given list options. This is implemented by MatchingLabelsSelector which implements ListOption interface.
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
Platform is used to get the CloudPlatformType of the running cluster in a thread-safe manner
func (*Platform) GetPlatform ¶
GetPlatform is used to get the CloudPlatformType of the running cluster
type ReconcileStrategy ¶
type ReconcileStrategy string
ReconcileStrategy is a string representing how we want to reconcile (or not) a particular resource
type SnapshotClassConfiguration ¶
type SnapshotClassConfiguration struct {
// contains filtered or unexported fields
}
SnapshotClassConfiguration provides configuration options for a SnapshotClass.
type StorageClassConfiguration ¶
type StorageClassConfiguration struct {
// contains filtered or unexported fields
}
StorageClassConfiguration provides configuration options for a StorageClass.
type StorageClassProvisionerType ¶
type StorageClassProvisionerType string
StorageClassProvisionerType is a string representing StorageClass Provisioner. E.g: aws-ebs
type StorageClusterReconciler ¶
type StorageClusterReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme OperatorCondition conditions.Condition IsNoobaaStandalone bool IsMultipleStorageClusters bool OperatorNamespace string // contains filtered or unexported fields }
StorageClusterReconciler reconciles a StorageCluster object nolint:revive
func (*StorageClusterReconciler) CreateOrUpdatePrometheusRules ¶
func (r *StorageClusterReconciler) CreateOrUpdatePrometheusRules(ctx context.Context, rule *monitoringv1.PrometheusRule) error
CreateOrUpdatePrometheusRules creates or updates Prometheus Rule
func (*StorageClusterReconciler) DevicesDefaultToFastForThisPlatform ¶
func (r *StorageClusterReconciler) DevicesDefaultToFastForThisPlatform() (bool, error)
func (*StorageClusterReconciler) PlatformsShouldSkipObjectStore ¶
func (r *StorageClusterReconciler) PlatformsShouldSkipObjectStore() (bool, error)
PlatformsShouldSkipObjectStore determines whether an object store should be created for the platform.
func (*StorageClusterReconciler) Reconcile ¶
func (r *StorageClusterReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the cluster for a StorageCluster object and makes changes based on the state read and what is in the StorageCluster.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
func (*StorageClusterReconciler) SetOperatorConditions ¶
func (r *StorageClusterReconciler) SetOperatorConditions(message string, reason string, isUpgradeable v1.ConditionStatus, prevError error) error
func (*StorageClusterReconciler) SetupWithManager ¶
func (r *StorageClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up a controller with manager
type UninstallModeType ¶
type UninstallModeType string
UninstallModeType is a string representing cleanup mode, it decides whether the deletion is graceful or forced
Source Files ¶
- backingstorageclasses.go
- cephblockpools.go
- cephcluster.go
- cephconfig.go
- cephfilesystem.go
- cephnfs.go
- cephobjectstores.go
- cephobjectstoreusers.go
- cephrbdmirrors.go
- cephtoolbox.go
- clusterclaims.go
- csi_options.go
- exporter.go
- external_resources.go
- generate.go
- job_templates.go
- kms_resources.go
- noobaa_system_reconciler.go
- operator_conditions.go
- placement.go
- platform_detection.go
- prometheus.go
- provider_server.go
- readiness.go
- reconcile.go
- resourceprofile.go
- routes.go
- storageclasses.go
- storagecluster_controller.go
- storagequota.go
- topology.go
- uninstall_reconciler.go
- volumesnapshotterclasses.go