Skip to content
Snippets Groups Projects
Commit 0124e19f authored by Alex Hill's avatar Alex Hill
Browse files

LOW-359: implement deviceserver[].volume.existingClaimName

When `existingClaimName` is specified, no PVC is created when the chart is
deployed. The device server pod mounts the named PVC at `volume.mountPath`, and
all other keys under `volume` are ignored. The PVC is assumed to already exist
or to be created elsewhere in the chart.
parent 3e93a30d
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ Parameters are: ...@@ -16,7 +16,7 @@ Parameters are:
{{ define "ska-tango-util.deviceserver-pvc.tpl" }} {{ define "ska-tango-util.deviceserver-pvc.tpl" }}
--- ---
{{- if .volume }} {{- if and .volume (not .volume.existingClaimName) }}
{{ $volume_name := .volume.name }} {{ $volume_name := .volume.name }}
{{ $volume_path := .volume.mountPath }} {{ $volume_path := .volume.mountPath }}
......
...@@ -132,7 +132,7 @@ spec: ...@@ -132,7 +132,7 @@ spec:
{{ if hasKey $deviceserver "volume" }} {{ if hasKey $deviceserver "volume" }}
- name: volume-data - name: volume-data
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ $deviceserver.volume.name | toString }}-pvc-{{ $chart.Release.Name }} claimName: {{ $deviceserver.volume.existingClaimName | default (printf "%s-pvc-%s" $deviceserver.volume.name $chart.Release.Name) }}
{{ end }} {{ end }}
serviceAccountName: {{ $deviceserver_name | toString }}-sa-{{ $chart.Release.Name }} serviceAccountName: {{ $deviceserver_name | toString }}-sa-{{ $chart.Release.Name }}
initContainers: initContainers:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment