0

We are using implementation("org.springframework.cloud:spring-cloud-starter-kubernetes-client-config:2.1.1").

For configmap used 2 files: application.yaml|yml, application-parent.yaml|yml.

kind: ConfigMap
metadata:
  name: {{ .Values.application }}
  namespace: {{ .Release.Namespace }}
data:
  application.yml: |
  {{ (.Files.Glob "config/application.yaml").AsConfig | indent 2 }}
  application-dev.yml: |
  {{ (.Files.Glob "config/application-parent.yaml").AsConfig | indent 2 }}

After successful deploy and startup application reading values from application.yml, but ignoring values from application-parent.yml.

k8s console screenshot

What can i do wrong?

Pavel
  • 31
  • 4
  • I think it is supposed to be one Files.Glob per name. So in this case application takes the first Files.Glob. You could llok into using range and see if that helps. https://stackoverflow.com/questions/47595295/how-do-i-load-multiple-templated-config-files-into-a-helm-chart – JCompetence Apr 06 '22 at 12:17
  • @SMA, i tried with key:path way and your way, but if config dont matching `application.yml` (for example APPLICATION-DEV.YAML, APPLICATION-parent.YAML`, app just ignores it and fails after startup (cause needed for success props lays in parent). – Pavel Apr 06 '22 at 13:05

0 Answers0