Documentation
¶
Index ¶
- Constants
- func CreateIBMBlockCSICR(dc dynamic.NamespaceableResourceInterface, namespace string) (*unstructured.Unstructured, error)
- func GetAllNamespace(config *rest.Config) ([]string, error)
- func GetDefaultStorageClassName(clusterName string) string
- func GetIBMBlockCSIDiscoveryClient(config *rest.Config) (dynamic.NamespaceableResourceInterface, 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 IsIBMBlockCSIInstanceFound(namespaces []string, dc dynamic.NamespaceableResourceInterface) (bool, error)
- func LoadFlashSystemCRFromFile() (*unstructured.Unstructured, error)
- type FlashSystemClusterReconciler
- func (r *FlashSystemClusterReconciler) CreateOrUpdatePrometheusRules(rule *monitoringv1.PrometheusRule) error
- func (r *FlashSystemClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
- func (r *FlashSystemClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
const ( ExporterClusterConfigMapMountPoint = "/cluster-configmap" ServiceAccount = "ibm-storage-odf-operator" CredentialHashAnnotation = "odf.ibm.com/credential-hash" )
const (
FlashSystemCRFilePath = "/config/csi.ibm.com_v1_ibmblockcsi_cr.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func CreateIBMBlockCSICR ¶
func CreateIBMBlockCSICR(dc dynamic.NamespaceableResourceInterface, namespace string) (*unstructured.Unstructured, error)
func GetIBMBlockCSIDiscoveryClient ¶
func GetIBMBlockCSIDiscoveryClient(config *rest.Config) (dynamic.NamespaceableResourceInterface, error)
func InitDefaultStorageClass ¶
func InitDefaultStorageClass(instance *odfv1alpha1.FlashSystemCluster) *storagev1.StorageClass
func InitExporterDeployment ¶
func InitExporterDeployment( instance *odfv1alpha1.FlashSystemCluster, pullPolicy corev1.PullPolicy, image string, secret *corev1.Secret) (*appsv1.Deployment, error)
func InitExporterMetricsService ¶
func InitExporterMetricsService(instance *odfv1alpha1.FlashSystemCluster) *corev1.Service
func InitExporterMetricsServiceMonitor ¶
func InitExporterMetricsServiceMonitor(instance *odfv1alpha1.FlashSystemCluster) *monitoringv1.ServiceMonitor
func IsIBMBlockCSIInstanceFound ¶
func IsIBMBlockCSIInstanceFound(namespaces []string, dc dynamic.NamespaceableResourceInterface) (bool, error)
func LoadFlashSystemCRFromFile ¶
func LoadFlashSystemCRFromFile() (*unstructured.Unstructured, error)
Types ¶
type FlashSystemClusterReconciler ¶
type FlashSystemClusterReconciler struct { client.Client CSIDiscoveryClient dynamic.NamespaceableResourceInterface Config *rest.Config Log logr.Logger Scheme *runtime.Scheme ExporterImage string }
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(ctx context.Context, req ctrl.Request) (result ctrl.Result, err 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.