{{- if .Values.kubernetesIntegration }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "passbook.fullname" . }}-sa-role
rules:
- apiGroups:
- ""
resources:
- secrets
- services
verbs:
- "get"
- "create"
- "delete"
- "read"
- "patch"
- "extensions"
- "apps"
- "deployments"
- "networking.k8s.io"
- "ingresses"
- namespaces
- list
---
apiVersion: v1
kind: ServiceAccount
name: {{ include "passbook.fullname" . }}-sa
kind: ClusterRoleBinding
name: {{ include "passbook.fullname" . }}-sa-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
namespace: {{ .Release.Namespace }}
{{- end }}