{{- if .Values.front.enabled }}  
  {{- $apiUrl := "" }}  
  {{- if .Values.api.ingress.tlsEnabled }}  
    {{- $apiUrl = printf "https://%s" .Values.api.ingress.host | quote }}  
  {{- else }}  
    {{- $apiUrl = printf "http://%s" .Values.api.ingress.host | quote }}  
  {{- end }}  
apiVersion: v1  
kind: ConfigMap  
metadata:  
  name: {{ .Values.name }}-front  
data:  
  API_URL: {{ $apiUrl }}  
{{- end }}