apiVersion: v1
kind: ServiceAccount
metadata:
  name: dataflow-svc
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: dataflow-svc-runtime-read
rules:
  - apiGroups:
      - ""
    resources:
      - configmaps
      - endpoints
      - pods
      - services
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - secrets
    verbs:
      - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: dataflow-svc-runtime-read
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: dataflow-svc-runtime-read
subjects:
  - kind: ServiceAccount
    name: dataflow-svc
