Replace hasPrefix per printf

This commit is contained in:
disaster 2017-04-19 07:57:58 +00:00
parent 4996ee24bb
commit c09e26e902

View File

@ -5,8 +5,8 @@ services:
tty: true tty: true
image: webcenter/alpine-gocd-server:17.3.0-1 image: webcenter/alpine-gocd-server:17.3.0-1
volumes: volumes:
{{- if call strings.HasPrefix .Values.VOLUME_DRIVER_SERVER "/" }} {{- if eq (printf "%.1s" .Values.VOLUME_DRIVER_SERVER) "/" }}
- /data/gocd-test:/data - ${VOLUME_DRIVER_SERVER}:/data
{{- else}} {{- else}}
- gocd-server-data:/data - gocd-server-data:/data
{{- end}} {{- end}}