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

Empty FSS flags should not be defaulted on vanilla clusters #2910

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,12 @@ func initFSS(ctx context.Context, k8sClient clientset.Interface,
k8sOrchestratorInstance.supervisorFSS.featureStatesLock.Unlock()
}
}

// if configMapNamespace is empty, it means the FSS namespace was not set
// so we should not care about watching it.
if configMapNamespaceToListen == "" {
return nil
}
// Set up kubernetes configmap listener for CSI namespace.
err = k8sOrchestratorInstance.informerManager.AddConfigMapListener(
ctx,
Expand Down
11 changes: 4 additions & 7 deletions pkg/csi/service/common/commonco/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,10 @@ func SetInitParams(ctx context.Context, clusterFlavor cnstypes.CnsClusterFlavor,
OperationMode: operationMode,
}
case cnstypes.CnsClusterFlavorVanilla:
if strings.TrimSpace(internalFSSName) == "" {
log.Infof("Defaulting feature states configmap name to %q", csiconfig.DefaultInternalFSSConfigMapName)
internalFSSName = csiconfig.DefaultInternalFSSConfigMapName
}
if strings.TrimSpace(internalFSSNamespace) == "" {
log.Infof("Defaulting feature states configmap namespace to %q", csiconfig.DefaultCSINamespace)
internalFSSNamespace = csiconfig.DefaultCSINamespace
if strings.TrimSpace(internalFSSName) == "" || strings.TrimSpace(internalFSSNamespace) == "" {
log.Infof("Feature state flags are not fully set, disabling any FSS")
internalFSSName = ""
internalFSSNamespace = ""
}
*initParams = k8sorchestrator.K8sVanillaInitParams{
InternalFeatureStatesConfigInfo: csiconfig.FeatureStatesConfigInfo{
Expand Down