controllers

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlashSystemCRFilePath = "/config/csi.ibm.com_v1_ibmblockcsi_cr.yaml"
	// FlashSystemCRFilePathEnvVar is only for UT
	FlashSystemCRFilePathEnvVar = "TEST_FS_CR_FILEPATH"
)
View Source
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 GetAllNamespace

func GetAllNamespace(config *rest.Config) ([]string, 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 IsFSCSecret(secretName string) bool

func LoadFlashSystemCRFromFile

func LoadFlashSystemCRFromFile() (*unstructured.Unstructured, error)

Types

type ClusterVersionReconciler added in v1.0.0

type ClusterVersionReconciler struct {
	client.Client
	Scheme      *runtime.Scheme
	ConsolePort int
}

ClusterVersionReconciler reconciles a ClusterVersion object

func (*ClusterVersionReconciler) Reconcile added in v1.0.0

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL