Skip to content

Commit cd373f2

Browse files
aalexandruaalexand
andauthored
Add missing RBAC for ServiceMetadataWatchers (#89)
* Add missing RBAC for ServiceMetadataWatchers * Add extraRBAC to helm values * Add serviceMetadata to configmap template --------- Co-authored-by: aalexand <[email protected]>
1 parent 181dfa7 commit cd373f2

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

charts/cluster-registry-client/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ maintainers:
1515
- name: radu-catalina
1616
1717

18-
version: 0.1.8
19-
appVersion: v1.4.2
18+
version: 0.2.0
19+
appVersion: v1.5.1

charts/cluster-registry-client/templates/clusterrole.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,40 @@ rules:
3131
- get
3232
- patch
3333
- update
34+
- apiGroups:
35+
- registry.ethos.adobe.com
36+
resources:
37+
- servicemetadatawatchers
38+
verbs:
39+
- create
40+
- delete
41+
- get
42+
- list
43+
- patch
44+
- update
45+
- watch
46+
- apiGroups:
47+
- registry.ethos.adobe.com
48+
resources:
49+
- servicemetadatawatchers/finalizers
50+
verbs:
51+
- update
52+
- apiGroups:
53+
- registry.ethos.adobe.com
54+
resources:
55+
- servicemetadatawatchers/status
56+
verbs:
57+
- get
58+
- patch
59+
- update
60+
- apiGroups:
61+
- ""
62+
resources:
63+
- namespaces
64+
verbs:
65+
- get
66+
- watch
67+
- list
68+
{{- with .Values.extraRBAC }}
69+
{{- toYaml . | nindent 2 }}
70+
{{- end }}

charts/cluster-registry-client/templates/configmap.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,16 @@ data:
3535
{{- else }}
3636
alertMap: []
3737
{{- end }}
38+
{{- if .Values.clusterRegistryClient.serviceMetadata }}
39+
serviceMetadata:
40+
serviceIdAnnotation: {{ .Values.clusterRegistryClient.serviceIdAnnotation | default "adobe.serviceid" }}
41+
{{- if .Values.clusterRegistryClient.serviceMetadata.watchedGVKs }}
42+
watchedGVKs:
43+
{{- range $_, $gvk := .Values.clusterRegistryClient.serviceMetadata.watchedGVKs }}
44+
- group: {{ $gvk.group }}
45+
version: {{ $gvk.version }}
46+
kind: {{ $gvk.kind }}
47+
{{- end }}
48+
{{- end }}
49+
{{- end }}
3850
{{- end }}

0 commit comments

Comments
 (0)