Commit 3ff9c31d authored by Geoff Simmons's avatar Geoff Simmons

viking controller ClusterRole is required for read access to IngressClass.

This is necessary even if the controller is otherwise restricted to
a namespace. So we add a new ClusterRole to add the RBAC read rights
(wath, list and get) unconditionally for any controller instance.
parent 6d6753d5
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
app.kubernetes.io/name: {{ template "viking-controller.name" . }}-ingressclass
helm.sh/chart: {{ template "viking-controller.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
name: viking.uplex.de:{{ template "viking-controller.fullname" . }}-ingressclass
rules:
- apiGroups:
- networking.k8s.io
resources:
- ingressclasses
verbs:
- list
- watch
- get
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: {{ template "viking-controller.name" . }}-ingressclass
helm.sh/chart: {{ template "viking-controller.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
name: {{ template "viking-controller.fullname" . }}-ingressclass
subjects:
- kind: ServiceAccount
name: {{ template "viking-controller.fullname" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: viking.uplex.de:{{ template "viking-controller.fullname" . }}-ingressclass
apiGroup: rbac.authorization.k8s.io
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment