Skip to content
Merged
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
19 changes: 8 additions & 11 deletions helm/templates/00-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
{{- if .Values.global.instanceNamespace }}
{{- $namespaces = append $namespaces .Values.global.instanceNamespace }}
{{- end }}
{{- if .Values.cpfs.labels }}
{{- $labels := .Values.cpfs.labels }}
{{- end }}
{{- range $i := $namespaces }}
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -17,11 +14,11 @@ metadata:
namespace: {{ $i }}
labels:
component-id: {{ $chartName }}
{{- if .Values.cpfs.labels }}
{{- with $labels }}
{{- if $.Values.cpfs.labels }}
{{- with $.Values.cpfs.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end}}
rules:
- verbs:
- create
Expand Down Expand Up @@ -102,11 +99,11 @@ metadata:
namespace: {{ $i }}
labels:
component-id: {{ $chartName }}
{{- if .Values.cpfs.labels }}
{{- with $labels }}
{{- if $.Values.cpfs.labels }}
{{- with $.Values.cpfs.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end}}
subjects:
- kind: ServiceAccount
name: ibm-namespace-scope-operator
Expand All @@ -126,9 +123,9 @@ metadata:
app.kubernetes.io/name: ibm-namespace-scope-operator
component-id: {{ .Chart.Name }}
{{- if .Values.cpfs.labels }}
{{- with $labels }}
{{- with .Values.cpfs.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end}}
name: ibm-namespace-scope-operator
namespace: {{ .Values.global.operatorNamespace }}