diff --git a/swh/templates/indexer-storage/_helper_configmap.yaml b/swh/templates/indexer-storage/_helper_configmap.yaml index 8f6b68f72440d94e0018173301ef395aed9e79f8..d698c04c421ece97d272171b28a024f03829540e 100644 --- a/swh/templates/indexer-storage/_helper_configmap.yaml +++ b/swh/templates/indexer-storage/_helper_configmap.yaml @@ -14,7 +14,9 @@ data: "configurationRef" .configuration.indexerStorageConfigurationRef "Values" .Values) | nindent 4 -}} + {{- if .configuration.journalWriterConfigurationRef }} {{- include "swh.journal.configuration" (dict "serviceType" "journal_writer" "configurationRef" .configuration.journalWriterConfigurationRef "Values" .Values) | nindent 4 -}} + {{ end }} {{- end -}} diff --git a/swh/values/minikube.yaml b/swh/values/minikube.yaml index b74eda04a5cfaa3b7cc49b9708a006c9df9438d5..60c02f915eec804959ee390b969ac45c46352a47 100644 --- a/swh/values/minikube.yaml +++ b/swh/values/minikube.yaml @@ -753,12 +753,31 @@ indexerStorage: indexerStorageConfigurationRef: fakePostgresqlIndexerStorageConfiguration journalWriterConfigurationRef: indexerJournalWriterConfiguration hosts: - - indexer-storage.i.s.s.n + - indexer-storage-read-write.i.s.s.n ingress: enabled: true + endpoints: + default: + paths: + - path: / + gunicorn: + threads: 1 + workers: 2 + read-only: + checkDbVersion: false + replicas: 1 + indexerStorageConfigurationRef: fakePostgresqlIndexerStorageConfiguration + hosts: + - indexer-storage-read-only.i.s.s.n + ingress: + enabled: true + endpoints: + default: + paths: + - path: / gunicorn: - threads: 2 - workers: 4 + threads: 1 + workers: 2 defaultElasticsearchHosts: - host: search-esnode0.i.s.s.n diff --git a/swh/values/production/default.yaml b/swh/values/production/default.yaml index 08d14019803ad480272a4bc3feb8eeec6e834ea8..3581c29ac6b33edc7e2e26a31e0879b1bafba247 100644 --- a/swh/values/production/default.yaml +++ b/swh/values/production/default.yaml @@ -384,3 +384,6 @@ externalServices: search: internalName: search-rpc-ingress target: archive-production-rke2-ingress-nginx-controller.ingress-nginx.svc.cluster.local + indexer-storage-read-only: + internalName: indexer-storage-read-only + target: archive-production-rke2-ingress-nginx-controller.ingress-nginx.svc.cluster.local diff --git a/swh/values/production/swh.yaml b/swh/values/production/swh.yaml index 09a05a03ef1537107ab7d978a14b88c462d768f3..4221884ac4f95d0269989064dff588173edaedbc 100644 --- a/swh/values/production/swh.yaml +++ b/swh/values/production/swh.yaml @@ -30,6 +30,18 @@ postgresqlROStorageConfiguration: secretKeyRef: swh-storage-postgresql-common-secret secretKeyName: postgres-guest-password +postgresqlReadOnlyIndexerStorageConfiguration: + cls: postgresql + host: db.internal.softwareheritage.org + db: softwareheritage-indexer + port: 5432 + user: guest + pass: ${POSTGRESQL_PASSWORD} + secrets: + POSTGRESQL_PASSWORD: + secretKeyRef: swh-indexer-storage-postgresql-secret + secretKeyName: postgres-guest-password + readOnlyStorageConfiguration: pipelineStepsRef: readOnlyStoragePipelineSteps storageConfigurationRef: postgresqlROStorageConfiguration @@ -687,9 +699,10 @@ toolbox: indexerDbConfigurationRef: postgresqlIndexerStorageConfiguration indexerStorage: - enabled: false + enabled: true + logLevel: INFO deployments: - read-write: + read-only: checkDbVersion: true autoScaling: minReplicaCount: 2 @@ -697,10 +710,9 @@ indexerStorage: cpuPercentageUsage: 90 requestedCpu: 500m requestedMemory: 512Mi - indexerStorageConfigurationRef: postgresqlIndexerStorageConfiguration - journalWriterConfigurationRef: journalWriterConfiguration + indexerStorageConfigurationRef: postgresqlReadOnlyIndexerStorageConfiguration hosts: - - saam.internal.softwareheritage.org + - indexer-storage-read-only ingress: enabled: true gunicorn: