apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  labels:
    app: {{ .Chart.Name }}
  name: '{{ .Release.Namespace }}:{{ .Chart.Name }}'
rules:
  # manage the KosQuery, KosTemplate CRD
  - apiGroups:
      - apiextensions.k8s.io
    resources:
      - customresourcedefinitions
    verbs:
      - '*'
  # Read KosQueries, KosTemplates created by others
  - apiGroups:
      - kos-operator.stable.sap.cc
    resources:
      - kos-queries
      - kos-templates
    verbs:
      - get
      - list
      - watch
  # Read Openstackseeds creatdd by others
  - apiGroups:
      - openstack.stable.sap.cc
    resources:
      - openstackseeds
    verbs:
      - get
      - list
      - watch
  # be able to diff/deploy to other namespaces
  - apiGroups:
      - ""
    resources:
      - namespaces
    verbs:
      - get
      - list
      - watch
  # look up what kinds all KosTemplates render currently
  - apiGroups:
      - ""
    resources:
      - configmaps
      - services
    verbs:
      - '*'
  - apiGroups:
      - extensions
    resources:
      - deployments
      - ingresses
    verbs:
      - '*'

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  labels:
    app: {{ .Chart.Name }}
  name: '{{ .Release.Namespace }}:{{ .Chart.Name }}'
rules:
  # manage the KosQuery, KosTemplate CRD
  - apiGroups:
      - apiextensions.k8s.io
    resources:
      - customresourcedefinitions
    verbs:
      - '*'
  # Read KosQueries, KosTemplates created by others
  - apiGroups:
      - kos-operator.stable.sap.cc
    resources:
      - kos-queries
      - kos-templates
    verbs:
      - get
      - list
      - watch
  # Read Openstackseeds creatdd by others
  - apiGroups:
      - openstack.stable.sap.cc
    resources:
      - openstackseeds
    verbs:
      - get
      - list
      - watch
  # be able to diff/deploy to other namespaces
  - apiGroups:
      - ""
    resources:
      - namespaces
    verbs:
      - get
      - list
      - watch
  # look up what kinds all KosTemplates render currently
  - apiGroups:
      - ""
    resources:
      - configmaps
      - services
    verbs:
      - '*'
  - apiGroups:
      - extensions
    resources:
      - deployments
      - ingresses
    verbs:
      - '*'
# KosQueries might use k8s to query stuff
  - apiGroups:
      - ""
    resources:
      - nodes
    verbs:
      - get
      - list
      - watch

Add RBAC for reading nodes
[kos-operator] Add RBAC for reading nodes

This is used by a KosQuery defined by nova.
