rancher-partner-charts/charts/koor-tech/koor-operator/templates/proxy-rbac.yaml

40 lines
1.1 KiB
YAML

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "koor-operator.fullname" . }}-proxy-role
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: koor-operator
app.kubernetes.io/part-of: koor-operator
{{- include "koor-operator.labels" . | nindent 4 }}
rules:
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "koor-operator.fullname" . }}-proxy-rolebinding
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: koor-operator
app.kubernetes.io/part-of: koor-operator
{{- include "koor-operator.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: '{{ include "koor-operator.fullname" . }}-proxy-role'
subjects:
- kind: ServiceAccount
name: '{{ include "koor-operator.fullname" . }}-controller-manager'
namespace: '{{ .Release.Namespace }}'