apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    ksonnet.io/component: katib
  name: metrics-collector
rules:
- apiGroups:
  - ""
  resources:
  - pods
  - pods/log
  - pods/status
  verbs:
  - '*'
- apiGroups:
  - batch
  resources:
  - jobs
  verbs:
  - '*'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    ksonnet.io/component: katib
  name: studyjob-controller
rules:
- apiGroups:
  - ""
  resources:
  - configmaps
  - serviceaccounts
  verbs:
  - create
  - update
  - list
  - watch
- apiGroups:
  - batch
  resources:
  - jobs
  - cronjobs
  verbs:
  - '*'
- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - create
  - get
- apiGroups:
  - kubeflow.org
  resources:
  - studyjobs
  verbs:
  - '*'
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  labels:
    ksonnet.io/component: katib
  name: vizier-core
rules:
- apiGroups:
  - ""
  resources:
  - pods
  - nodes
  - nodes/*
  - pods/log
  - pods/status
  - services
  - persistentvolumes
  - persistentvolumes/status
  - persistentvolumeclaims
  - persistentvolumeclaims/status
  verbs:
  - '*'
- apiGroups:
  - batch
  resources:
  - jobs
  - jobs/status
  verbs:
  - '*'
- apiGroups:
  - extensions
  resources:
  - ingresses
  - ingresses/status
  - deployments
  - deployments/status
  verbs:
  - '*'
- apiGroups:
  - ""
  resources:
  - services
  verbs:
  - '*'
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  labels:
    ksonnet.io/component: katib
  name: vizier-core
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: vizier-core
subjects:
- kind: ServiceAccount
  name: vizier-core
  namespace: kubeflow
---
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    ksonnet.io/component: katib
  name: metrics-collector
  namespace: kubeflow
---
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    ksonnet.io/component: katib
  name: studyjob-controller
  namespace: kubeflow
---
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    ksonnet.io/component: katib
  name: vizier-core
  namespace: kubeflow
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    ksonnet.io/component: katib
  name: metrics-collector
  namespace: kubeflow
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: metrics-collector
subjects:
- kind: ServiceAccount
  name: metrics-collector
  namespace: kubeflow
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    ksonnet.io/component: katib
  name: studyjob-controller
  namespace: kubeflow
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: studyjob-controller
subjects:
- kind: ServiceAccount
  name: studyjob-controller
  namespace: kubeflow
