Skip to content

graphql: Adapt graphql configmap with the new option

Antoine R. Dumont requested to merge adapt-graphql-configmap into production

It's conditional only as we'll have 2 different versions. One which supports it in staging and the other which won't support it yet.

With the helm template command [1], expectedly, the staging configuration holds the new option [2] while the production one don't [3].

Another commit in this MR bumps the image to use for staging (and do nothing for production as it's already pinned).

$ cd .../swh-charts/swh
$ /var/tmp/diff-chart.sh adapt-graphql-configmap
Switched to branch 'production'
Your branch is up to date with 'origin/production'.
generate config in production branch for values/default.yaml
generate config in production branch for values/production-cassandra.yaml
generate config in production branch for values/production.yaml
generate config in production branch for values/staging-cassandra.yaml
generate config in production branch for values/staging.yaml
Switched to branch 'adapt-graphql-configmap'
generate config in adapt-graphql-configmap branch for values/default.yaml
generate config in adapt-graphql-configmap branch for values/production-cassandra.yaml
generate config in adapt-graphql-configmap branch for values/production.yaml
generate config in adapt-graphql-configmap branch for values/staging-cassandra.yaml
generate config in adapt-graphql-configmap branch for values/staging.yaml


------------- diff for values/default.yaml -------------

No diff


------------- diff for values/production-cassandra.yaml -------------

No diff


------------- diff for values/production.yaml -------------

No diff


------------- diff for values/staging-cassandra.yaml -------------

No diff


------------- diff for values/staging.yaml -------------

--- /tmp/staging.yaml.before    2023-06-07 10:29:10.393703086 +0200
+++ /tmp/staging.yaml.after     2023-06-07 10:29:10.713703147 +0200
@@ -344,40 +344,42 @@
   name: graphql
   namespace: swh
 data:
   # TODO: rename to not have a dot in the name to allow testing
   config.yml: |
     storage:
       cls: pipeline
       steps:
       - cls: retry
       - cls: remote
         url: http://storage1.internal.staging.swh.network:5002

     search:
       cls: remote
       url: http://search0.internal.staging.swh.network:5010


     debug: true

     introspection: true
+    max_raw_content_size: 10000
+

     max_query_cost:
       anonymous: 50
       user: 500

     auth:
       server: https://auth.softwareheritage.org/auth/
       realm: SoftwareHeritageStaging
       client: swh-web
       cache:
         url: memcached://memcached:11211
 ---
 # Source: swh/templates/indexers/configmap-utils.yaml
 apiVersion: v1
 kind: ConfigMap
 metadata:
   name: indexer-utils
   namespace: swh
 data:
   pre-stop-idempotent.sh: |
@@ -5030,45 +5032,45 @@
   name: graphql
   namespace: swh
   labels:
     app: graphql
 spec:
   revisionHistoryLimit: 2
   replicas: 2
   selector:
     matchLabels:
       app: graphql
   strategy:
     type: RollingUpdate
     rollingUpdate:
       maxSurge: 1
   template:
     metadata:
       labels:
         app: graphql
       annotations:
         # Force a rollout upgrade if the configuration changes
-        checksum/config: c06fda47beb6ca83d2041723a88ec4603b6694b8618516a2b9641f6f14bf63fa
+        checksum/config: 000e33d90cc45c84354caaab3663722927239b1a521352ce8ef16d4daf852414
     spec:
       containers:
         - name: graphql
-          image: container-registry.softwareheritage.org/swh/infra/swh-apps/graphql:20230531.1
+          image: container-registry.softwareheritage.org/swh/infra/swh-apps/graphql:20230607.1
           imagePullPolicy: Always
           ports:
             - containerPort: 5013
               name: rpc
           startupProbe:
             httpGet:
               path: /
               port: rpc
             failureThreshold: 30
             periodSeconds: 5
           livenessProbe:
             httpGet:
               path: /
               port: rpc
             initialDelaySeconds: 10
             periodSeconds: 5
           env:
           - name: STATSD_HOST
             value: prometheus-statsd-exporter
           - name: STATSD_PORT

[1] /var/tmp/diff-chart.sh from $1576

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

Edited by Antoine R. Dumont

Merge request reports