File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {{- range $name, $data := .Values.clusterRoles }}
2+ ---
3+ apiVersion : rbac.authorization.k8s.io/v1
4+ kind : ClusterRole
5+ metadata :
6+ name : {{ $name }}
7+ {{- with $data.annotations }}
8+ annotations :
9+ {{- toYaml . | nindent 4 }}
10+ {{- end }}
11+ {{- with $data.labels }}
12+ labels :
13+ {{- toYaml . | nindent 4 }}
14+ {{- end }}
15+ rules :
16+ {{- toYaml (default (list) $data.rules) | nindent 2 }}
17+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- range $name, $data := .Values.clusterRoleBindings }}
2+ ---
3+ apiVersion : rbac.authorization.k8s.io/v1
4+ kind : ClusterRoleBinding
5+ metadata :
6+ name : {{ $name }}
7+ {{- with $data.annotations }}
8+ annotations :
9+ {{- toYaml . | nindent 4 }}
10+ {{- end }}
11+ {{- with $data.labels }}
12+ labels :
13+ {{- toYaml . | nindent 4 }}
14+ {{- end }}
15+ roleRef :
16+ apiGroup : rbac.authorization.k8s.io
17+ kind : {{ default "ClusterRole" $data.roleKind }}
18+ name : {{ required (printf "Values.clusterRoleBindings.%s.roleName is required" $name) $data.roleName }}
19+ subjects :
20+ {{- toYaml (default (list) $data.subjects) | nindent 2 }}
21+ {{- end }}
Original file line number Diff line number Diff line change @@ -36,3 +36,24 @@ roleBindings: {}
3636# - kind: ServiceAccount
3737# name: my-svcacct
3838# namespace: my-namespace
39+
40+ clusterRoles : {}
41+ # my-clusterrole:
42+ # rules:
43+ # - apiGroups:
44+ # - ""
45+ # resources:
46+ # - namespaces
47+ # verbs:
48+ # - get
49+ # - list
50+ # - watch
51+
52+ clusterRoleBindings : {}
53+ # my-clusterrolebinding:
54+ # roleName: my-clusterrole
55+ # roleKind: ClusterRole
56+ # subjects:
57+ # - kind: User
58+ # name: user@example.com
59+ # apiGroup: rbac.authorization.k8s.io
You can’t perform that action at this time.
0 commit comments