mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
fix(template): Don't print empty lists
This commit is contained in:
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
name: template
|
||||
description: A Helm library chart containing common templates, keeping application templates short
|
||||
type: library
|
||||
version: 0.5.0
|
||||
version: 0.5.1
|
||||
maintainers:
|
||||
- name: Jim Martens
|
||||
url: https://2martens.de
|
||||
@@ -10,8 +10,8 @@ sources:
|
||||
- https://github.com/2martens/cloud-configuration
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- kind: added
|
||||
description: Add ability to configure volumes/volume mounts
|
||||
- kind: fixed
|
||||
description: Only print volumes and volumeMounts if they are filled
|
||||
artifacthub.io/signKey: |
|
||||
fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8
|
||||
url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc
|
||||
|
||||
@@ -58,12 +58,16 @@ spec:
|
||||
- name: {{ .name }}
|
||||
value: {{ tpl (quote .value) $ }}
|
||||
{{- end }}
|
||||
{{- if or .Values.application.isSpring .Values.volumeMounts }}
|
||||
volumeMounts:
|
||||
{{- if .Values.application.isSpring }}
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
{{- end }}
|
||||
{{- if .Values.volumeMounts }}
|
||||
{{- toYaml .Values.volumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.application.port }}
|
||||
@@ -117,13 +121,17 @@ spec:
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.application.isSpring .Values.volumes }}
|
||||
volumes:
|
||||
{{- if .Values.application.isSpring }}
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
{{- end }}
|
||||
{{- if .Values.volumes }}
|
||||
{{- toYaml .Values.volumes | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.podSpec }}
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user