Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyCTRLObject(ctx context.Context, obj crclient.Object, ctrlClient crclient.Client) error
- func ApplyObject(ctx context.Context, obj crclient.Object, ctrlClient crclient.Client) error
- func Contains(slice []string, str string) bool
- func DeleteObject(ctx context.Context, obj crclient.Object, ctrlClient crclient.Client) error
- func DetermineUnitTestRun(ctx context.Context) bool
- func GetBackupStorageLocation(ctx context.Context, name, namespace string, ctrlClient crclient.Client) (*velerov1.BackupStorageLocation, error)
- func GetCTRLObject(CtrlBuf []byte) ([]crclient.Object, error)
- func GetDriverYaml(YamlString, kind string) (interface{}, error)
- func GetModuleComponentObj(CtrlBuf []byte) ([]crclient.Object, error)
- func GetModuleDefaultVersion(driverConfigVersion string, driverType csmv1.DriverType, ...) (string, error)
- func GetNginxControllerStatus(ctx context.Context, instance csmv1.ContainerStorageModule, r ReconcileCSM) wait.ConditionFunc
- func GetSecret(ctx context.Context, name, namespace string, ctrlClient crclient.Client) (*corev1.Secret, error)
- func GetVolumeSnapshotLocation(ctx context.Context, name, namespace string, ctrlClient crclient.Client) (*velerov1.VolumeSnapshotLocation, error)
- func HandleAccSuccess(ctx context.Context, instance *csmv1.ApexConnectivityClient, r ReconcileCSM, ...) (reconcile.Result, error)
- func HandleAccValidationError(ctx context.Context, instance *csmv1.ApexConnectivityClient, r ReconcileCSM, ...) (reconcile.Result, 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 IsAppMobilityComponentEnabled(ctx context.Context, instance csmv1.ContainerStorageModule, _ ReconcileCSM, ...) bool
- func IsModuleComponentEnabled(ctx context.Context, instance csmv1.ContainerStorageModule, ...) bool
- func IsModuleEnabled(_ context.Context, instance csmv1.ContainerStorageModule, mod csmv1.ModuleType) (bool, csmv1.Module)
- func IsResiliencyModuleEnabled(_ context.Context, instance csmv1.ContainerStorageModule, _ ReconcileCSM) bool
- func LogBannerAndReturn(result reconcile.Result, err error) (reconcile.Result, error)
- func MinVersionCheck(minVersion string, version string) (bool, error)
- func ModifyCommonCR(YamlString string, cr csmv1.ContainerStorageModule) string
- func ModifyCommonCRs(YamlString string, cr csmv1.ApexConnectivityClient) 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 SetAccStatus(ctx context.Context, _ ReconcileCSM, instance *csmv1.ApexConnectivityClient, ...)
- func SetStatus(ctx context.Context, _ ReconcileCSM, instance *csmv1.ContainerStorageModule, ...)
- func SplitYaml(gaintYAML []byte) ([][]byte, error)
- func UpdateAccStatus(ctx context.Context, instance *csmv1.ApexConnectivityClient, r ReconcileCSM, ...) error
- func UpdateSideCarApply(sideCars []csmv1.ContainerTemplate, c *acorev1.ContainerApplyConfiguration)
- func UpdateStatus(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, ...) error
- func UpdateinitContainerApply(initContainers []csmv1.ContainerTemplate, ...)
- func WaitForNginxController(ctx context.Context, instance csmv1.ContainerStorageModule, r ReconcileCSM, ...) error
- type ControllerYAML
- type FakeReconcileCSM
- type K8sImagesConfig
- type NodeYAML
- type OperatorConfig
- type RbacYAML
- type ReconcileCSM
- type ReplicaCluster
- type UpgradePaths
Constants ¶
const ( // DefaultReleaseName constant DefaultReleaseName = "<DriverDefaultReleaseName>" // DefaultReleaseNamespace constant DefaultReleaseNamespace = "<DriverDefaultReleaseNamespace>" // DefaultImagePullPolicy constant DefaultImagePullPolicy = "IfNotPresent" // KubeletConfigDir path KubeletConfigDir = "<KUBELET_CONFIG_DIR>" // ReplicationControllerNameSpace - ReplicationControllerNameSpace = "dell-replication-controller" // ReplicationControllerManager - ReplicationControllerManager = "dell-replication-controller-manager" // ReplicationControllerInit - ReplicationControllerInit = "dell-replication-controller-init" // ReplicationSideCarName - ReplicationSideCarName = "dell-csi-replicator" // ResiliencySideCarName - ResiliencySideCarName = "podmon" // DefaultSourceClusterID - DefaultSourceClusterID = "default-source-cluster" // ObservabilityNamespace - karavi ObservabilityNamespace = "karavi" // AuthorizationNamespace - authorization AuthorizationNamespace = "authorization" // AuthProxyServerComponent - karavi-authorization-proxy-server component AuthProxyServerComponent = "karavi-authorization-proxy-server" // PodmonControllerComponent - podmon-controller PodmonControllerComponent = "podmon-controller" // PodmonNodeComponent - podmon-node PodmonNodeComponent = "podmon-node" // ApplicationMobilityNamespace - application-mobility ApplicationMobilityNamespace = "application-mobility" )
Variables ¶
var NewControllerRuntimeClientWrapper = func(clusterConfigData []byte) (crclient.Client, error) { return k8sClient.NewControllerRuntimeClient(clusterConfigData) }
NewControllerRuntimeClientWrapper -
var NewK8sClientWrapper = func(clusterConfigData []byte) (*kubernetes.Clientset, error) { restConfig, err := clientcmd.RESTConfigFromKubeConfig(clusterConfigData) if err != nil { return nil, err } return kubernetes.NewForConfig(restConfig) }
NewK8sClientWrapper -
Functions ¶
func ApplyCTRLObject ¶ added in v1.0.0
ApplyCTRLObject -
func ApplyObject ¶ added in v0.2.0
ApplyObject -
func DeleteObject ¶ added in v0.2.0
DeleteObject -
func DetermineUnitTestRun ¶ added in v1.4.3
DetermineUnitTestRun will determine if this reconcile call is part of unit test run
func GetBackupStorageLocation ¶ added in v1.4.0
func GetBackupStorageLocation(ctx context.Context, name, namespace string, ctrlClient crclient.Client) (*velerov1.BackupStorageLocation, error)
GetBackupStorageLocation - check if the Backup Storage Location is present
func GetCTRLObject ¶ added in v0.2.0
GetCTRLObject - get controller object
func GetDriverYaml ¶
GetDriverYaml -
func GetModuleComponentObj ¶ added in v1.0.0
GetModuleComponentObj - get module component object from config yaml string
func GetModuleDefaultVersion ¶
func GetModuleDefaultVersion(driverConfigVersion string, driverType csmv1.DriverType, moduleType csmv1.ModuleType, path string) (string, error)
GetModuleDefaultVersion -
func GetNginxControllerStatus ¶ added in v1.0.0
func GetNginxControllerStatus(ctx context.Context, instance csmv1.ContainerStorageModule, r ReconcileCSM) wait.ConditionFunc
GetNginxControllerStatus - gets deployment status of the NGINX ingress controller
func GetSecret ¶ added in v1.0.0
func GetSecret(ctx context.Context, name, namespace string, ctrlClient crclient.Client) (*corev1.Secret, error)
GetSecret - check if the secret is present
func GetVolumeSnapshotLocation ¶ added in v1.4.0
func GetVolumeSnapshotLocation(ctx context.Context, name, namespace string, ctrlClient crclient.Client) (*velerov1.VolumeSnapshotLocation, error)
GetVolumeSnapshotLocation - check if the Volume Snapshot Location is present
func HandleAccSuccess ¶ added in v1.4.0
func HandleAccSuccess(ctx context.Context, instance *csmv1.ApexConnectivityClient, r ReconcileCSM, newStatus, oldStatus *csmv1.ApexConnectivityClientStatus) (reconcile.Result, error)
HandleAccSuccess for csm
func HandleAccValidationError ¶ added in v1.4.0
func HandleAccValidationError(ctx context.Context, instance *csmv1.ApexConnectivityClient, r ReconcileCSM, validationError error, ) (reconcile.Result, error)
HandleAccValidationError for csm
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 IsAppMobilityComponentEnabled ¶ added in v1.4.0
func IsAppMobilityComponentEnabled(ctx context.Context, instance csmv1.ContainerStorageModule, _ ReconcileCSM, mod csmv1.ModuleType, componentType string) bool
IsAppMobilityComponentEnabled - check if Application Mobility componenets are enabled
func IsModuleComponentEnabled ¶ added in v1.3.0
func IsModuleComponentEnabled(ctx context.Context, instance csmv1.ContainerStorageModule, mod csmv1.ModuleType, componentType string) bool
IsModuleComponentEnabled - check if module components are enabled
func IsModuleEnabled ¶ added in v1.0.0
func IsModuleEnabled(_ context.Context, instance csmv1.ContainerStorageModule, mod csmv1.ModuleType) (bool, csmv1.Module)
IsModuleEnabled - check if the module is enabled
func IsResiliencyModuleEnabled ¶ added in v1.2.0
func IsResiliencyModuleEnabled(_ context.Context, instance csmv1.ContainerStorageModule, _ ReconcileCSM) bool
IsResiliencyModuleEnabled - check if resiliency module is enabled or not
func LogBannerAndReturn ¶
LogBannerAndReturn -
func MinVersionCheck ¶ added in v0.2.0
MinVersionCheck takes a driver name and a version of the form "vA.B.C" and checks it against the minimum version for the specified driver
func ModifyCommonCR ¶
func ModifyCommonCR(YamlString string, cr csmv1.ContainerStorageModule) string
ModifyCommonCR -
func ModifyCommonCRs ¶ added in v1.4.0
func ModifyCommonCRs(YamlString string, cr csmv1.ApexConnectivityClient) string
ModifyCommonCRs - update with common values
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 SetAccStatus ¶ added in v1.4.0
func SetAccStatus(ctx context.Context, _ ReconcileCSM, instance *csmv1.ApexConnectivityClient, newStatus *csmv1.ApexConnectivityClientStatus)
SetAccStatus of csm
func SetStatus ¶
func SetStatus(ctx context.Context, _ ReconcileCSM, instance *csmv1.ContainerStorageModule, newStatus *csmv1.ContainerStorageModuleStatus)
SetStatus of csm
func UpdateAccStatus ¶ added in v1.4.0
func UpdateAccStatus(ctx context.Context, instance *csmv1.ApexConnectivityClient, r ReconcileCSM, newStatus *csmv1.ApexConnectivityClientStatus) error
UpdateAccStatus 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
func UpdateinitContainerApply ¶ added in v1.0.0
func UpdateinitContainerApply(initContainers []csmv1.ContainerTemplate, c *acorev1.ContainerApplyConfiguration)
UpdateinitContainerApply -
func WaitForNginxController ¶ added in v1.0.0
func WaitForNginxController(ctx context.Context, instance csmv1.ContainerStorageModule, r ReconcileCSM, timeout time.Duration) error
WaitForNginxController - polls deployment status
Types ¶
type ControllerYAML ¶
type ControllerYAML struct { Deployment confv1.DeploymentApplyConfiguration Rbac RbacYAML }
ControllerYAML -
type FakeReconcileCSM ¶ added in v0.2.0
type FakeReconcileCSM struct { reconcile.Reconciler crclient.Client K8sClient kubernetes.Interface // contains filtered or unexported fields }
FakeReconcileCSM -
func (*FakeReconcileCSM) GetClient ¶ added in v0.2.0
func (r *FakeReconcileCSM) GetClient() crclient.Client
GetClient -
func (*FakeReconcileCSM) GetK8sClient ¶ added in v0.2.0
func (r *FakeReconcileCSM) GetK8sClient() kubernetes.Interface
GetK8sClient - Returns the current update count
func (*FakeReconcileCSM) GetUpdateCount ¶ added in v0.2.0
func (r *FakeReconcileCSM) GetUpdateCount() int32
GetUpdateCount - Returns the current update count
func (*FakeReconcileCSM) IncrUpdateCount ¶ added in v0.2.0
func (r *FakeReconcileCSM) IncrUpdateCount()
IncrUpdateCount - Increments the update count
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"` Sdc string `json:"sdc" yaml:"sdc"` Sdcmonitor string `json:"sdcmonitor" yaml:"sdcmonitor"` Podmon string `json:"podmon" yaml:"podmon"` } `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 GetK8sClient() kubernetes.Interface GetUpdateCount() int32 IncrUpdateCount() }
ReconcileCSM is the interface which extends each of the respective Reconcile interfaces for drivers
type ReplicaCluster ¶ added in v0.2.0
type ReplicaCluster struct { ClusterID string ClusterCTRLClient crclient.Client ClusterK8sClient kubernetes.Interface }
ReplicaCluster -
func GetAccDefaultClusters ¶ added in v1.4.0
func GetAccDefaultClusters(_ context.Context, _ csmv1.ApexConnectivityClient, r ReconcileCSM) (bool, []ReplicaCluster, error)
GetAccDefaultClusters - get default clusters
func GetDefaultClusters ¶ added in v0.2.0
func GetDefaultClusters(ctx context.Context, instance csmv1.ContainerStorageModule, r ReconcileCSM) (bool, []ReplicaCluster, error)
GetDefaultClusters -
type UpgradePaths ¶ added in v0.2.0
type UpgradePaths struct {
MinUpgradePath string `json:"minUpgradePath" yaml:"minUpgradePath"`
}
UpgradePaths a list of versions eligible to upgrade the current version