Patch roles/bindings for keycloak-operator so it can more easily watch
any namespace(can't watch all, they have to be explicitly specified).
Showing
2 changed files
with
80 additions
and
0 deletions
... | @@ -9,4 +9,83 @@ releases: | ... | @@ -9,4 +9,83 @@ releases: |
9 | - name: keycloak-operator | 9 | - name: keycloak-operator |
10 | namespace: {{ .Values.namespace }} | 10 | namespace: {{ .Values.namespace }} |
11 | chart: charts/keycloak-operator | 11 | chart: charts/keycloak-operator |
12 | jsonPatches: | ||
13 | - target: | ||
14 | kind: Deployment | ||
15 | name: keycloak-operator | ||
16 | namespace: {{ .Values.namespace }} | ||
17 | version: v1 | ||
18 | group: apps | ||
19 | patch: | ||
20 | - op: add | ||
21 | path: /spec/template/spec/containers/0/env/- | ||
22 | value: | ||
23 | name: QUARKUS_OPERATOR_SDK_NAMESPACES | ||
24 | value: {{ .Values.watchNamespaces }} | ||
25 | - target: | ||
26 | kind: Role | ||
27 | name: keycloak-operator-role | ||
28 | namespace: {{ .Values.namespace }} | ||
29 | version: v1 | ||
30 | group: rbac.authorization.k8s.io | ||
31 | patch: | ||
32 | - op: remove | ||
33 | path: /metadata/namespace | ||
34 | - op: replace | ||
35 | path: /kind | ||
36 | value: ClusterRole | ||
37 | - target: | ||
38 | kind: RoleBinding | ||
39 | name: keycloak-operator-role-binding | ||
40 | namespace: {{ .Values.namespace }} | ||
41 | version: v1 | ||
42 | group: rbac.authorization.k8s.io | ||
43 | patch: | ||
44 | - op: remove | ||
45 | path: /metadata/namespace | ||
46 | - op: replace | ||
47 | path: /kind | ||
48 | value: ClusterRoleBinding | ||
49 | - op: replace | ||
50 | path: /roleRef/kind | ||
51 | value: ClusterRole | ||
52 | - target: | ||
53 | kind: RoleBinding | ||
54 | name: keycloak-operator-view | ||
55 | namespace: {{ .Values.namespace }} | ||
56 | version: v1 | ||
57 | group: rbac.authorization.k8s.io | ||
58 | patch: | ||
59 | - op: remove | ||
60 | path: /metadata/namespace | ||
61 | - op: replace | ||
62 | path: /kind | ||
63 | value: ClusterRoleBinding | ||
64 | - op: replace | ||
65 | path: /roleRef/kind | ||
66 | value: ClusterRole | ||
67 | - target: | ||
68 | kind: RoleBinding | ||
69 | name: keycloakcontroller-role-binding | ||
70 | namespace: {{ .Values.namespace }} | ||
71 | version: v1 | ||
72 | group: rbac.authorization.k8s.io | ||
73 | patch: | ||
74 | - op: remove | ||
75 | path: /metadata/namespace | ||
76 | - op: replace | ||
77 | path: /kind | ||
78 | value: ClusterRoleBinding | ||
79 | - target: | ||
80 | kind: RoleBinding | ||
81 | name: keycloakrealmimportcontroller-role-binding | ||
82 | namespace: {{ .Values.namespace }} | ||
83 | version: v1 | ||
84 | group: rbac.authorization.k8s.io | ||
85 | patch: | ||
86 | - op: remove | ||
87 | path: /metadata/namespace | ||
88 | - op: replace | ||
89 | path: /kind | ||
90 | value: ClusterRoleBinding | ||
12 | 91 | ... | ... |
-
Please register or sign in to post a comment