mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 12:02:47 +00:00
helm consul toegevoegd ma nie als submodule?
This commit is contained in:
49
consul-helm/templates/sync-catalog-clusterrole.yaml
Normal file
49
consul-helm/templates/sync-catalog-clusterrole.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
{{- $syncEnabled := (or (and (ne (.Values.syncCatalog.enabled | toString) "-") .Values.syncCatalog.enabled) (and (eq (.Values.syncCatalog.enabled | toString) "-") .Values.global.enabled)) }}
|
||||
{{- if $syncEnabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ template "consul.fullname" . }}-sync-catalog
|
||||
labels:
|
||||
app: {{ template "consul.name" . }}
|
||||
chart: {{ template "consul.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources:
|
||||
- services
|
||||
- endpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
{{- if .Values.syncCatalog.toK8S }}
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- create
|
||||
{{- end }}
|
||||
- apiGroups: [""]
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
{{- if .Values.global.bootstrapACLs }}
|
||||
- apiGroups: [""]
|
||||
resources:
|
||||
- secrets
|
||||
resourceNames:
|
||||
- {{ template "consul.fullname" . }}-catalog-sync-acl-token
|
||||
verbs:
|
||||
- get
|
||||
{{- end }}
|
||||
{{- if .Values.global.enablePodSecurityPolicies }}
|
||||
- apiGroups: ["policy"]
|
||||
resources: ["podsecuritypolicies"]
|
||||
verbs:
|
||||
- use
|
||||
resourceNames:
|
||||
- {{ template "consul.fullname" . }}-sync-catalog
|
||||
{{- end }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user