File tree 6 files changed +129
-3
lines changed
6 files changed +129
-3
lines changed Original file line number Diff line number Diff line change 1
1
apiVersion : v1
2
- version : 0.6.6
2
+ version : 0.7.0
3
3
appVersion : 0.0.1
4
4
name : k8s-resources
5
5
description : |
@@ -17,6 +17,8 @@ description: |
17
17
- Service
18
18
- ServiceAccount
19
19
- ScaledObject (KEDA)
20
+ - ClusterRole
21
+ - ClusterRoleBinding
20
22
21
23
Every resource type can have custom labels, annotations or a `fullnameOverride` set. See default [values.yaml](https://github.com/deliveryhero/helm-charts/blob/master/stable/k8s-resources/values.yaml) for examples.
22
24
Original file line number Diff line number Diff line change 1
1
# k8s-resources
2
2
3
- ![ Version: 0.6.6 ] ( https://img.shields.io/badge/Version-0.6.6 -informational?style=flat-square ) ![ AppVersion: 0.0.1] ( https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square )
3
+ ![ Version: 0.7.0 ] ( https://img.shields.io/badge/Version-0.7.0 -informational?style=flat-square ) ![ AppVersion: 0.0.1] ( https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square )
4
4
5
5
Not an application but a Helm chart to create any and many resources in Kubernetes.
6
6
@@ -16,6 +16,8 @@ Currently supports:
16
16
- Service
17
17
- ServiceAccount
18
18
- ScaledObject (KEDA)
19
+ - ClusterRole
20
+ - ClusterRoleBinding
19
21
20
22
Every resource type can have custom labels, annotations or a ` fullnameOverride ` set. See default [ values.yaml] ( https://github.com/deliveryhero/helm-charts/blob/master/stable/k8s-resources/values.yaml ) for examples.
21
23
@@ -32,7 +34,7 @@ helm install --generate-name oci://ghcr.io/deliveryhero/helm-charts/k8s-resource
32
34
To install a specific version of this chart:
33
35
34
36
``` console
35
- helm install --generate-name oci://ghcr.io/deliveryhero/helm-charts/k8s-resources --version 0.6.6
37
+ helm install --generate-name oci://ghcr.io/deliveryhero/helm-charts/k8s-resources --version 0.7.0
36
38
```
37
39
38
40
To install the chart with the release name ` my-release ` :
@@ -57,6 +59,8 @@ helm install my-release oci://ghcr.io/deliveryhero/helm-charts/k8s-resources -f
57
59
58
60
| Key | Type | Default | Description |
59
61
| -----| ------| ---------| -------------|
62
+ | ClusterRoleBindings | list | ` [] ` | A list ClusterRoleBindings to create |
63
+ | ClusterRoles | list | ` [] ` | A list ClusterRoles to create |
60
64
| ConfigMaps | list | ` [] ` | A list ConfigMap to create |
61
65
| CronJobs | list | ` [] ` | A list CronJobs to create |
62
66
| CustomResources | list | ` [] ` | A list resources to create that are completely custom |
Original file line number Diff line number Diff line change @@ -116,3 +116,42 @@ Namespaces:
116
116
fullnameOverride : " "
117
117
annotations : {}
118
118
extraLabels : {}
119
+
120
+ ClusterRoles :
121
+ - name : example-cr-1
122
+ fullnameOverride : " "
123
+ annotations : {}
124
+ extraLabels : {}
125
+ rules :
126
+ - apiGroups :
127
+ - " "
128
+ resources :
129
+ - configmaps
130
+ verbs :
131
+ - ' *'
132
+ - name : example-cr-2
133
+ extraLabels :
134
+ mylabel : myvalue
135
+
136
+ ClusterRoleBindings :
137
+ - name : example-crb-1
138
+ fullnameOverride : " "
139
+ annotations : {}
140
+ extraLabels : {}
141
+ roleRef :
142
+ kind : ClusterRole
143
+ name : cluster-admin
144
+ apiGroup : rbac.authorization.k8s.io
145
+ subjects :
146
+ - kind : ServiceAccount
147
+ name : my-sa
148
+ namespace : my-ns
149
+ - name : example-crb-2
150
+ fullnameOverride : " "
151
+ annotations : {}
152
+ extraLabels :
153
+ mylabel : myvalue
154
+ roleRef :
155
+ kind : ClusterRole
156
+ name : cluster-admin
157
+ apiGroup : rbac.authorization.k8s.io
Original file line number Diff line number Diff line change
1
+ {{- if .Values.ClusterRoles -}}
2
+ {{- range .Values.ClusterRoles }}
3
+ apiVersion : rbac.authorization.k8s.io/v1
4
+ kind : ClusterRole
5
+ metadata :
6
+ {{- if .namespace }}
7
+ namespace : {{ .namespace }}
8
+ {{- end }}
9
+ name : {{ if .fullnameOverride }}{{ .fullnameOverride }}{{ else }}{{ include "k8s-resources.fullname" $ }}-{{ .name }}{{ end }}
10
+ labels :
11
+ {{- include "k8s-resources.labels" $ | nindent 4 }}
12
+ {{- with .extraLabels }}
13
+ {{- toYaml . | nindent 4 }}
14
+ {{- end }}
15
+ {{- with .annotations }}
16
+ annotations :
17
+ {{- toYaml . | nindent 4 }}
18
+ {{- end }}
19
+ {{- with .rules }}
20
+ rules :
21
+ {{- toYaml . | nindent 2 }}
22
+ {{- end }}
23
+ ---
24
+ {{- end }}
25
+ {{- end }}
Original file line number Diff line number Diff line change
1
+ {{- if .Values.ClusterRoleBindings -}}
2
+ {{- range .Values.ClusterRoleBindings }}
3
+ apiVersion : rbac.authorization.k8s.io/v1
4
+ kind : ClusterRoleBinding
5
+ metadata :
6
+ {{- if .namespace }}
7
+ namespace : {{ .namespace }}
8
+ {{- end }}
9
+ name : {{ if .fullnameOverride }}{{ .fullnameOverride }}{{ else }}{{ include "k8s-resources.fullname" $ }}-{{ .name }}{{ end }}
10
+ labels :
11
+ {{- include "k8s-resources.labels" $ | nindent 4 }}
12
+ {{- with .extraLabels }}
13
+ {{- toYaml . | nindent 4 }}
14
+ {{- end }}
15
+ {{- with .annotations }}
16
+ annotations :
17
+ {{- toYaml . | nindent 4 }}
18
+ {{- end }}
19
+ roleRef :
20
+ {{- toYaml .roleRef | nindent 2 }}
21
+ {{- with .subjects }}
22
+ subjects :
23
+ {{- toYaml . | nindent 2 }}
24
+ {{- end }}
25
+ ---
26
+ {{- end }}
27
+ {{- end }}
Original file line number Diff line number Diff line change @@ -152,3 +152,32 @@ ScaledObjects: []
152
152
# cortexOrgID: logistics
153
153
# threshold: "4"
154
154
# type: prometheus
155
+
156
+ # ClusterRoles -- A list ClusterRoles to create
157
+ ClusterRoles : []
158
+ # - name: example-cr
159
+ # fullnameOverride: ""
160
+ # annotations: {}
161
+ # extraLabels: {}
162
+ # rules:
163
+ # - apiGroups:
164
+ # - ""
165
+ # resources:
166
+ # - configmaps
167
+ # verbs:
168
+ # - '*'
169
+
170
+ # ClusterRoleBindings -- A list ClusterRoleBindings to create
171
+ ClusterRoleBindings : []
172
+ # - name: example-crb
173
+ # fullnameOverride: ""
174
+ # annotations: {}
175
+ # extraLabels: {}
176
+ # roleRef:
177
+ # kind: ClusterRole
178
+ # name: cluster-admin
179
+ # apiGroup: rbac.authorization.k8s.io
180
+ # subjects:
181
+ # - kind: ServiceAccount
182
+ # name: my-sa
183
+ # namespace: my-ns
You can’t perform that action at this time.
0 commit comments