Merge pull request #232 from red-hat-storage/sync_us--devel

Syncing latest changes from upstream devel for ceph-csi
This commit is contained in:
openshift-merge-bot[bot] 2023-12-12 08:27:59 +00:00 committed by GitHub
commit dc898764b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 5 deletions

View File

@ -11,9 +11,7 @@ metadata:
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }} {{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
rules: rules:
{{- if and .Values.readAffinity .Values.readAffinity.enabled }}
- apiGroups: [""] - apiGroups: [""]
resources: ["nodes"] resources: ["nodes"]
verbs: ["get"] verbs: ["get"]
{{- end }}
{{- end -}} {{- end -}}

View File

@ -11,11 +11,9 @@ metadata:
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }} {{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
rules: rules:
{{- if .Values.topology.enabled }}
- apiGroups: [""] - apiGroups: [""]
resources: ["nodes"] resources: ["nodes"]
verbs: ["get"] verbs: ["get"]
{{- end }}
# allow to read Vault Token and connection options from the Tenants namespace # allow to read Vault Token and connection options from the Tenants namespace
- apiGroups: [""] - apiGroups: [""]
resources: ["secrets"] resources: ["secrets"]

View File

@ -125,7 +125,7 @@ func (r *Driver) Run(conf *util.Config) {
}) })
} }
if k8s.RunsOnKubernetes() { if k8s.RunsOnKubernetes() && conf.IsNodeServer {
nodeLabels, err = k8s.GetNodeLabels(conf.NodeID) nodeLabels, err = k8s.GetNodeLabels(conf.NodeID)
if err != nil { if err != nil {
log.FatalLogMsg(err.Error()) log.FatalLogMsg(err.Error())