_persistance.tpl 1.0 KB

123456789101112131415161718192021222324252627
  1. {{- define "cloudflared.persistence" -}}
  2. persistence:
  3. {{- range $idx, $storage := .Values.cloudflaredStorage.additionalStorages }}
  4. {{ printf "cloudflared-%v:" (int $idx) }}
  5. enabled: true
  6. {{- include "cloudflared.storage.ci.migration" (dict "storage" $storage) }}
  7. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  8. targetSelector:
  9. cloudflared:
  10. cloudflared:
  11. mountPath: {{ $storage.mountPath }}
  12. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  13. 01-permissions:
  14. mountPath: /mnt/directories{{ $storage.mountPath }}
  15. {{- end }}
  16. {{- end }}
  17. {{- end -}}
  18. {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
  19. {{- define "cloudflared.storage.ci.migration" -}}
  20. {{- $storage := .storage -}}
  21. {{- if $storage.hostPath -}}
  22. {{- $_ := set $storage "hostPathConfig" dict -}}
  23. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  24. {{- end -}}
  25. {{- end -}}