From f381a3ed95f7813cf598b3857d2291782876c055 Mon Sep 17 00:00:00 2001
From: "Antoine R. Dumont (@ardumont)" <ardumont@softwareheritage.org>
Date: Wed, 18 Oct 2023 14:37:12 +0200
Subject: [PATCH] storage: Fix discrepancy naming in configuration key

This will solve the crashloopbackoff happening in the production cluster for the webapp.

Refs. swh/infra/sysadm-environment#5095
---
 swh/templates/_helpers.tpl               | 2 +-
 swh/values/production/swh-cassandra.yaml | 4 ++--
 swh/values/production/swh.yaml           | 3 +--
 swh/values/staging/default.yaml          | 2 +-
 swh/values/staging/swh-cassandra.yaml    | 2 +-
 swh/values/staging/swh.yaml              | 2 --
 6 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/swh/templates/_helpers.tpl b/swh/templates/_helpers.tpl
index 56b8ab870..f5b47d24a 100644
--- a/swh/templates/_helpers.tpl
+++ b/swh/templates/_helpers.tpl
@@ -64,7 +64,7 @@ Generate the configuration for a remote storage
 {{- $indent := indent (ternary 0 2 (empty $inPipeline)) "" -}}
 {{- $storageConfiguration := get .Values .configurationRef -}}
 {{- if $inPipeline -}}- {{ end }}cls: remote
-{{ $indent }}url: {{ get $storageConfiguration "host" }}
+{{ $indent }}url: {{ get $storageConfiguration "url" }}
 {{- end -}}
 
 {{/*
diff --git a/swh/values/production/swh-cassandra.yaml b/swh/values/production/swh-cassandra.yaml
index 27cdc1b8d..b667c0962 100644
--- a/swh/values/production/swh-cassandra.yaml
+++ b/swh/values/production/swh-cassandra.yaml
@@ -42,14 +42,14 @@ cassandraStorageConfiguration:
 # TODO: Use a true read-only storage
 localRpcROStorageService:
   cls: remote
-  host: http://storage:5002
+  url: http://storage:5002
 
 localRpcROStorageConfiguration:
   storageConfigurationRef: localRpcROStorageService
 
 remoteStorageConfiguration:
   cls: remote
-  host: http://storage:5002
+  url: http://storage:5002
 
 storage_replayer:
   enabled: true
diff --git a/swh/values/production/swh.yaml b/swh/values/production/swh.yaml
index 6bbecd48b..273e9189b 100644
--- a/swh/values/production/swh.yaml
+++ b/swh/values/production/swh.yaml
@@ -1,7 +1,6 @@
-
 saamStorageConfiguration:
   cls: remote
-  host: http://saam.internal.softwareheritage.org:5002
+  url: http://saam.internal.softwareheritage.org:5002
 
 remoteStorageConfiguration:
   pipelineStepsRef: storagePipelineSteps
diff --git a/swh/values/staging/default.yaml b/swh/values/staging/default.yaml
index 718558f2b..db2bd392b 100644
--- a/swh/values/staging/default.yaml
+++ b/swh/values/staging/default.yaml
@@ -45,7 +45,7 @@ roStoragePipelineSteps:
 
 storage1StorageConfiguration:
   cls: remote
-  host: http://storage1.internal.staging.swh.network:5002
+  url: http://storage1.internal.staging.swh.network:5002
 
 remoteROStorageConfiguration:
   pipelineStepsRef: roStoragePipelineSteps
diff --git a/swh/values/staging/swh-cassandra.yaml b/swh/values/staging/swh-cassandra.yaml
index bf9f70e96..2f466c2b3 100644
--- a/swh/values/staging/swh-cassandra.yaml
+++ b/swh/values/staging/swh-cassandra.yaml
@@ -6,7 +6,7 @@ remoteStorageConfiguration:
 
 localRpcRWStorageConfiguration:
   cls: remote
-  host: http://storage:5002
+  url: http://storage:5002
 
 rpcRWStorageConfiguration:
   pipelineStepsRef: storagePipelineSteps
diff --git a/swh/values/staging/swh.yaml b/swh/values/staging/swh.yaml
index 654fe4657..77cecca9a 100644
--- a/swh/values/staging/swh.yaml
+++ b/swh/values/staging/swh.yaml
@@ -1,5 +1,3 @@
-
-
 remoteStorageConfiguration:
   cls: remote
   url: http://storage1.internal.staging.swh.network:5002
-- 
GitLab