Staging instance, all changes can be removed at any time

Skip to content

Simplify the deposit chart's configmap

Antoine R. Dumont requested to merge simplify-deposit-chart into production

It's been integrated in the next deposit version. [1]

make swh-helm-diff
[swh] Comparing changes between branches production and simplify-deposit-chart (per environment)...
Switched to branch 'production'
Your branch is up to date with 'origin/production'.
[swh] Generate config in production branch for environment staging, namespace swh...
[swh] Generate config in production branch for environment staging, namespace swh-cassandra...
[swh] Generate config in production branch for environment staging, namespace swh-cassandra-next-version...
Switched to branch 'simplify-deposit-chart'
[swh] Generate config in simplify-deposit-chart branch for environment staging...
[swh] Generate config in simplify-deposit-chart branch for environment staging...
[swh] Generate config in simplify-deposit-chart branch for environment staging...
Switched to branch 'production'
Your branch is up to date with 'origin/production'.
[swh] Generate config in production branch for environment production, namespace swh...
[swh] Generate config in production branch for environment production, namespace swh-cassandra...
[swh] Generate config in production branch for environment production, namespace swh-cassandra-next-version...
Switched to branch 'simplify-deposit-chart'
[swh] Generate config in simplify-deposit-chart branch for environment production...
[swh] Generate config in simplify-deposit-chart branch for environment production...
[swh] Generate config in simplify-deposit-chart branch for environment production...


------------- diff for environment staging namespace swh -------------

No differences


------------- diff for environment staging namespace swh-cassandra -------------

--- /tmp/swh-chart.swh.3ucz1d12/staging-swh-cassandra.before    2023-11-17 17:31:39.500478638 +0100
+++ /tmp/swh-chart.swh.3ucz1d12/staging-swh-cassandra.after     2023-11-17 17:31:40.432477903 +0100
@@ -374,38 +374,23 @@
       db:

           host: db1.internal.staging.swh.network
           port: 5432
           name: swh-deposit
           user: swh-deposit
           password: ${POSTGRESQL_PASSWORD}
     cache_uri: memcached:11211
     extraction_dir: /tmp/swh-deposit/archive/
     max_upload_size: 209715200
-
-  deposit_settings.yaml.template: |
-    BACKEND: "storages.backends.azure_storage.AzureStorage"
-    OPTIONS:
+    azure:
       azure_container: ""deposit-contents""
       connection_string: ""DefaultEndpointsProtocol=https;AccountName=swhdepositstoragestaging;AccountKey=${ACCOUNT_KEY};EndpointSuffix=core.windows.net""
-
-  deposit_settings.py: |
-    from swh.deposit.settings.production import *  # noqa
-
-    from pathlib import Path
-    from yaml import safe_load
-    backend = safe_load(Path('/etc/swh/deposit_settings.yaml').read_bytes())
-
-    STORAGES = {
-      "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"},
-      "default": backend,
-    }
 ---
 # Source: swh/templates/graphql/configmap.yaml
 apiVersion: v1
 kind: ConfigMap
 metadata:
   name: graphql
   namespace: swh-cassandra
 data:
   # TODO: rename to not have a dot in the name to allow testing
   config.yml: |
@@ -14846,70 +14831,34 @@
       app: deposit
   strategy:
     type: RollingUpdate
     rollingUpdate:
       maxSurge: 1
   template:
     metadata:
       labels:
         app: deposit
       annotations:
-        checksum/config: e2d19be26dc29a3116d5a094eaf89120f89ba46216945b3038a32abd173cf02f
+        checksum/config: e930e8090fd11385c4565db17b1d01a7172b64a2013e7afce6c46766200880cc
     spec:
       affinity:
         nodeAffinity:
           requiredDuringSchedulingIgnoredDuringExecution:
             nodeSelectorTerms:
             - matchExpressions:
               - key: swh/deposit
                 operator: In
                 values:
                 - "true"
       priorityClassName: swh-cassandra-frontend-rpc

       initContainers:
-        - name: prepare-settings-with-secret
-          image: debian:bullseye
-          imagePullPolicy: IfNotPresent
-          command:
-            - /bin/bash
-          args:
-            - -c
-            - eval echo "\"$(</etc/swh/configuration-template/deposit_settings.yaml.template)\"" > /etc/swh/deposit_settings.yaml
-          env:
-
-
-            - name: ACCOUNT_KEY
-              valueFrom:
-                secretKeyRef:
-                  name: swh-deposit-azure-secret
-                  key: azure-swh-deposit-key
-                  # 'name' secret must exist & include that ^ key
-                  optional: false
-          volumeMounts:
-            - name: configuration
-              mountPath: /etc/swh
-            - name: configuration-template
-              mountPath: /etc/swh/configuration-template
-        - name: prepare-settings
-          image: debian:bullseye
-          imagePullPolicy: IfNotPresent
-          command:
-            - /bin/bash
-          args:
-            - -c
-            - cp /etc/swh/configuration-template/deposit_settings.py /etc/swh/deposit_settings.py
-          volumeMounts:
-            - name: configuration
-              mountPath: /etc/swh
-            - name: configuration-template
-              mountPath: /etc/swh/configuration-template
         - name: prepare-configuration
           image: debian:bullseye
           imagePullPolicy: IfNotPresent
           command:
             - /bin/bash
           args:
             - -c
             - eval echo "\"$(</etc/swh/configuration-template/config.yml.template)\"" > /etc/swh/config.yml
           env:

@@ -14922,20 +14871,30 @@
                   optional: false

             - name: DJANGO_SECRET_KEY
               valueFrom:
                 secretKeyRef:
                   name: swh-deposit-django-secret
                   key: deposit-django-secret-key
                   # 'name' secret must exist & include that ^ key
                   optional: false

+
+
+            - name: ACCOUNT_KEY
+              valueFrom:
+                secretKeyRef:
+                  name: swh-deposit-azure-secret
+                  key: azure-swh-deposit-key
+                  # 'name' secret must exist & include that ^ key
+                  optional: false
+
             - name: SWH_SENTRY_DSN
               valueFrom:
                 secretKeyRef:
                   name: common-secrets
                   key: deposit-sentry-dsn
                   optional: false

           volumeMounts:
             - name: configuration
               mountPath: /etc/swh
@@ -14991,22 +14950,20 @@
             - /opt/swh/entrypoint.sh
           env:
             - name: STATSD_HOST
               value: prometheus-statsd-exporter
             - name: STATSD_PORT
               value: "9125"
             - name: LOG_LEVEL
               value: "INFO"
             - name: SWH_CONFIG_FILENAME
               value: /etc/swh/config.yml
-            - name: DJANGO_SETTINGS_MODULE
-              value: deposit_settings
             - name: PYTHONPATH
               value: /etc/swh
             - name: SWH_SENTRY_ENVIRONMENT
               value: staging
             - name: SWH_MAIN_PACKAGE
               value: swh.deposit
             - name: SWH_SENTRY_DSN
               valueFrom:
                 secretKeyRef:
                   name: common-secrets


------------- diff for environment staging namespace swh-cassandra-next-version -------------

No differences


------------- diff for environment production namespace swh -------------

No differences


------------- diff for environment production namespace swh-cassandra -------------

No differences

Refs. swh/infra/sysadm-environment#5129 (closed)

[1] swh/devel/swh-deposit!419 (merged)

Edited by Antoine R. Dumont

Merge request reports

Loading