Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Demchuk <[email protected]>
  • Loading branch information
NikolayDemchuk committed Dec 2, 2024
1 parent 76619e5 commit 95e245f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,20 +383,6 @@ func shouldReconcileStorageClassByUpdateFunc(log logger.Logger, scList *v1.Stora
return true, nil
}

// TODO: вот эту штуку не могу достать силами контроллера НИКАК
//
// if value, exists := nfsModuleConfig.Spec.Settings["v3support"]; exists && value == true {
// v3enabled = true
// } else {
// v3enabled = false
// }
//
// TODO: принести сюда значение из спеков модуль конфига. Каким-то образом.
//
// if nsc.Spec.Connection.NFSVersion == "3" && v3enabled == false {
// setLabel := addLabelToStorageClass(nsc)
//

if nsc.Status != nil && nsc.Status.Phase == FailedStatusPhase {
return true, nil
}
Expand Down Expand Up @@ -745,16 +731,14 @@ func addLabelToStorageClass(nsc *v1alpha1.NFSStorageClass) map[string]string {

if nsc.Labels == nil {
newLabels = make(map[string]string)
} else {
newLabels = make(map[string]string, len(nsc.Labels))
nsc.Labels = newLabels
}

for key, value := range nsc.Labels {
newLabels[key] = value
}

newLabels[NFS3PrometheusLabel] = "true"

return newLabels
}

Expand Down
1 change: 1 addition & 0 deletions templates/controller/rbac-for-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ rules:
verbs:
- get
- list
- watch
- apiGroups:
- coordination.k8s.io
resources:
Expand Down

0 comments on commit 95e245f

Please sign in to comment.