apiVersion: v1
kind: ServiceAccount
metadata:
  name: litmus-ns-exp-sa
  namespace: default
  labels:
    app.kubernetes.io/name: litmus
    # provide unique instance-id if applicable
    # app.kubernetes.io/instance: litmus-abcxzy
    app.kubernetes.io/version: v3.5.0
    app.kubernetes.io/component: operator-serviceaccount
    app.kubernetes.io/part-of: litmus
    app.kubernetes.io/managed-by: kubectl
    name: litmus-ns-exp-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: litmus-ns-exp-sa
  namespace: default
  labels:
    app.kubernetes.io/name: litmus
    # provide unique instance-id if applicable
    # app.kubernetes.io/instance: litmus-abcxzy
    app.kubernetes.io/version: v3.5.0
    app.kubernetes.io/component: operator-role
    app.kubernetes.io/part-of: litmus
    app.kubernetes.io/managed-by: kubectl
    name: litmus-ns-exp-sa
rules:
- apiGroups: [""]
  resources: ["replicationcontrollers","secrets"]
  verbs: ["get","list"]
- apiGroups: ["apps.openshift.io"]
  resources: ["deploymentconfigs"]
  verbs: ["get","list"]
- apiGroups: ["apps"]
  resources: ["deployments", "daemonsets", "replicasets", "statefulsets"]
  verbs: ["get","list","update"]
- apiGroups: ["batch"]
  resources: ["jobs"]
  verbs: ["get","list","create","deletecollection"]
- apiGroups: ["argoproj.io"]
  resources: ["rollouts"]
  verbs: ["get","list"]
- apiGroups: [""]
  resources: ["pods","pods/exec","pods/log","pods/eviction","configmaps","events","services"]
  verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
- apiGroups: ["litmuschaos.io"]
  resources: ["chaosengines","chaosexperiments","chaosresults"]
  verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: litmus-ns-exp-sa
  namespace: default
  labels:
    app.kubernetes.io/name: litmus
    # provide unique instance-id if applicable
    # app.kubernetes.io/instance: litmus-abcxzy
    app.kubernetes.io/version: v3.5.0
    app.kubernetes.io/component: operator-rolebinding
    app.kubernetes.io/part-of: litmus
    app.kubernetes.io/managed-by: kubectl
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: litmus-ns-exp-sa
subjects:
- kind: ServiceAccount
  name: litmus-ns-exp-sa
  namespace: default