From 2ff70556281ed2287d58b3ae68e4a1818603b369 Mon Sep 17 00:00:00 2001 From: Pavel Yudin Date: Tue, 13 Feb 2024 19:50:28 +0300 Subject: [PATCH] Add first implemetation of volumes --- .../templates/deployment.yaml | 19 +++++++++++++++++++ helm-charts/tarantool-cartridge/values.yaml | 7 +++++++ 2 files changed, 26 insertions(+) diff --git a/helm-charts/tarantool-cartridge/templates/deployment.yaml b/helm-charts/tarantool-cartridge/templates/deployment.yaml index 06965f45..86ee089c 100644 --- a/helm-charts/tarantool-cartridge/templates/deployment.yaml +++ b/helm-charts/tarantool-cartridge/templates/deployment.yaml @@ -92,6 +92,14 @@ spec: volumeMounts: - name: {{ $.Release.Name }} mountPath: "{{ $.Values.TarantoolWorkDir }}" + # - name: share + # mountPath: /opt/share + {{- if .Volumes }} + {{- range $name, $volume := .Volumes }} + - name: "{{ $name }}" + mountPath: "{{ $volume.mountpoint }}" + {{- end }} + {{- end }} resources: requests: cpu: "{{ .CPUallocation }}" @@ -145,6 +153,17 @@ spec: port: http initialDelaySeconds: 15 periodSeconds: 10 + # volumes: + # - name: share + # hostPath: + # path: /mnt/share + # type: Directory + {{- if .Volumes }} + volumes: + {{- range $name, $volume := .Volumes }} + - name: "{{ $name }}"{{ $volume.type | toYaml | nindent 10 }} + {{- end }} + {{- end }} --- apiVersion: v1 kind: Service diff --git a/helm-charts/tarantool-cartridge/values.yaml b/helm-charts/tarantool-cartridge/values.yaml index 5b90e24e..70f0a27a 100644 --- a/helm-charts/tarantool-cartridge/values.yaml +++ b/helm-charts/tarantool-cartridge/values.yaml @@ -41,6 +41,13 @@ RoleConfig: DiskSize: 1Gi CPUallocation: 0.25 MemtxMemoryMB: 256 + Volumes: + testVolume: + mountpoint: /foo + type: + hostPath: + path: /mnt + type: Directory RolesToAssign: - app.roles.storage