Skip to content

Commit

Permalink
Enable decouple-vsphere-csi-driver by default (vmware-tanzu#411)
Browse files Browse the repository at this point in the history
Enabling the feature flag by default.

Signed-off-by: Deepak Kinni <dkinni@vmware.com>
  • Loading branch information
Deepak Kinni committed Nov 9, 2021
1 parent f1f7a8f commit dad8f5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit dad8f5a

Please sign in to comment.