Skip to content

swh: Open swh-storage autoscaling configuration

Vincent Sellier requested to merge mr/storage-autoscaling into staging

Related to swh/infra/sysadm-environment#4879 (closed)

./helm-diff.sh                                                                                                                                      16:05:19
Comparing changes between branches production and mr/storage-autoscaling...
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 'mr/storage-autoscaling'
Generate config in mr/storage-autoscaling branch for values/default.yaml...
Generate config in mr/storage-autoscaling branch for values/production-cassandra.yaml...
Generate config in mr/storage-autoscaling branch for values/production.yaml...
Generate config in mr/storage-autoscaling branch for values/staging-cassandra.yaml...
Generate config in mr/storage-autoscaling branch for values/staging.yaml...


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

No differences


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

No differences


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

No differences


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

--- /tmp/swh-chart.qZxplydE/staging-cassandra.yaml.before       2023-07-10 16:05:29.628052507 +0200
+++ /tmp/swh-chart.qZxplydE/staging-cassandra.yaml.after        2023-07-10 16:05:30.136054201 +0200
@@ -8766,21 +8766,20 @@
 # Source: swh/templates/storage/deployment.yaml
 apiVersion: apps/v1
 kind: Deployment
 metadata:
   namespace: swh-cassandra
   name: storage
   labels:
     app: storage
 spec:
   revisionHistoryLimit: 2
-  replicas: 10
   selector:
     matchLabels:
       app: storage
   strategy:
     type: RollingUpdate
     rollingUpdate:
       maxSurge: 1
   template:
     metadata:
       labels:
@@ -8829,21 +8828,21 @@
           - /entrypoints/init-keyspace.py
           volumeMounts:
           - name: configuration
             mountPath: /etc/swh
           - name: storage-utils
             mountPath: /entrypoints
       containers:
         - name: storage
           resources:
             requests:
-              memory: 500Mi
+              memory: 1500Mi
               cpu: 500m
           image: container-registry.softwareheritage.org/swh/infra/swh-apps/storage:20230704.1
           imagePullPolicy: Always
           ports:
             - containerPort: 5002
               name: rpc
           readinessProbe:
             httpGet:
               path: /
               port: rpc
@@ -9065,20 +9064,43 @@
       #  emptyDir: {}
       #- name: configuration-template
       #  configMap:
       #    name: web-configuration-template
       #    items:
       #    - key: "config.yml.template"
       #      path: "config.yml.template"
       - name: static
         emptyDir: {}
 ---
+# Source: swh/templates/storage/autoscaling.yaml
+apiVersion: autoscaling/v2
+kind: HorizontalPodAutoscaler
+metadata:
+  namespace: swh-cassandra
+  name: storage
+  labels:
+    app: storage
+spec:
+  scaleTargetRef:
+    apiVersion: apps/v1
+    kind: Deployment
+    name: storage
+  minReplicas: 2
+  maxReplicas: 10
+  metrics:
+  - type: Resource
+    resource:
+      name: cpu
+      target:
+        type: Utilization
+        averageUtilization: 150
+---
 # Source: swh/templates/storage/ingress.yaml
 apiVersion: networking.k8s.io/v1
 kind: Ingress
 metadata:
   namespace: swh-cassandra
   name: storage-ingress
 spec:
   rules:
   - http:
       paths:


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

No differences

Merge request reports