Skip to content

Commit

Permalink
Fix extra config template rendering (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoColomb authored Oct 18, 2024
1 parent a4810ed commit ef335e3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/netbox/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/netbox/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/netbox/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/netbox/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/netbox/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/netbox/templates/worker/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ef335e3

Please sign in to comment.