From 4cdb85d11fb05db647c8e9564163cfeba0292725 Mon Sep 17 00:00:00 2001
From: "Antoine R. Dumont (@ardumont)" <ardumont@softwareheritage.org>
Date: Wed, 19 Mar 2025 16:22:49 +0100
Subject: [PATCH] provenance/values: Design yaml configuration

So this will drive the development adaptations of the template.

Refs. swh/infra/sysadm-environment#5608
---
 swh/values.yaml               | 20 ++++++++++++++++++--
 swh/values/local-cluster.yaml | 28 +++++++++++++++++++++++++++-
 2 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/swh/values.yaml b/swh/values.yaml
index 8eb540062..8eabe7d96 100644
--- a/swh/values.yaml
+++ b/swh/values.yaml
@@ -1922,8 +1922,24 @@ provenance:
     #   enabled: false
     #   # The server type to deploy, either a rpc or a grpc
     #   type: grpc
-    #   # For type grpc, the parquet files to use
-    #   parquetFiles: /srv/volumes/datasets/parquet-$version
+    #   # For type grpc, datasets need to be available for the service to use
+    #   dataset:
+    #     # Name of the dataset, graph and provenance must be in sync so same
+    #     # version must be used
+    #     name: 2024-08-23-popular-500-python
+    #     # Graph setup
+    #     graph:
+    #       # Where to store the files
+    #       path: /srv/dataset/graph
+    #     provenance:
+    #       # Whether or not to fetch provenance dataset
+    #       fetch: true
+    #       # Whether or not to build the provenance dataset indices
+    #       index: true
+    #       # Where to store the parquet files
+    #       path: /srv/dataset/provenance
+    #   # Whether to start/stop the service
+    #   startService: true
     #   hosts: []
     #   ingress:
     #     enabled: true
diff --git a/swh/values/local-cluster.yaml b/swh/values/local-cluster.yaml
index 1f7d9459c..beb623867 100644
--- a/swh/values/local-cluster.yaml
+++ b/swh/values/local-cluster.yaml
@@ -1464,7 +1464,22 @@ provenance:
     test-grpc:
       enabled: true
       type: grpc
-      graphConfigurationRef: fakeGraphConfiguration
+      dataset:
+        name: 2024-08-23-popular-500-python
+        provenance:
+          fetch: true
+          index: true
+          path: /srv/dataset/provenance
+        graph:
+          path: /srv/dataset/graph
+      startService: true
+      extraVolumes:
+        dataset-persistent:
+          mountPath: /srv/dataset
+          volumeDefinition:
+            persistentVolumeClaim:
+              claimName: provenance-popular-persistent-pvc
+
       replicas: 1
       # gunicorn:
       #   workers: 4
@@ -1523,6 +1538,17 @@ externalServices:
 volumes:
   enabled: true
   persistentVolumeClaims:
+    provenance-popular-persistent-pvc:
+      enabled: true
+      appName: provenance-test-grpc
+      spec:
+        storageClassName: standard
+        volumeMode: Filesystem
+        accessModes:
+          - ReadWriteOnce
+        resources:
+          requests:
+            storage: 1Gi
     alter-recovery-bundles-pvc:
       enabled: true
       appName: alter
-- 
GitLab