{{- if .Values.startupScripts }}
{{- $highAvailability := gt (int .Values.replicas) 1 -}}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "keycloak.fullname" . }}-startup
  labels:
    {{- include "keycloak.labels" . | nindent 4 }}
data:
  {{- range $key, $value := .Values.startupScripts }}
  {{ $key }}: |
    {{- tpl $value $ | nindent 4 }}
  {{- end }}
{{- end -}}
