Skip to content

Commit 5681303

Browse files
committed
WIP: consoleidate most common resources
Signed-off-by: Todd Short <[email protected]>
1 parent eb1f491 commit 5681303

27 files changed

+563
-687
lines changed

helm/olmv1/templates/clusterrole-catalogd-metrics-reader.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

helm/olmv1/templates/clusterrole-catalogd-proxy-role.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{{- $options := list }}
2+
{{- if .Values.options.catalogd.enabled }}
3+
{{- $options = append $options "catalogd" }}
4+
{{- end }}
5+
{{- if .Values.options.operatorController.enabled }}
6+
{{- $options = append $options "operator-controller" }}
7+
{{- end }}
8+
{{- range $index, $name := $options }}
9+
---
10+
apiVersion: rbac.authorization.k8s.io/v1
11+
kind: ClusterRole
12+
metadata:
13+
annotations:
14+
{{- include "olmv1.annotations" $ | nindent 4 }}
15+
labels:
16+
app.kubernetes.io/name: {{ $name }}
17+
{{- include "olmv1.labels" $| nindent 4 }}
18+
name: {{ $name -}}-metrics-reader
19+
rules:
20+
- nonResourceURLs:
21+
- /metrics
22+
verbs:
23+
- get
24+
{{- end }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{- $options := list }}
2+
{{- if .Values.options.catalogd.enabled }}
3+
{{- $options = append $options "catalogd" }}
4+
{{- end }}
5+
{{- if .Values.options.operatorController.enabled }}
6+
{{- $options = append $options "operator-controller" }}
7+
{{- end }}
8+
{{- range $index, $name := $options }}
9+
---
10+
apiVersion: rbac.authorization.k8s.io/v1
11+
kind: ClusterRole
12+
metadata:
13+
annotations:
14+
{{- include "olmv1.annotations" $ | nindent 4 }}
15+
labels:
16+
app.kubernetes.io/name: {{ $name }}
17+
{{- include "olmv1.labels" $ | nindent 4 }}
18+
name: {{ $name -}}-proxy-role
19+
rules:
20+
- apiGroups:
21+
- authentication.k8s.io
22+
resources:
23+
- tokenreviews
24+
verbs:
25+
- create
26+
- apiGroups:
27+
- authorization.k8s.io
28+
resources:
29+
- subjectaccessreviews
30+
verbs:
31+
- create
32+
{{- end }}

helm/olmv1/templates/clusterrole-operator-controller-metrics-reader.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

helm/olmv1/templates/clusterrole-operator-controller-proxy-role.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

helm/olmv1/templates/clusterrolebinding-catalogd-manager-rolebinding.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

helm/olmv1/templates/clusterrolebinding-catalogd-proxy-rolebinding.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{{- $options := list }}
2+
{{- if .Values.options.catalogd.enabled }}
3+
{{- $options = append $options "catalogd" }}
4+
{{- end }}
5+
{{- if .Values.options.operatorController.enabled }}
6+
{{- $options = append $options "operator-controller" }}
7+
{{- end }}
8+
{{- range $index, $name := $options }}
9+
---
10+
apiVersion: rbac.authorization.k8s.io/v1
11+
kind: ClusterRoleBinding
12+
metadata:
13+
annotations:
14+
{{- include "olmv1.annotations" $ | nindent 4 }}
15+
labels:
16+
app.kubernetes.io/name: {{ $name }}
17+
{{- include "olmv1.labels" $ | nindent 4 }}
18+
name: {{ $name -}}-manager-rolebinding
19+
roleRef:
20+
apiGroup: rbac.authorization.k8s.io
21+
kind: ClusterRole
22+
name: {{ $name -}}-manager-role
23+
subjects:
24+
- kind: ServiceAccount
25+
name: {{ $name -}}-controller-manager
26+
namespace: {{ $.Values.namespaces.olmv1.name }}
27+
{{- end }}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{{- $options := list }}
2+
{{- if .Values.options.catalogd.enabled }}
3+
{{- $options = append $options "catalogd" }}
4+
{{- end }}
5+
{{- if .Values.options.operatorController.enabled }}
6+
{{- $options = append $options "operator-controller" }}
7+
{{- end }}
8+
{{- range $index, $name := $options }}
9+
---
10+
apiVersion: rbac.authorization.k8s.io/v1
11+
kind: ClusterRoleBinding
12+
metadata:
13+
annotations:
14+
{{- include "olmv1.annotations" $ | nindent 4 }}
15+
labels:
16+
app.kubernetes.io/name: {{ $name }}
17+
{{- include "olmv1.labels" $ | nindent 4 }}
18+
name: {{ $name -}}-proxy-rolebinding
19+
roleRef:
20+
apiGroup: rbac.authorization.k8s.io
21+
kind: ClusterRole
22+
name: {{ $name -}}-proxy-role
23+
subjects:
24+
- kind: ServiceAccount
25+
name: {{ $name -}}-controller-manager
26+
namespace: {{ $.Values.namespaces.olmv1.name }}
27+
{{- end }}

0 commit comments

Comments
 (0)