From 4ea580ef1fb1ca35671acb5594f6cde914156b5c Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <ardumont@softwareheritage.org> Date: Tue, 28 Nov 2023 15:36:53 +0100 Subject: [PATCH] staging: Deploy objstorage Refs. swh/infra/sysadm-environment#5164 --- swh/values/staging/default.yaml | 9 +++++++ swh/values/staging/swh-cassandra.yaml | 38 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/swh/values/staging/default.yaml b/swh/values/staging/default.yaml index eb1ccb85a..8b9f607a9 100644 --- a/swh/values/staging/default.yaml +++ b/swh/values/staging/default.yaml @@ -23,6 +23,12 @@ stagingNetworkRanges: noopObjectStorage: cls: noop +readWriteObjstorageConfiguration: + cls: pathslicing + root: "/srv/softwareheritage/objects" + slicing: 0:1/1:5 + client_max_size: 1073741824 + storagePipelineSteps: - &bufferStorage cls: buffer @@ -294,6 +300,9 @@ externalServices: storage-postgresql: internalName: storage-postgresql-rpc-ingress target: archive-staging-rke2-ingress-nginx-controller.ingress-nginx.svc.cluster.local + # objstorage-read-write: + # internalName: objstorage-read-write-rpc-ingress + # target: archive-staging-rke2-ingress-nginx-controller.ingress-nginx.svc.cluster.local vault: hosts: diff --git a/swh/values/staging/swh-cassandra.yaml b/swh/values/staging/swh-cassandra.yaml index 19b0d7033..65a9d7c47 100644 --- a/swh/values/staging/swh-cassandra.yaml +++ b/swh/values/staging/swh-cassandra.yaml @@ -830,3 +830,41 @@ deposit: extraction_dir: "/tmp/swh-deposit/archive/" cache_uri: memcached:11211 +objstorage: + enabled: true + port: 5003 + priorityClassName: frontend-rpc + deployments: + # Each key will be an objstorage instance to be deployed + # The mandatory objstorageConfigurationRef key should target a dict + # with the specific objstorage configuration + read-write: + enabled: true + logLevel: INFO + requestedCpu: 50m + requestedMemory: 100Mi + gunicorn: + threads: 5 + workers: 2 + timeout: 60 + autoScaling: + minReplicaCount: 2 + maxReplicaCount: 10 + cpuPercentageUsage: 100 + # mandatory + # check readWriteStorageConfiguration example to configure your storage + objstorageConfigurationRef: readWriteObjstorageConfiguration + # Deploy an ingress to access the objstorage + hosts: + - objstorage.staging.swh.network + ingress: + enabled: true + # mandatory if ingress is enabled + # the hostname on which the objstorage must be reachable + # Optional: the ingress classname to use + className: nginx + whitelistSourceRangeRef: stagingNetworkRanges + endpoints: + default: + paths: + - path: / -- GitLab