From 5d650ec849fefabad724637f3bcd093e41b244bf Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 8 Aug 2021 22:29:21 +0200 Subject: [PATCH] refac: use pipe notation --- templates/deployment.yaml | 4 ++-- templates/persistentVolumeClaim.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 10ca185..ef8d70c 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -38,12 +38,12 @@ spec: protocol: TCP resources: {{- toYaml .Values.resources | nindent 12 }} - {{- if eq (default "sqlite3" .Values.config.DRONE_DATABASE_DRIVER) "sqlite3" }} + {{- if .Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3" }} volumeMounts: - name: data mountPath: {{ default "/data/database.sqlite" .Values.config.DRONE_DATABASE_DATASOURCE | dir }} {{- end }} - {{- if and (eq (default "sqlite3" .Values.config.DRONE_DATABASE_DRIVER) "sqlite3") .Values.persistence.existingClaim }} + {{- if and (.Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3") .Values.persistence.existingClaim }} volumes: - name: data persistentVolumeClaim: diff --git a/templates/persistentVolumeClaim.yaml b/templates/persistentVolumeClaim.yaml index 012477e..e729467 100644 --- a/templates/persistentVolumeClaim.yaml +++ b/templates/persistentVolumeClaim.yaml @@ -1,4 +1,4 @@ -{{ if and (eq (default "sqlite3" .Values.config.DRONE_DATABASE_DRIVER) "sqlite3") (not .Values.persistence.existingClaim) }} +{{ if and (.Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3") (not .Values.persistence.existingClaim) }} apiVersion: v1 kind: PersistentVolumeClaim metadata: