94 lines
1.8 KiB
YAML
94 lines
1.8 KiB
YAML
|
{{- if .Values.rbac.create -}}
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: Role
|
||
|
metadata:
|
||
|
labels:
|
||
|
{{- include "ingress-nginx.labels" . | nindent 4 }}
|
||
|
app.kubernetes.io/component: controller
|
||
|
{{- with .Values.controller.labels }}
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
name: {{ include "ingress-nginx.fullname" . }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
rules:
|
||
|
- apiGroups:
|
||
|
- ""
|
||
|
resources:
|
||
|
- namespaces
|
||
|
verbs:
|
||
|
- get
|
||
|
- apiGroups:
|
||
|
- ""
|
||
|
resources:
|
||
|
- configmaps
|
||
|
- pods
|
||
|
- secrets
|
||
|
- endpoints
|
||
|
verbs:
|
||
|
- get
|
||
|
- list
|
||
|
- watch
|
||
|
- apiGroups:
|
||
|
- ""
|
||
|
resources:
|
||
|
- services
|
||
|
verbs:
|
||
|
- get
|
||
|
- list
|
||
|
- watch
|
||
|
- apiGroups:
|
||
|
- networking.k8s.io
|
||
|
resources:
|
||
|
- ingresses
|
||
|
verbs:
|
||
|
- get
|
||
|
- list
|
||
|
- watch
|
||
|
- apiGroups:
|
||
|
- networking.k8s.io
|
||
|
resources:
|
||
|
- ingresses/status
|
||
|
verbs:
|
||
|
- update
|
||
|
- apiGroups:
|
||
|
- networking.k8s.io
|
||
|
resources:
|
||
|
- ingressclasses
|
||
|
verbs:
|
||
|
- get
|
||
|
- list
|
||
|
- watch
|
||
|
- apiGroups:
|
||
|
- ""
|
||
|
resources:
|
||
|
- configmaps
|
||
|
resourceNames:
|
||
|
- {{ .Values.controller.electionID }}
|
||
|
verbs:
|
||
|
- get
|
||
|
- update
|
||
|
- apiGroups:
|
||
|
- ""
|
||
|
resources:
|
||
|
- configmaps
|
||
|
verbs:
|
||
|
- create
|
||
|
- apiGroups:
|
||
|
- ""
|
||
|
resources:
|
||
|
- events
|
||
|
verbs:
|
||
|
- create
|
||
|
- patch
|
||
|
{{- if .Values.podSecurityPolicy.enabled }}
|
||
|
- apiGroups: [{{ template "podSecurityPolicy.apiGroup" . }}]
|
||
|
resources: ['podsecuritypolicies']
|
||
|
verbs: ['use']
|
||
|
{{- with .Values.controller.existingPsp }}
|
||
|
resourceNames: [{{ . }}]
|
||
|
{{- else }}
|
||
|
resourceNames: [{{ include "ingress-nginx.fullname" . }}]
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|