From c16998c0b4a0c1d587823da2c124afcbc295315d Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont <nicolas@dandrimont.eu> Date: Tue, 16 Jan 2024 12:14:55 +0100 Subject: [PATCH] indexers: migrate to templated objstorage configuration --- swh/templates/indexers/_helper.tpl | 2 +- swh/templates/indexers/deployment.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/swh/templates/indexers/_helper.tpl b/swh/templates/indexers/_helper.tpl index 04a69e342..85aea7dda 100644 --- a/swh/templates/indexers/_helper.tpl +++ b/swh/templates/indexers/_helper.tpl @@ -18,7 +18,7 @@ data: {{- include "swh.service.fromYaml" (dict "service" "indexer_storage" "configurationRef" .Values.indexers.indexerStorageConfigurationRef "Values" .Values) | nindent 4 }} - {{- include "swh.service.fromYaml" (dict "service" "objstorage" + {{- include "swh.objstorageConfiguration" (dict "serviceName" "objstorage" "configurationRef" .Values.indexers.objstorageConfigurationRef "Values" .Values) | nindent 4 }} {{- include "swh.journalClientConfiguration" (dict "serviceType" "journal" "configurationRef" $journalClientConfigurationRef diff --git a/swh/templates/indexers/deployment.yaml b/swh/templates/indexers/deployment.yaml index a14c0f445..af6d45c2f 100644 --- a/swh/templates/indexers/deployment.yaml +++ b/swh/templates/indexers/deployment.yaml @@ -4,6 +4,7 @@ {{- $indexer_name := ( print "indexer-" $indexer_type ) -}} {{- $configurationChecksum := include "swh.indexer.configmap" (dict "indexer_type" $indexer_type "deployment_config" $deployment_config "Values" $.Values) -}} {{- $journalConfigurationRef := or $deployment_config.journalClientConfigurationRef $.Values.indexers.journalClientConfigurationRef -}} +{{- $objstorageConfigurationRef := or $deployment_config.objstorageConfigurationRef $.Values.indexers.objstorageConfigurationRef -}} --- apiVersion: apps/v1 kind: Deployment @@ -47,6 +48,8 @@ spec: env: {{ include "swh.secrets.environment" (dict "Values" $.Values "configurationRef" $journalConfigurationRef ) | nindent 10 }} + {{ include "swh.secrets.environment" (dict "Values" $.Values + "configurationRef" $objstorageConfigurationRef ) | nindent 10 }} volumeMounts: - name: configuration mountPath: /etc/swh -- GitLab