about summary refs log tree commit diff
path: root/chart/templates
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-10 09:36:47 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-11-10 09:36:47 +0100
commitc118918520c3c5b1d60451e9692c45f7bd7e32e4 (patch)
treed192e63c8f2599c44189fbb3bc33b481e22fe28b /chart/templates
parentb2a25d446a9f4368ad9d1240b9da30bc33942da5 (diff)
parent8fdbb4d00d371e7a900bec3a262216d95a784d52 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/models/custom_emoji.rb`:
  Not a real conflict, just upstream changing a line too close to
  a glitch-soc-specific validation.
  Applied upstream changes.
- `app/models/public_feed.rb`:
  Not a real conflict, just upstream changing a line too close to
  a glitch-soc-specific parameter documentation.
  Applied upstream changes.
Diffstat (limited to 'chart/templates')
-rw-r--r--chart/templates/cronjob-media-remove.yaml4
-rw-r--r--chart/templates/deployment-sidekiq.yaml14
-rw-r--r--chart/templates/deployment-streaming.yaml4
-rw-r--r--chart/templates/deployment-web.yaml12
-rw-r--r--chart/templates/ingress.yaml6
-rw-r--r--chart/templates/job-assets-precompile.yaml4
-rw-r--r--chart/templates/job-chewy-upgrade.yaml4
-rw-r--r--chart/templates/job-create-admin.yaml4
-rw-r--r--chart/templates/job-db-migrate.yaml4
-rw-r--r--chart/templates/secrets.yaml2
-rw-r--r--chart/templates/service-streaming.yaml1
-rw-r--r--chart/templates/service-web.yaml1
12 files changed, 34 insertions, 26 deletions
diff --git a/chart/templates/cronjob-media-remove.yaml b/chart/templates/cronjob-media-remove.yaml
index 1dced69ec..d3566e32d 100644
--- a/chart/templates/cronjob-media-remove.yaml
+++ b/chart/templates/cronjob-media-remove.yaml
@@ -27,7 +27,7 @@ spec:
               requiredDuringSchedulingIgnoredDuringExecution:
               - labelSelector:
                   matchExpressions:
-                    - key: component
+                    - key: app.kubernetes.io/part-of
                       operator: In
                       values:
                         - rails
@@ -59,7 +59,7 @@ spec:
                   valueFrom:
                     secretKeyRef:
                       name: {{ template "mastodon.postgresql.secretName" . }}
-                      key: postgres-password
+                      key: password
                 - name: "REDIS_PASSWORD"
                   valueFrom:
                     secretKeyRef:
diff --git a/chart/templates/deployment-sidekiq.yaml b/chart/templates/deployment-sidekiq.yaml
index 4b108d79d..dd707a4d0 100644
--- a/chart/templates/deployment-sidekiq.yaml
+++ b/chart/templates/deployment-sidekiq.yaml
@@ -11,18 +11,20 @@ spec:
   selector:
     matchLabels:
       {{- include "mastodon.selectorLabels" . | nindent 6 }}
-      component: rails
+      app.kubernetes.io/component: sidekiq
+      app.kubernetes.io/part-of: rails
   template:
     metadata:
-    {{- with .Values.podAnnotations }}
       annotations:
+      {{- with .Values.podAnnotations }}
         {{- toYaml . | nindent 8 }}
+      {{- end }}
         # roll the pods to pick up any db migrations
         rollme: {{ randAlphaNum 5 | quote }}
-    {{- end }}
       labels:
         {{- include "mastodon.selectorLabels" . | nindent 8 }}
-        component: rails
+        app.kubernetes.io/component: sidekiq
+        app.kubernetes.io/part-of: rails
     spec:
       {{- with .Values.imagePullSecrets }}
       imagePullSecrets:
@@ -40,7 +42,7 @@ spec:
           requiredDuringSchedulingIgnoredDuringExecution:
           - labelSelector:
               matchExpressions:
-                - key: component
+                - key: app.kubernetes.io/part-of
                   operator: In
                   values:
                     - rails
@@ -76,7 +78,7 @@ spec:
               valueFrom:
                 secretKeyRef:
                   name: {{ template "mastodon.postgresql.secretName" . }}
-                  key: postgres-password
+                  key: password
             - name: "REDIS_PASSWORD"
               valueFrom:
                 secretKeyRef:
diff --git a/chart/templates/deployment-streaming.yaml b/chart/templates/deployment-streaming.yaml
index 564f53f43..7f03c9e23 100644
--- a/chart/templates/deployment-streaming.yaml
+++ b/chart/templates/deployment-streaming.yaml
@@ -11,6 +11,7 @@ spec:
   selector:
     matchLabels:
       {{- include "mastodon.selectorLabels" . | nindent 6 }}
+      app.kubernetes.io/component: streaming
   template:
     metadata:
     {{- with .Values.podAnnotations }}
@@ -19,6 +20,7 @@ spec:
     {{- end }}
       labels:
         {{- include "mastodon.selectorLabels" . | nindent 8 }}
+        app.kubernetes.io/component: streaming
     spec:
       {{- with .Values.imagePullSecrets }}
       imagePullSecrets:
@@ -44,7 +46,7 @@ spec:
               valueFrom:
                 secretKeyRef:
                   name: {{ template "mastodon.postgresql.secretName" . }}
-                  key: postgres-password
+                  key: password
             - name: "REDIS_PASSWORD"
               valueFrom:
                 secretKeyRef:
diff --git a/chart/templates/deployment-web.yaml b/chart/templates/deployment-web.yaml
index 0878aa9b8..fb58b1ade 100644
--- a/chart/templates/deployment-web.yaml
+++ b/chart/templates/deployment-web.yaml
@@ -11,18 +11,20 @@ spec:
   selector:
     matchLabels:
       {{- include "mastodon.selectorLabels" . | nindent 6 }}
-      component: rails
+      app.kubernetes.io/component: web
+      app.kubernetes.io/part-of: rails
   template:
     metadata:
-    {{- with .Values.podAnnotations }}
       annotations:
+      {{- with .Values.podAnnotations }}
         {{- toYaml . | nindent 8 }}
+      {{- end }}
         # roll the pods to pick up any db migrations
         rollme: {{ randAlphaNum 5 | quote }}
-    {{- end }}
       labels:
         {{- include "mastodon.selectorLabels" . | nindent 8 }}
-        component: rails
+        app.kubernetes.io/component: web
+        app.kubernetes.io/part-of: rails
     spec:
       {{- with .Values.imagePullSecrets }}
       imagePullSecrets:
@@ -62,7 +64,7 @@ spec:
               valueFrom:
                 secretKeyRef:
                   name: {{ template "mastodon.postgresql.secretName" . }}
-                  key: postgres-password
+                  key: password
             - name: "REDIS_PASSWORD"
               valueFrom:
                 secretKeyRef:
diff --git a/chart/templates/ingress.yaml b/chart/templates/ingress.yaml
index 7295297fb..811d98a22 100644
--- a/chart/templates/ingress.yaml
+++ b/chart/templates/ingress.yaml
@@ -47,9 +47,9 @@ spec:
               servicePort: {{ $webPort }}
               {{- end }}
             {{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
-            pathType: ImplementationSpecific
+            pathType: Prefix
             {{- end }}
-          - path: {{ .path }}api/v1/streaming
+          - path: {{ .path }}api/v1/streaming/
             backend:
               {{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
               service:
@@ -61,7 +61,7 @@ spec:
               servicePort: {{ $streamingPort }}
               {{- end }}
             {{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
-            pathType: ImplementationSpecific
+            pathType: Exact
             {{- end }}
           {{- end }}
     {{- end }}
diff --git a/chart/templates/job-assets-precompile.yaml b/chart/templates/job-assets-precompile.yaml
index 37009822e..9bdec2ab7 100644
--- a/chart/templates/job-assets-precompile.yaml
+++ b/chart/templates/job-assets-precompile.yaml
@@ -27,7 +27,7 @@ spec:
           requiredDuringSchedulingIgnoredDuringExecution:
           - labelSelector:
               matchExpressions:
-                - key: component
+                - key: app.kubernetes.io/part-of
                   operator: In
                   values:
                     - rails
@@ -60,7 +60,7 @@ spec:
               valueFrom:
                 secretKeyRef:
                   name: {{ template "mastodon.postgresql.secretName" . }}
-                  key: postgres-password
+                  key: password
             - name: "REDIS_PASSWORD"
               valueFrom:
                 secretKeyRef:
diff --git a/chart/templates/job-chewy-upgrade.yaml b/chart/templates/job-chewy-upgrade.yaml
index a4bac63ab..556133dd3 100644
--- a/chart/templates/job-chewy-upgrade.yaml
+++ b/chart/templates/job-chewy-upgrade.yaml
@@ -28,7 +28,7 @@ spec:
           requiredDuringSchedulingIgnoredDuringExecution:
           - labelSelector:
               matchExpressions:
-                - key: component
+                - key: app.kubernetes.io/part-of
                   operator: In
                   values:
                     - rails
@@ -61,7 +61,7 @@ spec:
               valueFrom:
                 secretKeyRef:
                   name: {{ template "mastodon.postgresql.secretName" . }}
-                  key: postgres-password
+                  key: password
             - name: "REDIS_PASSWORD"
               valueFrom:
                 secretKeyRef:
diff --git a/chart/templates/job-create-admin.yaml b/chart/templates/job-create-admin.yaml
index c1c0bdaed..94d39dcbb 100644
--- a/chart/templates/job-create-admin.yaml
+++ b/chart/templates/job-create-admin.yaml
@@ -28,7 +28,7 @@ spec:
           requiredDuringSchedulingIgnoredDuringExecution:
           - labelSelector:
               matchExpressions:
-                - key: component
+                - key: app.kubernetes.io/part-of
                   operator: In
                   values:
                     - rails
@@ -66,7 +66,7 @@ spec:
               valueFrom:
                 secretKeyRef:
                   name: {{ template "mastodon.postgresql.secretName" . }}
-                  key: postgres-password
+                  key: password
             - name: "REDIS_PASSWORD"
               valueFrom:
                 secretKeyRef:
diff --git a/chart/templates/job-db-migrate.yaml b/chart/templates/job-db-migrate.yaml
index 848ed3644..e1544d2b6 100644
--- a/chart/templates/job-db-migrate.yaml
+++ b/chart/templates/job-db-migrate.yaml
@@ -27,7 +27,7 @@ spec:
           requiredDuringSchedulingIgnoredDuringExecution:
           - labelSelector:
               matchExpressions:
-                - key: component
+                - key: app.kubernetes.io/part-of
                   operator: In
                   values:
                     - rails
@@ -60,7 +60,7 @@ spec:
               valueFrom:
                 secretKeyRef:
                   name: {{ template "mastodon.postgresql.secretName" . }}
-                  key: postgres-password
+                  key: password
             - name: "REDIS_PASSWORD"
               valueFrom:
                 secretKeyRef:
diff --git a/chart/templates/secrets.yaml b/chart/templates/secrets.yaml
index 2a91c3493..d7ac936ce 100644
--- a/chart/templates/secrets.yaml
+++ b/chart/templates/secrets.yaml
@@ -37,7 +37,7 @@ data:
   {{- end }}
   {{- if not .Values.postgresql.enabled }}
   {{- if not .Values.postgresql.auth.existingSecret }}
-  postgres-password: "{{ .Values.postgresql.auth.password | b64enc }}"
+  password: "{{ .Values.postgresql.auth.password | b64enc }}"
   {{- end }}
   {{- end }}
 {{- end -}}
diff --git a/chart/templates/service-streaming.yaml b/chart/templates/service-streaming.yaml
index a005e617c..bade7b1e5 100644
--- a/chart/templates/service-streaming.yaml
+++ b/chart/templates/service-streaming.yaml
@@ -13,3 +13,4 @@ spec:
       name: streaming
   selector:
     {{- include "mastodon.selectorLabels" . | nindent 4 }}
+    app.kubernetes.io/component: streaming
diff --git a/chart/templates/service-web.yaml b/chart/templates/service-web.yaml
index 3563fde70..acf1233dc 100644
--- a/chart/templates/service-web.yaml
+++ b/chart/templates/service-web.yaml
@@ -13,3 +13,4 @@ spec:
       name: http
   selector:
     {{- include "mastodon.selectorLabels" . | nindent 4 }}
+    app.kubernetes.io/component: web