apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: easyai-capacity-controller
  namespace: easyai
rules:
  - apiGroups: ["apps"]
    resources: ["deployments"]
    resourceNames: ["easyai-worker-ningbo", "easyai-worker-hongkong"]
    verbs: ["get"]
  - apiGroups: ["apps"]
    resources: ["deployments/scale"]
    resourceNames: ["easyai-worker-ningbo", "easyai-worker-hongkong"]
    verbs: ["get", "update", "patch"]
  - apiGroups: [""]
    resources: ["pods"]
    verbs: ["get", "list", "patch"]
