From dc38e53fc7a66c8883bc315581a38471a9f96f0b Mon Sep 17 00:00:00 2001
From: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date: Thu, 29 Aug 2024 08:51:09 +0200
Subject: [PATCH] swh/staging: Activate sync mailmaps to masking proxy jobs

Related to swh/infra/sysadm-environment#5391
---
 swh/values/staging/default.yaml       | 12 ++++++++++++
 swh/values/staging/swh-cassandra.yaml | 11 +++++++++++
 2 files changed, 23 insertions(+)

diff --git a/swh/values/staging/default.yaml b/swh/values/staging/default.yaml
index 744b1ec64..0121be03c 100644
--- a/swh/values/staging/default.yaml
+++ b/swh/values/staging/default.yaml
@@ -185,6 +185,18 @@ postgresqlSyncmailmapsConfiguration:
       secretKeyRef: swh-postgresql-syncmailmap-secret
       secretKeyName: postgres-syncmailmap-password
 
+postgresqlSyncMaskinProxyMailmapsConfiguration:
+  cls: postgresql
+  host: db1.internal.staging.swh.network
+  port: '5432'
+  db: swh-masking
+  user: swhmailmap
+  pass: ${PGPASSWORD}
+  secrets:
+    PGPASSWORD:
+      secretKeyRef: swh-postgresql-syncmailmap-secret
+      secretKeyName: postgres-syncmailmap-password
+
 maskingAdminPostgresqlConfiguration:
   cls: postgresql
   host: db1.internal.staging.swh.network
diff --git a/swh/values/staging/swh-cassandra.yaml b/swh/values/staging/swh-cassandra.yaml
index 756870b97..4a31a61ec 100644
--- a/swh/values/staging/swh-cassandra.yaml
+++ b/swh/values/staging/swh-cassandra.yaml
@@ -733,6 +733,17 @@ web:
           priorityClassName: frontend-rpc-workload
           configurationRef: postgresqlSyncmailmapsConfiguration
           pgService: true
+        syncMaskingMailmaps:
+          enabled: true
+          command:
+            - "sync_masking_mailmaps"
+            - "--perform"
+            - "service=syncmaskingmailmaps"
+          cron: "0 */1  * * *"
+          concurrencyPolicy: Forbid
+          configurationRef: postgresqlSyncMaskinProxyMailmapsConfiguration
+          pgService: true
+          priorityClassName: frontend-rpc-workload
       ingress:
         enabled: true
         secretName: swh-web-crt
-- 
GitLab