AlexRogalskiy/java-patterns

View on GitHub
charts/templates/extended-configmap.yaml

Summary

Maintainability
Test Coverage
{{- if and (or (.Files.Glob "files/conf.d/*.conf") .Values.general.extendedConf) (not .Values.general.extendedConfConfigMap)}}
{{- $fullName := include "backend-java-patterns.fullname" . -}}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ $fullName }}-extended-configuration
  namespace: {{ .Release.Namespace | quote }}
  labels:
    {{- include "backend-java-patterns.labels" . | nindent 4 }}
  {{- if .Values.general.labels }}
  {{- with .Values.general.labels }}
    {{- toYaml . | nindent 4 }}
  {{- end }}
  {{- end }}
  {{- if .Values.general.annotations }}
  {{- with .Values.general.annotations }}
  annotations:
    {{- toYaml . | indent 4 }}
  {{- end }}
  {{- end }}
data:
{{- with .Files.Glob "files/conf.d/*.conf" }}
{{ .AsConfig | indent 2 }}
{{- end }}
{{ with .Values.general.extendedConf }}
  override.conf: |
{{- range $key, $value := . }}
    {{ $key | snakecase }}={{ $value }}
{{- end }}
{{- end }}
{{- end }}