controllers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExporterClusterConfigMapMountPoint = "/cluster-configmap"
	ServiceAccount                     = "ibm-storage-odf-operator"

	CredentialHashAnnotation = "odf.ibm.com/credential-hash"
)
View Source
const (
	FlashSystemCRFilePath = "/config/csi.ibm.com_v1_ibmblockcsi_cr.yaml"
)

Variables

This section is empty.

Functions

func GetAllNamespace

func GetAllNamespace(config *rest.Config) ([]string, error)

func GetDefaultStorageClassName

func GetDefaultStorageClassName(clusterName string) string

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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