2020-02-24 16:25:57 -03:00
|
|
|
{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled }}
|
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
|
metadata:
|
2020-02-26 23:27:28 -05:00
|
|
|
name: {{ include "nginx-ingress.fullname" . }}-admission
|
2020-02-24 16:25:57 -03:00
|
|
|
annotations:
|
|
|
|
|
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
|
|
|
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
|
|
|
|
labels:
|
2020-02-26 23:27:28 -05:00
|
|
|
{{- include "nginx-ingress.labels" . | nindent 4 }}
|
|
|
|
|
app.kubernetes.io/component: {{ .Values.controller.name | quote }}
|
2020-02-24 16:25:57 -03:00
|
|
|
roleRef:
|
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
|
kind: ClusterRole
|
2020-02-26 23:27:28 -05:00
|
|
|
name: {{ include "nginx-ingress.fullname" . }}-admission
|
2020-02-24 16:25:57 -03:00
|
|
|
subjects:
|
|
|
|
|
- kind: ServiceAccount
|
2020-02-26 23:27:28 -05:00
|
|
|
name: {{ include "nginx-ingress.fullname" . }}-admission
|
2020-02-24 16:25:57 -03:00
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
|
{{- end }}
|