apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: ibm-cpo-elasticsearch-manager-role
rules:
  ##
  ## Base operator rules
  ##
  - apiGroups:
      - ""
    resources:
      - secrets
      - pods
      - pods/exec
      - pods/log
      - services
      - endpoints
      - persistentvolumeclaims
      - events
      - configmaps
      - secrets
      - serviceaccounts
      - poddisruptionbudgets
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - rbac.authorization.k8s.io
    resources:
      - roles
      - rolebindings
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - apps
    resources:
      - deployments
      - daemonsets
      - replicasets
      - statefulsets
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - apps
    resources:
      - deployments/finalizers
    verbs:
      - update
  - apiGroups:
      -  security.openshift.io
    resources:
      - securitycontextconstraints
    verbs:
      - use
    resourceNames:
      - restricted
  - apiGroups:
      - policy
    resources:
      - poddisruptionbudgets
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  ##
  ## Rules for elasticsearch.cloudpackopen.ibm.com/v1, Kind: Elasticsearch
  ##
  - apiGroups:
      - elasticsearch.cloudpackopen.ibm.com
    resources:
      - elasticsearches
      - elasticsearches/status
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  ##
  ## Rules for elasticsearch.cloudpackopen.ibm.com/v1, Kind: ElasticseachDetails
  ##
  - apiGroups:
      - elasticsearch.cloudpackopen.ibm.com
    resources:
      - "*"
    verbs:
      - "*"
# +kubebuilder:scaffold:rules
