Files
charts/bitnami/contour/templates/certgen/rbac.yaml
Carlos Rodríguez Hernández 8cad18aed9 [bitnami/several] Adapt templating format (#8562)
Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>
2022-01-05 18:10:31 +01:00

46 lines
1.6 KiB
YAML

{{- if and .Values.rbac.create .Values.contour.enabled (include "contour.contour-certgen.enabled" .) }}
---
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
kind: Role
metadata:
name: {{ include "common.names.fullname" . }}-contour-certgen
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": "pre-install,pre-upgrade"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: contour-certgen
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- update
---
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
kind: RoleBinding
metadata:
name: {{ include "common.names.fullname" . }}-contour-certgen
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": "pre-install,pre-upgrade"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: contour-certgen
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "common.names.fullname" . }}-contour-certgen
subjects:
- kind: ServiceAccount
name: {{ include "contour.contourCertGenServiceAccountName" . }}
{{- end }}