From 8e27679f2a1cb1246b0e6dbecb387f644e1d952a Mon Sep 17 00:00:00 2001 From: weekface Date: Fri, 27 Dec 2019 10:26:21 +0800 Subject: [PATCH] add rbac for k8s v1.17 (#1426) --- charts/tidb-operator/templates/scheduler-rbac.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/charts/tidb-operator/templates/scheduler-rbac.yaml b/charts/tidb-operator/templates/scheduler-rbac.yaml index 0c702ce13b7..48bf72831cf 100644 --- a/charts/tidb-operator/templates/scheduler-rbac.yaml +++ b/charts/tidb-operator/templates/scheduler-rbac.yaml @@ -42,6 +42,13 @@ rules: - apiGroups: [""] resources: ["endpoints"] verbs: ["delete", "get", "patch", "update"] +- apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["create"] +- apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + resourceNames: ["{{ .Values.scheduler.schedulerName }}"] + verbs: ["get", "update"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 @@ -95,6 +102,13 @@ rules: - apiGroups: [""] resources: ["endpoints"] verbs: ["delete", "get", "patch", "update"] +- apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["create"] +- apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + resourceNames: ["{{ .Values.scheduler.schedulerName }}"] + verbs: ["get", "update"] --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1