---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: faas-controller
  namespace: openfaas
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
  name: faas-controller
  namespace: openfaas-fn
rules:
- apiGroups:
  - ""
  resources:
  - services
  verbs:
  - get
  - list
  - watch
  - create
  - delete
  - update
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - extensions
  resources:
  - deployments
  verbs:
  - get
  - list
  - watch
  - create
  - delete
  - update
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  name: faas-controller-fn
  namespace: openfaas-fn
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: faas-controller
subjects:
- kind: ServiceAccount
  name: faas-controller
  namespace: openfaas
