Add extra configMaps support to helm chart (#10673)

* Add extra configMaps support to helm chart

Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com>

* Introducing unit tests for helm chart

Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com>

---------

Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com>
This commit is contained in:
Stavros Foteinopoulos 2023-12-02 15:26:23 +02:00 committed by GitHub
parent 60046bf7e1
commit 1f06e26080
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 100 additions and 2 deletions

View file

@ -0,0 +1,23 @@
{{- if .Values.defaultBackend.enabled }}
{{- range .Values.defaultBackend.extraConfigMaps }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .name }}
namespace: {{ include "ingress-nginx.namespace" $ | quote }}
labels:
{{- include "ingress-nginx.labels" $ | nindent 4 }}
{{- with $.Values.defaultBackend.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
{{- with .data }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}