From ef335e39bb7ec0a10db2c16c110dc3cc8efab0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Colombaro?= Date: Fri, 18 Oct 2024 20:57:04 +0200 Subject: [PATCH] Fix extra config template rendering (#377) --- charts/netbox/Chart.yaml | 2 +- charts/netbox/templates/_helpers.tpl | 4 ++-- charts/netbox/templates/configmap.yaml | 2 +- charts/netbox/templates/cronjob.yaml | 4 ++-- charts/netbox/templates/deployment.yaml | 4 ++-- charts/netbox/templates/worker/deployment.yaml | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/charts/netbox/Chart.yaml b/charts/netbox/Chart.yaml index 28d5ffeb..b5c5cd70 100644 --- a/charts/netbox/Chart.yaml +++ b/charts/netbox/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: netbox -version: 5.0.0-beta.129 +version: 5.0.0-beta.130 appVersion: "v4.1.4" type: application kubeVersion: ^1.25.0-0 diff --git a/charts/netbox/templates/_helpers.tpl b/charts/netbox/templates/_helpers.tpl index 79bd58cf..5dc2b363 100644 --- a/charts/netbox/templates/_helpers.tpl +++ b/charts/netbox/templates/_helpers.tpl @@ -101,7 +101,7 @@ Name of the key in Secret that contains the Redis cache password Volumes that need to be mounted for .Values.extraConfig entries */}} {{- define "netbox.extraConfig.volumes" -}} -{{- range $index, $config := .Values.extraConfig -}} +{{- range $index, $config := .Values.extraConfig }} - name: extra-config-{{ $index }} {{- if $config.values }} configMap: @@ -123,7 +123,7 @@ Volumes that need to be mounted for .Values.extraConfig entries Volume mounts for .Values.extraConfig entries */}} {{- define "netbox.extraConfig.volumeMounts" -}} -{{- range $index, $config := .Values.extraConfig -}} +{{- range $index, $config := .Values.extraConfig }} - name: extra-config-{{ $index }} mountPath: /run/config/extra/{{ $index }} readOnly: true diff --git a/charts/netbox/templates/configmap.yaml b/charts/netbox/templates/configmap.yaml index 712615fc..491dfce6 100644 --- a/charts/netbox/templates/configmap.yaml +++ b/charts/netbox/templates/configmap.yaml @@ -206,7 +206,7 @@ data: {{- toPrettyJson .Values.overrideUnitConfig | nindent 4 }} {{- end }} - {{- range $index, $config := .Values.extraConfig -}} + {{- range $index, $config := .Values.extraConfig }} {{- if $config.values }} extra-{{ $index }}.yaml: |- {{- toYaml $config.values | nindent 4 }} diff --git a/charts/netbox/templates/cronjob.yaml b/charts/netbox/templates/cronjob.yaml index fe8041dd..a7653065 100644 --- a/charts/netbox/templates/cronjob.yaml +++ b/charts/netbox/templates/cronjob.yaml @@ -82,7 +82,7 @@ spec: - name: secrets mountPath: /run/secrets/netbox readOnly: true - {{- include "netbox.extraConfig.volumeMounts" . | nindent 12 -}} + {{- include "netbox.extraConfig.volumeMounts" . | nindent 12 }} - name: netbox-tmp mountPath: /tmp - name: media @@ -142,7 +142,7 @@ spec: items: - key: {{ include "netbox.cachingRedis.secretKey" . | quote }} path: redis_cache_password - {{- include "netbox.extraConfig.volumes" . | nindent 10 -}} + {{- include "netbox.extraConfig.volumes" . | nindent 10 }} - name: netbox-tmp emptyDir: medium: Memory diff --git a/charts/netbox/templates/deployment.yaml b/charts/netbox/templates/deployment.yaml index 633074a8..f24b4089 100644 --- a/charts/netbox/templates/deployment.yaml +++ b/charts/netbox/templates/deployment.yaml @@ -172,7 +172,7 @@ spec: - name: secrets mountPath: /run/secrets/netbox readOnly: true - {{- include "netbox.extraConfig.volumeMounts" . | nindent 8 -}} + {{- include "netbox.extraConfig.volumeMounts" . | nindent 8 }} - name: netbox-tmp mountPath: /tmp - name: media @@ -249,7 +249,7 @@ spec: items: - key: {{ include "netbox.cachingRedis.secretKey" . | quote }} path: redis_cache_password - {{- include "netbox.extraConfig.volumes" . | nindent 6 -}} + {{- include "netbox.extraConfig.volumes" . | nindent 6 }} - name: netbox-tmp emptyDir: medium: Memory diff --git a/charts/netbox/templates/worker/deployment.yaml b/charts/netbox/templates/worker/deployment.yaml index d18added..7c7e9a33 100644 --- a/charts/netbox/templates/worker/deployment.yaml +++ b/charts/netbox/templates/worker/deployment.yaml @@ -88,7 +88,7 @@ spec: - name: secrets mountPath: /run/secrets/netbox readOnly: true - {{- include "netbox.extraConfig.volumeMounts" . | nindent 8 -}} + {{- include "netbox.extraConfig.volumeMounts" . | nindent 8 }} - name: netbox-tmp mountPath: /tmp - name: media @@ -155,7 +155,7 @@ spec: items: - key: {{ include "netbox.cachingRedis.secretKey" . | quote }} path: redis_cache_password - {{- include "netbox.extraConfig.volumes" . | nindent 6 -}} + {{- include "netbox.extraConfig.volumes" . | nindent 6 }} - name: netbox-tmp emptyDir: medium: Memory