apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: customdomain-editor-role
  namespace: dataservice
rules:
- apiGroups:
  - customdomain.apigateway.tidbcloud.com
  resources:
  - customdomains
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - customdomain.apigateway.tidbcloud.com
  resources:
  - customdomains/status
  verbs:
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: dataservice-customdomain
  namespace: dataservice
roleRef:
  kind: Role
  name: customdomain-editor-role
  apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
  name: data-service
  namespace: dataservice
