33 lines
878 B
YAML
33 lines
878 B
YAML
{{- if .Values.global.gossipEncryption.autoGenerate }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: {{ template "consul.fullname" . }}-gossip-encryption-autogenerate
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
app: {{ template "consul.name" . }}
|
|
chart: {{ template "consul.chart" . }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
component: gossip-encryption-autogenerate
|
|
annotations:
|
|
"helm.sh/hook": pre-install,pre-upgrade
|
|
"helm.sh/hook-delete-policy": before-hook-creation
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources:
|
|
- secrets
|
|
verbs:
|
|
- create
|
|
- get
|
|
{{- if .Values.global.enablePodSecurityPolicies }}
|
|
- apiGroups: ["policy"]
|
|
resources:
|
|
- podsecuritypolicies
|
|
verbs:
|
|
- use
|
|
resourceNames:
|
|
- {{ template "consul.fullname" . }}-gossip-encryption-autogenerate
|
|
{{- end }}
|
|
{{- end }}
|