From ad23b2877b34f430741c27dcb75c99efa42619c9 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <ardumont@softwareheritage.org> Date: Tue, 28 Nov 2023 16:40:30 +0100 Subject: [PATCH] staging: Add extra volume configuration for the pathslicing objstorage Refs. swh/infra/sysadm-environment#5164 --- swh/templates/objstorage/_helper_deployment.yaml | 9 +++++++++ swh/values/staging/swh-cassandra.yaml | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/swh/templates/objstorage/_helper_deployment.yaml b/swh/templates/objstorage/_helper_deployment.yaml index c164b4974..873f48243 100644 --- a/swh/templates/objstorage/_helper_deployment.yaml +++ b/swh/templates/objstorage/_helper_deployment.yaml @@ -128,6 +128,10 @@ spec: volumeMounts: - name: configuration mountPath: /etc/swh + {{ range $volume_name, $volume_config := .configuration.volumes }} + - name: {{ $volume_name }} + mountPath: {{ $volume_config.mountPath }} + {{ end }} volumes: - name: configuration emptyDir: {} @@ -137,4 +141,9 @@ spec: items: - key: "config.yml.template" path: "config.yml.template" + {{ range $volume_name, $volume_config := .configuration.volumes }} + - name: {{ $volume_name }} + persistentVolumeClaim: + claimName: {{ $volume_config.persistentVolumeClaim }} + {{ end }} {{- end -}} diff --git a/swh/values/staging/swh-cassandra.yaml b/swh/values/staging/swh-cassandra.yaml index 65a9d7c47..b219eb2c3 100644 --- a/swh/values/staging/swh-cassandra.yaml +++ b/swh/values/staging/swh-cassandra.yaml @@ -851,6 +851,12 @@ objstorage: minReplicaCount: 2 maxReplicaCount: 10 cpuPercentageUsage: 100 + volumes: + staging-pathslicing-pv: + # See k8s-cluster-config for such pvc declaration + persistentVolumeClaim: staging-pathslicing-pv-claim + mountPath: /srv/softwareheritage/objects + # mandatory # check readWriteStorageConfiguration example to configure your storage objstorageConfigurationRef: readWriteObjstorageConfiguration -- GitLab