Documentation ¶
Index ¶
- Constants
- func ApplyDefaultsForInitContainers(instance csiv1.CSIDriver, driverConfig *ctrlconfig.Config, ...) ([]csiv1.ContainerTemplate, bool, error)
- func ApplyDefaultsForSideCars(instance csiv1.CSIDriver, driverConfig *ctrlconfig.Config, ...) ([]csiv1.ContainerTemplate, bool, error)
- func ApplyDefaultsForStorageClass(instance csiv1.CSIDriver, driverConfig *ctrlconfig.Config, isUpgrade bool, ...) ([]csiv1.StorageClass, bool)
- func CalculateProxyState(ctx context.Context, deploymentName, namespace string, client client.Client, ...) (bool, error)
- func GetControllerArgs(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []string
- func GetControllerEnv(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []corev1.EnvVar
- func GetControllerInitContainersParams(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) map[csiv1.ImageType]ctrlconfig.InitContainerParams
- func GetControllerNodeSelector(driver csiv1.CSIDriver) map[string]string
- func GetControllerTolerations(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []corev1.Toleration
- func GetCustomDriverName(instance csiv1.CSIDriver, configVersion string, envs []corev1.EnvVar, ...) string
- func GetCustomEnvVars(instance csiv1.CSIDriver, configVersion string, envs []corev1.EnvVar) []corev1.EnvVar
- func GetNodeArgs(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []string
- func GetNodeEnv(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []corev1.EnvVar
- func GetNodeInitContainersParams(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) map[csiv1.ImageType]ctrlconfig.InitContainerParams
- func GetNodeNodeSelector(driver csiv1.CSIDriver) map[string]string
- func GetNodeTolerations(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []corev1.Toleration
- func GetOperatorConditionTypeFromState(state csiv1.DriverState) csiv1.CSIOperatorConditionType
- func GetSideCarParams(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config, reqLogger logr.Logger) map[csiv1.ImageType]ctrlconfig.SidecarParams
- func GetSideCarTypeFromName(sideCarName string) (csiv1.ImageType, error)
- func HashDriver(instance csiv1.CSIDriver) uint64
- func HashProxy(instance *csiv1.CSIPowerMaxRevProxy) uint64
- func InitializeCommonSpec(instance csiv1.CSIDriver, driverConfig *ctrlconfig.Config, ...) (bool, error)
- func InitializeSpec(instance csiv1.CSIDriver, r ReconcileCSI, driverConfig *ctrlconfig.Config, ...) (bool, error)
- func IsCustomDriverNameSupported(instance csiv1.CSIDriver, configVersion string) bool
- func IsLimitedNodeRBAC(driverType csiv1.DriverType, configVersion string) bool
- func ProxyChanged(instance *csiv1.CSIPowerMaxRevProxy) (uint64, uint64, bool)
- func Reconcile(ctx context.Context, instance csiv1.CSIDriver, request reconcile.Request, ...) (reconcile.Result, error)
- func SyncDriver(ctx context.Context, instance csiv1.CSIDriver, r ReconcileCSI, ...) error
- func ValidateSpec(ctx context.Context, instance csiv1.CSIDriver, r ReconcileCSI, ...) error
- type ReconcileCSI
Constants ¶
const MetadataPrefix = "storage.dell.com"
MetadataPrefix - prefix for all labels & annotations
Variables ¶
This section is empty.
Functions ¶
func ApplyDefaultsForInitContainers ¶
func ApplyDefaultsForInitContainers(instance csiv1.CSIDriver, driverConfig *ctrlconfig.Config, reqLogger logr.Logger) ([]csiv1.ContainerTemplate, bool, error)
ApplyDefaultsForInitContainers - Applies any missing defaults for InitContainers
func ApplyDefaultsForSideCars ¶
func ApplyDefaultsForSideCars(instance csiv1.CSIDriver, driverConfig *ctrlconfig.Config, annotations map[string]string, isUpgrade bool, reqLogger logr.Logger) ([]csiv1.ContainerTemplate, bool, error)
ApplyDefaultsForSideCars - Applies any missing defaults for side cars
func ApplyDefaultsForStorageClass ¶
func ApplyDefaultsForStorageClass(instance csiv1.CSIDriver, driverConfig *ctrlconfig.Config, isUpgrade bool, reqLogger logr.Logger) ([]csiv1.StorageClass, bool)
ApplyDefaultsForStorageClass - Applies defaults for storage classes
func CalculateProxyState ¶
func CalculateProxyState(ctx context.Context, deploymentName, namespace string, client client.Client, newStatus *csiv1.CSIPowerMaxRevProxyStatus) (bool, error)
CalculateProxyState - Calculates the state of the Reverse Proxy CR
func GetControllerArgs ¶
func GetControllerArgs(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []string
GetControllerArgs - Returns a list of arguments for Controller by merging the common arguments, driver specific arguments and arguments specified via the Custom Resource spec
func GetControllerEnv ¶
GetControllerEnv - Returns a list of environment variables for Controller by merging the common environment variables, driver specific environment variables and environment variable specified via the Custom Resource spec
func GetControllerInitContainersParams ¶
func GetControllerInitContainersParams(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) map[csiv1.ImageType]ctrlconfig.InitContainerParams
GetControllerInitContainersParams - Returns a map of parameters for each initcontainers Parameters include arguments, environments and volume mounts
func GetControllerNodeSelector ¶
GetControllerNodeSelector - Returns NodeSelector for the statefulset pod
func GetControllerTolerations ¶
func GetControllerTolerations(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []corev1.Toleration
GetControllerTolerations - Returns a list of tolerations for Controller by merging the common tolerations, the controller specific tolerations and the driver specific tolerations
func GetCustomDriverName ¶
func GetCustomDriverName(instance csiv1.CSIDriver, configVersion string, envs []corev1.EnvVar, reqLogger logr.Logger) string
GetCustomDriverName - Returns a custom driver name If no custom driver name is requested, then an empty string is returned
func GetCustomEnvVars ¶
func GetCustomEnvVars(instance csiv1.CSIDriver, configVersion string, envs []corev1.EnvVar) []corev1.EnvVar
GetCustomEnvVars - Returns a list of custom environment variables
func GetNodeArgs ¶
func GetNodeArgs(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []string
GetNodeArgs - Returns a list of arguments for Node by merging the common arguments, driver specific arguments and arguments specified via the Custom Resource spec
func GetNodeEnv ¶
GetNodeEnv - Returns a list of environment variables for Node by merging the common environment variables, driver specific environment variables and environment variable specified via the Custom Resource spec
func GetNodeInitContainersParams ¶
func GetNodeInitContainersParams(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) map[csiv1.ImageType]ctrlconfig.InitContainerParams
GetNodeInitContainersParams - Returns a map of parameters for the node init containers
func GetNodeNodeSelector ¶
GetNodeNodeSelector - Returns NodeSelector for the daemonset pod
func GetNodeTolerations ¶
func GetNodeTolerations(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config) []corev1.Toleration
GetNodeTolerations - Returns a list of tolerations for Node by merging the common tolerations, the node specific tolerations and the driver specific tolerations
func GetOperatorConditionTypeFromState ¶
func GetOperatorConditionTypeFromState(state csiv1.DriverState) csiv1.CSIOperatorConditionType
GetOperatorConditionTypeFromState - Returns operator condition type
func GetSideCarParams ¶
func GetSideCarParams(driver csiv1.CSIDriver, driverConfig *ctrlconfig.Config, reqLogger logr.Logger) map[csiv1.ImageType]ctrlconfig.SidecarParams
GetSideCarParams - Returns a map of parameters for each side car Parameters include arguments, environments and volume mounts
func GetSideCarTypeFromName ¶
GetSideCarTypeFromName - returns sidecar type from name
func HashDriver ¶
HashDriver returns the hash of the driver specification This is used to detect if the driver spec has changed and any updates are required
func HashProxy ¶
func HashProxy(instance *csiv1.CSIPowerMaxRevProxy) uint64
HashProxy returns the hash of the proxy specification This is used to detect if the proxy spec has changed and any updates are required
func InitializeCommonSpec ¶
func InitializeCommonSpec(instance csiv1.CSIDriver, driverConfig *ctrlconfig.Config, reqLogger logr.Logger) (bool, error)
InitializeCommonSpec - Initializes status and applies defaults for sidecars
func InitializeSpec ¶
func InitializeSpec(instance csiv1.CSIDriver, r ReconcileCSI, driverConfig *ctrlconfig.Config, reqLogger logr.Logger) (bool, error)
InitializeSpec - Initializes common and driver specific elements in spec
func IsCustomDriverNameSupported ¶
IsCustomDriverNameSupported - Returns a boolean which indicates if custom driver names are supported by a specific config version for a driver
func IsLimitedNodeRBAC ¶
func IsLimitedNodeRBAC(driverType csiv1.DriverType, configVersion string) bool
IsLimitedNodeRBAC - Returns a boolean which indicates if limited node RBAC is required
func ProxyChanged ¶
func ProxyChanged(instance *csiv1.CSIPowerMaxRevProxy) (uint64, uint64, bool)
ProxyChanged - Checks if proxy spec has changed
func Reconcile ¶
func Reconcile(ctx context.Context, instance csiv1.CSIDriver, request reconcile.Request, r ReconcileCSI, log logr.Logger) (reconcile.Result, error)
Reconcile - Common Reconcile method for all drivers
func SyncDriver ¶
func SyncDriver(ctx context.Context, instance csiv1.CSIDriver, r ReconcileCSI, driverConfig *ctrlconfig.Config, reqLogger logr.Logger) error
SyncDriver - Sync the current installation - this can lead to a create or update
func ValidateSpec ¶
func ValidateSpec(ctx context.Context, instance csiv1.CSIDriver, r ReconcileCSI, driverConfig *ctrlconfig.Config, log logr.Logger) error
ValidateSpec - Validates the user specified spec
Types ¶
type ReconcileCSI ¶
type ReconcileCSI interface { reconcile.Reconciler GetClient() crclient.Client GetScheme() *runtime.Scheme GetConfig() config.Config SetClient(crclient.Client) SetScheme(*runtime.Scheme) SetConfig(config.Config) GetUpdateCount() int32 IncrUpdateCount() InitializeDriverSpec(instance csiv1.CSIDriver, reqLogger logr.Logger) (bool, error) ValidateDriverSpec(ctx context.Context, instance csiv1.CSIDriver, reqLogger logr.Logger) error }
ReconcileCSI is the interface which extends each of the respective Reconcile interfaces for drivers