Skip to content

stories/svix: Prevent deployment on storage1 node

Guillaume Samson requested to merge prevent_storage1_deploy into production

Currently the svix-server and one of the software-stories pods are deployed on the storage1 node.

ᐅ kbs get po -o wide --field-selector spec.nodeName=storage1 -A | awk '$1 ~ /^(svix|software)/'
software-stories             software-stories-555884f798-zzsgp                                 1/1     Running     0               3d12h   10.42.199.203    storage1   <none>           <none>
svix-server                  svix-server-76dc87864b-2z8f6                                      1/1     Running     0               107m    10.42.199.232    storage1   <none>           <none>

These modifications will had affinity to the svix-server and software-stories deployments.
The matching labels will be svix-server=true and software-stories=true.

Helm diff cluster-components
./helm-diff.sh cluster-components
[cluster-components] Comparing changes between branches production and prevent_storage1_deploy...
Your branch is up to date with 'origin/production'.
[cluster-components] Generate config in production branch for cluster-components/values/admin-rke2.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/archive-production-rke2.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/archive-staging-rke2.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/gitlab-production.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/gitlab-staging.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/minikube.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/rancher.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/test-staging-rke2.yaml...
Your branch is up to date with 'origin/prevent_storage1_deploy'.
[cluster-components] Generate config in prevent_storage1_deploy branch for cluster-components/values/admin-rke2.yaml...
[cluster-components] Generate config in prevent_storage1_deploy branch for cluster-components/values/archive-production-rke2.yaml...
[cluster-components] Generate config in prevent_storage1_deploy branch for cluster-components/values/archive-staging-rke2.yaml...
[cluster-components] Generate config in prevent_storage1_deploy branch for cluster-components/values/gitlab-production.yaml...
[cluster-components] Generate config in prevent_storage1_deploy branch for cluster-components/values/gitlab-staging.yaml...
[cluster-components] Generate config in prevent_storage1_deploy branch for cluster-components/values/minikube.yaml...
[cluster-components] Generate config in prevent_storage1_deploy branch for cluster-components/values/rancher.yaml...
[cluster-components] Generate config in prevent_storage1_deploy branch for cluster-components/values/test-staging-rke2.yaml...


------------- diff for cluster-components/values/admin-rke2.yaml -------------

No differences


------------- diff for cluster-components/values/archive-production-rke2.yaml -------------

No differences


------------- diff for cluster-components/values/archive-staging-rke2.yaml -------------

--- /tmp/swh-chart.cluster-components.dOFkMcQG/archive-staging-rke2.yaml.before	2023-12-12 14:12:16.324996401 +0100
+++ /tmp/swh-chart.cluster-components.dOFkMcQG/archive-staging-rke2.yaml.after	2023-12-12 14:12:17.461012203 +0100
@@ -90,20 +90,29 @@
       app: svix-server
   strategy:
     type: RollingUpdate
     rollingUpdate:
       maxSurge: 1
   template:
     metadata:
       labels:
         app: svix-server
     spec:
+      affinity:
+        nodeAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            nodeSelectorTerms:
+            - matchExpressions:
+              - key: svix-server
+                operator: In
+                values:
+                - "true"
       containers:
         - name: svix-server
           resources:
             requests:
               memory: 100Mi
               cpu: 100m
           image: svix/svix-server:v1.15
           imagePullPolicy: IfNotPresent
           ports:
             - containerPort: 8071


------------- diff for cluster-components/values/gitlab-production.yaml -------------

No differences


------------- diff for cluster-components/values/gitlab-staging.yaml -------------

No differences


------------- diff for cluster-components/values/minikube.yaml -------------

No differences


------------- diff for cluster-components/values/rancher.yaml -------------

No differences


------------- diff for cluster-components/values/test-staging-rke2.yaml -------------

No differences
Helm diff software-stories
./helm-diff.sh software-stories
[software-stories] Comparing changes between branches production and prevent_storage1_deploy...
Your branch is up to date with 'origin/production'.
[software-stories] Generate config in production branch for software-stories/values/minikube.yaml...
[software-stories] Generate config in production branch for software-stories/values/production.yaml...
[software-stories] Generate config in production branch for software-stories/values/staging.yaml...
Your branch is up to date with 'origin/prevent_storage1_deploy'.
[software-stories] Generate config in prevent_storage1_deploy branch for software-stories/values/minikube.yaml...
[software-stories] Generate config in prevent_storage1_deploy branch for software-stories/values/production.yaml...
[software-stories] Generate config in prevent_storage1_deploy branch for software-stories/values/staging.yaml...


------------- diff for software-stories/values/minikube.yaml -------------

--- /tmp/swh-chart.software-stories.vjbp3670/minikube.yaml.before	2023-12-12 14:13:27.377991879 +0100
+++ /tmp/swh-chart.software-stories.vjbp3670/minikube.yaml.after	2023-12-12 14:13:27.481993348 +0100
@@ -40,21 +40,29 @@
   strategy:
     type: RollingUpdate
     rollingUpdate:
       maxSurge: 1
   template:
     metadata:
       labels:
         app: software-stories
     spec:
       priorityClassName: software-stories-frontend
-      
+      affinity:
+        nodeAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            nodeSelectorTerms:
+            - matchExpressions:
+              - key: software-stories
+                operator: In
+                values:
+                - "true"
       containers:
         - name: software-stories
           image: container-registry.softwareheritage.org/swh/infra/swh-apps/software_stories:20230912.1
           ports:
             - containerPort: 3000
           livenessProbe:
             httpGet:
               path: /
               port: 3000
             initialDelaySeconds: 10


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

--- /tmp/swh-chart.software-stories.vjbp3670/production.yaml.before	2023-12-12 14:13:27.409992331 +0100
+++ /tmp/swh-chart.software-stories.vjbp3670/production.yaml.after	2023-12-12 14:13:27.517993854 +0100
@@ -40,21 +40,29 @@
   strategy:
     type: RollingUpdate
     rollingUpdate:
       maxSurge: 1
   template:
     metadata:
       labels:
         app: software-stories
     spec:
       priorityClassName: software-stories-frontend
-      
+      affinity:
+        nodeAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            nodeSelectorTerms:
+            - matchExpressions:
+              - key: software-stories
+                operator: In
+                values:
+                - "true"
       containers:
         - name: software-stories
           image: container-registry.softwareheritage.org/swh/infra/swh-apps/software_stories:20230912.1
           ports:
             - containerPort: 3000
           livenessProbe:
             httpGet:
               path: /
               port: 3000
             initialDelaySeconds: 10


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

--- /tmp/swh-chart.software-stories.vjbp3670/staging.yaml.before	2023-12-12 14:13:27.445992839 +0100
+++ /tmp/swh-chart.software-stories.vjbp3670/staging.yaml.after	2023-12-12 14:13:27.545994249 +0100
@@ -40,21 +40,29 @@
   strategy:
     type: RollingUpdate
     rollingUpdate:
       maxSurge: 1
   template:
     metadata:
       labels:
         app: software-stories
     spec:
       priorityClassName: software-stories-frontend
-      
+      affinity:
+        nodeAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            nodeSelectorTerms:
+            - matchExpressions:
+              - key: software-stories
+                operator: In
+                values:
+                - "true"
       containers:
         - name: software-stories
           image: container-registry.softwareheritage.org/swh/infra/swh-apps/software_stories:20230912.1
           ports:
             - containerPort: 3000
           livenessProbe:
             httpGet:
               path: /
               port: 3000
             initialDelaySeconds: 10

Merge request reports