apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: zhuiyi
  name: zhuiyirole
rules:
- apiGroups: [""]
  resources: ["crontabs", "services", "endpoints", "pods", "pods/log", "configmaps", "resourcequotas", "secrets", "serviceaccounts", "persistentvolumes", "persistentvolumeclaims", "events" , "componentstatuses", "namespaces", "pods/portforward"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["extensions", "apps"]
  resources: ["deployments"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["batch", "extensions"]
  resources: ["jobs"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["apps", "v1beta2"]
  resources: ["statefulsets", "daemonsets", "replicasets"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["batch", "v1beta1"]
  resources: ["cronjobs"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["networking.k8s.io"]
  resources: ["networkpolicies", "ingresses", "networkpolicies"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["autoscaling", "v2beta1"]
  resources: ["horizontalpodautoscaler"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["apiextensions.k8s.io", "v1beta1"]
  resources: ["customresourcedefinitions"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["extensions"]
  resources: ["ingresses"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
 
- apiGroups: ["storage.k8s.io"]
  resources: ["storageclasses"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["config.istio.io"]
  resources: ["deniers", "egressrules", "metrics", "prometheuses", "rules", ]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["crd.projectcalico.org"]
  resources: ["networkpolicies"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["events.k8s.io"]
  resources: ["gateways", "sidecars", "virtualservices"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["networking.istio.io"]
  resources: ["events", "gateways", "virtualservices"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: ["rbac.authorization.k8s.io"]
  resources: ["rolebindings", "roles"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

- apiGroups: [""]
  resources: ["pods/exec"]
  verbs: ["create"]
