Documentation
¶
Index ¶
- Constants
- func CalculateState(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, ...) (bool, error)
- func GetDriverYaml(YamlString, kind string) (interface{}, error)
- func GetModuleDefaultVersion(driverConfigVersion string, driverType csmv1.DriverType, ...) (string, error)
- func HandleSuccess(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, ...) (reconcile.Result, error)
- func HandleValidationError(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, ...) (reconcile.Result, error)
- func LogBannerAndReturn(result reconcile.Result, err error) (reconcile.Result, error)
- func ModifyCommonCR(YamlString string, cr csmv1.ContainerStorageModule) string
- func ReplaceAllApplyCustomEnvs(driverEnv []acorev1.EnvVarApplyConfiguration, commonEnv []corev1.EnvVar, ...) []acorev1.EnvVarApplyConfiguration
- func ReplaceAllArgs(defaultArgs, crArgs []string) []string
- func ReplaceAllContainerImageApply(img K8sImagesConfig, c *acorev1.ContainerApplyConfiguration)
- func SetStatus(ctx context.Context, r ReconcileCSM, instance *csmv1.ContainerStorageModule, ...)
- func SplitYaml(gaintYAML []byte) ([][]byte, error)
- func UpdateSideCarApply(sideCars []csmv1.ContainerTemplate, c *acorev1.ContainerApplyConfiguration)
- func UpdateStatus(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, ...) error
- type ControllerYAML
- type K8sImagesConfig
- type NodeYAML
- type OperatorConfig
- type RbacYAML
- type ReconcileCSM
Constants ¶
View Source
const ( // DefaultReleaseName constant DefaultReleaseName = "<DriverDefaultReleaseName>" // DefaultReleaseNamespace constant DefaultReleaseNamespace = "<DriverDefaultReleaseNamespace>" // DefaultImagePullPolicy constant DefaultImagePullPolicy = "IfNotPresent" //KubeletConfigDir path KubeletConfigDir = "<KUBELET_CONFIG_DIR>" )
Variables ¶
This section is empty.
Functions ¶
func CalculateState ¶
func CalculateState(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, newStatus *csmv1.ContainerStorageModuleStatus) (bool, error)
CalculateState of pods
func GetDriverYaml ¶
GetDriverYaml -
func GetModuleDefaultVersion ¶
func GetModuleDefaultVersion(driverConfigVersion string, driverType csmv1.DriverType, moduleType csmv1.ModuleType, path string) (string, error)
GetModuleDefaultVersion -
func HandleSuccess ¶
func HandleSuccess(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, newStatus, oldStatus *csmv1.ContainerStorageModuleStatus) (reconcile.Result, error)
HandleSuccess for csm
func HandleValidationError ¶
func HandleValidationError(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, validationError error) (reconcile.Result, error)
HandleValidationError for csm
func LogBannerAndReturn ¶
LogBannerAndReturn -
func ModifyCommonCR ¶
func ModifyCommonCR(YamlString string, cr csmv1.ContainerStorageModule) string
ModifyCommonCR -
func ReplaceAllApplyCustomEnvs ¶
func ReplaceAllApplyCustomEnvs(driverEnv []acorev1.EnvVarApplyConfiguration, commonEnv []corev1.EnvVar, nrEnv []corev1.EnvVar) []acorev1.EnvVarApplyConfiguration
ReplaceAllApplyCustomEnvs -
func ReplaceAllContainerImageApply ¶
func ReplaceAllContainerImageApply(img K8sImagesConfig, c *acorev1.ContainerApplyConfiguration)
ReplaceAllContainerImageApply -
func SetStatus ¶
func SetStatus(ctx context.Context, r ReconcileCSM, instance *csmv1.ContainerStorageModule, newStatus *csmv1.ContainerStorageModuleStatus)
SetStatus of csm
func UpdateSideCarApply ¶
func UpdateSideCarApply(sideCars []csmv1.ContainerTemplate, c *acorev1.ContainerApplyConfiguration)
UpdateSideCarApply -
func UpdateStatus ¶
func UpdateStatus(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, newStatus *csmv1.ContainerStorageModuleStatus) error
UpdateStatus of csm
Types ¶
type ControllerYAML ¶
type ControllerYAML struct { Deployment confv1.DeploymentApplyConfiguration Rbac RbacYAML }
ControllerYAML -
type K8sImagesConfig ¶
type K8sImagesConfig struct { K8sVersion string `json:"kubeversion" yaml:"kubeversion"` Images struct { Attacher string `json:"attacher" yaml:"attacher"` Provisioner string `json:"provisioner" yaml:"provisioner"` Snapshotter string `json:"snapshotter" yaml:"snapshotter"` Registrar string `json:"registrar" yaml:"registrar"` Resizer string `json:"resizer" yaml:"resizer"` Externalhealthmonitor string `json:"externalhealthmonitorcontroller" yaml:"externalhealthmonitorcontroller"` } `json:"images" yaml:"images"` }
K8sImagesConfig -
type NodeYAML ¶
type NodeYAML struct { DaemonSetApplyConfig confv1.DaemonSetApplyConfiguration Rbac RbacYAML }
NodeYAML -
type OperatorConfig ¶
type OperatorConfig struct { IsOpenShift bool K8sVersion K8sImagesConfig ConfigDirectory string }
OperatorConfig -
type RbacYAML ¶
type RbacYAML struct { ServiceAccount corev1.ServiceAccount ClusterRole rbacv1.ClusterRole ClusterRoleBinding rbacv1.ClusterRoleBinding }
RbacYAML -
type ReconcileCSM ¶
type ReconcileCSM interface { reconcile.Reconciler GetClient() crclient.Client GetUpdateCount() int32 IncrUpdateCount() }
ReconcileCSM is the interface which extends each of the respective Reconcile interfaces for drivers
Click to show internal directories.
Click to hide internal directories.