From 5bc7d083a4e9e941c4b13a6b3eb79851502983e1 Mon Sep 17 00:00:00 2001
From: "Antoine R. Dumont (@ardumont)" <ardumont@softwareheritage.org>
Date: Fri, 9 Feb 2024 14:36:46 +0100
Subject: [PATCH] production: Deploy one instance of content mimetype indexers

Refs. swh/infra/sysadm-environment#5238
---
 swh/values/production/swh.yaml | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/swh/values/production/swh.yaml b/swh/values/production/swh.yaml
index f3a691974..79d4225f3 100644
--- a/swh/values/production/swh.yaml
+++ b/swh/values/production/swh.yaml
@@ -141,6 +141,22 @@ authenticatedJournalClientConfiguration:
       secretKeyRef: swh-archive-broker-secret
       secretKeyName: BROKER_USER_PASSWORD
 
+authenticatedIndexerProd01JournalClientConfiguration:
+  cls: kafka
+  brokersConfigurationRef: internalSecuredKafkaBrokers
+  sasl.mechanism: SCRAM-SHA-512
+  security.protocol: SASL_SSL
+  sasl.username: ${BROKER_USER}
+  sasl.password: ${BROKER_USER_PASSWORD}
+  prefix: swh.journal.objects
+  secrets:
+    BROKER_USER:
+      secretKeyRef: swh-indexer-prod-01-broker-secret
+      secretKeyName: BROKER_USER
+    BROKER_USER_PASSWORD:
+      secretKeyRef: swh-indexer-prod-01-broker-secret
+      secretKeyName: BROKER_USER_PASSWORD
+
 primaryPostgresqlROStorageConfiguration:
   cls: postgresql
   host: postgresql-storage-rw.internal.softwareheritage.org
@@ -1001,6 +1017,22 @@ indexers:
           configuration: {}
       autoScaling:
         maxReplicaCount: 12
+    content-mimetype:
+      autoScaling:
+        maxReplicaCount: 1
+      journalClientConfigurationRef: authenticatedIndexerProd01JournalClientConfiguration
+      indexer_type: content_mimetype
+      journalClientOverrides:
+        group_id: swh-indexer-prod-01-swh.indexer.journal_client.content_mimetypexs
+        batch_size: 200
+      extraConfig:
+        tools:
+          name: file
+          version: 2:0.4.15-2
+          configuration:
+            type: library
+            debian-package: python3-magic
+        write_batch_size: 1000
 
 search:
   enabled: true
-- 
GitLab