Documentation ¶
Index ¶
- Constants
- func CreateIBMBlockCSICR(dc dynamic.NamespaceableResourceInterface, namespace string) (*unstructured.Unstructured, error)
- func GetAllNamespace(config *rest.Config) ([]string, error)
- func GetIBMBlockCSIDynamicClient(config *rest.Config) (dynamic.NamespaceableResourceInterface, error)
- func HasIBMBlockCSICRExisted(namespaces []string, dc dynamic.NamespaceableResourceInterface) (bool, error)
- func InitDefaultStorageClass(instance *odfv1alpha1.FlashSystemCluster) *storagev1.StorageClass
- func InitExporterDeployment(instance *odfv1alpha1.FlashSystemCluster, pullPolicy corev1.PullPolicy, ...) (*appsv1.Deployment, error)
- func InitExporterMetricsService(instance *odfv1alpha1.FlashSystemCluster) *corev1.Service
- func InitExporterMetricsServiceMonitor(instance *odfv1alpha1.FlashSystemCluster) *monitoringv1.ServiceMonitor
- func IsFSCSecret(secretName string) bool
- func LoadFlashSystemCRFromFile() (*unstructured.Unstructured, error)
- type ClusterVersionReconciler
- type FlashSystemClusterReconciler
- type ReconcileMapper
- func (s *ReconcileMapper) CSIToClusterMapFunc(_ client.Object) []reconcile.Request
- func (s *ReconcileMapper) ConfigMapToClusterMapFunc(object client.Object) []reconcile.Request
- func (s *ReconcileMapper) DefaultStorageClassToClusterMapperFunc(object client.Object) []reconcile.Request
- func (s *ReconcileMapper) SecretToClusterMapFunc(object client.Object) []reconcile.Request
Constants ¶
const ( FlashSystemCRFilePath = "/config/csi.ibm.com_v1_ibmblockcsi_cr.yaml" // FlashSystemCRFilePathEnvVar is only for UT FlashSystemCRFilePathEnvVar = "TEST_FS_CR_FILEPATH" )
const ( ExporterClusterConfigMapVolumeName = "storageclass-pool" ServiceAccount = "ibm-storage-odf-operator" FlashSystemPrometheusRuleFilepath = "/prometheus-rules/prometheus-flashsystem-rules.yaml" // FlashSystemPrometheusRuleFileEnv is only for UT FlashSystemPrometheusRuleFileEnv = "TEST_FS_PROM_RULE_FILE" )
Variables ¶
This section is empty.
Functions ¶
func CreateIBMBlockCSICR ¶
func CreateIBMBlockCSICR(dc dynamic.NamespaceableResourceInterface, namespace string) (*unstructured.Unstructured, error)
func GetIBMBlockCSIDynamicClient ¶ added in v1.0.0
func GetIBMBlockCSIDynamicClient(config *rest.Config) (dynamic.NamespaceableResourceInterface, error)
func HasIBMBlockCSICRExisted ¶ added in v1.0.0
func HasIBMBlockCSICRExisted(namespaces []string, dc dynamic.NamespaceableResourceInterface) (bool, error)
func InitDefaultStorageClass ¶
func InitDefaultStorageClass(instance *odfv1alpha1.FlashSystemCluster) *storagev1.StorageClass
func InitExporterDeployment ¶
func InitExporterDeployment( instance *odfv1alpha1.FlashSystemCluster, pullPolicy corev1.PullPolicy, image string) (*appsv1.Deployment, error)
func InitExporterMetricsService ¶
func InitExporterMetricsService(instance *odfv1alpha1.FlashSystemCluster) *corev1.Service
func InitExporterMetricsServiceMonitor ¶
func InitExporterMetricsServiceMonitor(instance *odfv1alpha1.FlashSystemCluster) *monitoringv1.ServiceMonitor
func IsFSCSecret ¶ added in v1.3.0
func LoadFlashSystemCRFromFile ¶
func LoadFlashSystemCRFromFile() (*unstructured.Unstructured, error)
Types ¶
type ClusterVersionReconciler ¶ added in v1.0.0
ClusterVersionReconciler reconciles a ClusterVersion object
func (*ClusterVersionReconciler) Reconcile ¶ added in v1.0.0
func (r *ClusterVersionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile - For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*ClusterVersionReconciler) SetupWithManager ¶ added in v1.0.0
func (r *ClusterVersionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type FlashSystemClusterReconciler ¶
type FlashSystemClusterReconciler struct { client.Client CSIDynamicClient dynamic.NamespaceableResourceInterface Config *rest.Config Log logr.Logger Scheme *runtime.Scheme ExporterImage string IsCSICRCreated bool }
FlashSystemClusterReconciler reconciles a FlashSystemCluster object
func (*FlashSystemClusterReconciler) CreateOrUpdatePrometheusRules ¶
func (r *FlashSystemClusterReconciler) CreateOrUpdatePrometheusRules(rule *monitoringv1.PrometheusRule) error
CreateOrUpdatePrometheusRules creates or updates Prometheus Rule
func (*FlashSystemClusterReconciler) Reconcile ¶
func (r *FlashSystemClusterReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the FlashSystemCluster object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.2/pkg/reconcile
func (*FlashSystemClusterReconciler) SetupWithManager ¶
func (r *FlashSystemClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ReconcileMapper ¶ added in v1.3.0
type ReconcileMapper struct {
// contains filtered or unexported fields
}
func (*ReconcileMapper) CSIToClusterMapFunc ¶ added in v1.3.0
func (s *ReconcileMapper) CSIToClusterMapFunc(_ client.Object) []reconcile.Request
func (*ReconcileMapper) ConfigMapToClusterMapFunc ¶ added in v1.4.0
func (s *ReconcileMapper) ConfigMapToClusterMapFunc(object client.Object) []reconcile.Request
func (*ReconcileMapper) DefaultStorageClassToClusterMapperFunc ¶ added in v1.3.0
func (s *ReconcileMapper) DefaultStorageClassToClusterMapperFunc(object client.Object) []reconcile.Request
func (*ReconcileMapper) SecretToClusterMapFunc ¶ added in v1.3.0
func (s *ReconcileMapper) SecretToClusterMapFunc(object client.Object) []reconcile.Request