---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kubeflow-spark-admin
  labels:
    app: spark-operator
    app.kubernetes.io/name: spark-operator
    rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
rules: []
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kubeflow-spark-edit
  labels:
    app: spark-operator
    app.kubernetes.io/name: spark-operator
    rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true"
    rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
rules:
  - apiGroups:
      - sparkoperator.k8s.io
    resources:
      - sparkapplications
      - scheduledsparkapplications
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - sparkoperator.k8s.io
    resources:
      - sparkapplications/status
      - scheduledsparkapplications/status
    verbs:
      - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kubeflow-spark-view
  labels:
    app: spark-operator
    app.kubernetes.io/name: spark-operator
    rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true"
rules:
  - apiGroups:
      - sparkoperator.k8s.io
    resources:
      - sparkapplications
      - scheduledsparkapplications
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - sparkoperator.k8s.io
    resources:
      - sparkapplications/status
      - scheduledsparkapplications/status
    verbs:
      - get
---

