Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable decouple-vsphere-csi-driver by default #411

Merged
merged 1 commit into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ func CreateFeatureStateConfigMap(kubeClient kubernetes.Interface, features []str
if strings.Contains(featuresString, constants.VSphereLocalModeFeature) {
featureData[constants.VSphereLocalModeFlag] = strconv.FormatBool(true)
}
// Update the data to the default if the flag is not found
// Update the data to the default if the flag is not found, the default is true.
if decoupleVSphereCSIDriverFlag, ok := featureConfigMap.Data[constants.DecoupleVSphereCSIDriverFlag]; !ok {
featureData[constants.DecoupleVSphereCSIDriverFlag] = strconv.FormatBool(false)
featureData[constants.DecoupleVSphereCSIDriverFlag] = strconv.FormatBool(true)
} else {
featureData[constants.DecoupleVSphereCSIDriverFlag] = decoupleVSphereCSIDriverFlag
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func RetrieveVcConfigSecret(params map[string]interface{}, config *rest.Config,
ns = constants.VCSecretNsSupervisor
vSphereSecrets = append(vSphereSecrets, constants.VCSecret, constants.VCSecretTKG)
} else { // constants.VSphere
if IsFeatureEnabled(clientset, constants.DecoupleVSphereCSIDriverFlag, false, logger) {
if IsFeatureEnabled(clientset, constants.DecoupleVSphereCSIDriverFlag, true, logger) {
// Retrieve the vc credentials secret name and namespace from velero-vsphere-plugin-config
ns, name = GetSecretNamespaceAndName(clientset, veleroNs, constants.VeleroVSpherePluginConfig)
vSphereSecrets = append(vSphereSecrets, name)
Expand Down Expand Up @@ -1059,7 +1059,7 @@ func GetVcConfigSecretFilterFunc(logger logrus.FieldLogger) func(obj interface{}
ns = constants.VCSecretNsSupervisor
name = constants.VCSecret
} else if clusterFlavor == constants.VSphere {
if IsFeatureEnabled(clientset, constants.DecoupleVSphereCSIDriverFlag, false, logger) {
if IsFeatureEnabled(clientset, constants.DecoupleVSphereCSIDriverFlag, true, logger) {
// Retrieve the vc credentials secret name and namespace from velero-vsphere-plugin-config
ns, name = GetSecretNamespaceAndName(clientset, veleroNs, constants.VeleroVSpherePluginConfig)
logger.Infof("RetrieveVcConfigSecret: Namespace: %s Name: %s", ns, name)
Expand Down