{{- if and .Values.rbac.create (not .Values.rbac.clusterRBAC) -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  labels:
    app: ""
    suite: pachyderm
  name: pachyderm
  namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
  - ""
  resources:
  - nodes
  - pods
  - pods/log
  - endpoints
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - replicationcontrollers
  - services
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - delete
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - delete
  - deletecollection
{{ end -}}

{{- if and .Values.rbac.create (not .Values.rbac.clusterRBAC) -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  labels:
    app: ""
    suite: pachyderm
  name: pachyderm
  namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
  - ""
  resources:
  - nodes
  - pods
  - pods/log
  - endpoints
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - replicationcontrollers
  - replicationcontrollers/scale
  - services
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - delete
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - delete
  - deletecollection
{{ end -}}

Add replicationcontrollers/scale to Role too
Add replicationcontrollers/scale to Role too
