{{- if or .Values.podSecurityPolicy.enabled (and .Values.ingressController.enabled .Values.ingressController.serviceAccount.create) -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "kong.serviceAccountName" . }}
  namespace: {{ .Release.namespace }}
  labels:
    {{- include "kong.metaLabels" . | nindent 4 }}
{{- end -}}
