From 476e74b4c4f967884be120fb75b87f232962103d Mon Sep 17 00:00:00 2001 From: Alex Nordlund Date: Tue, 8 Nov 2022 17:21:06 +0100 Subject: Assign unique set of labels to k8s deployments #19703 (#19706) --- chart/templates/cronjob-media-remove.yaml | 2 +- chart/templates/deployment-sidekiq.yaml | 8 +++++--- chart/templates/deployment-streaming.yaml | 2 ++ chart/templates/deployment-web.yaml | 6 ++++-- chart/templates/job-assets-precompile.yaml | 2 +- chart/templates/job-chewy-upgrade.yaml | 2 +- chart/templates/job-create-admin.yaml | 2 +- chart/templates/job-db-migrate.yaml | 2 +- chart/templates/service-streaming.yaml | 1 + chart/templates/service-web.yaml | 1 + 10 files changed, 18 insertions(+), 10 deletions(-) (limited to 'chart') diff --git a/chart/templates/cronjob-media-remove.yaml b/chart/templates/cronjob-media-remove.yaml index 160aee204..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 diff --git a/chart/templates/deployment-sidekiq.yaml b/chart/templates/deployment-sidekiq.yaml index b2e5af522..dd707a4d0 100644 --- a/chart/templates/deployment-sidekiq.yaml +++ b/chart/templates/deployment-sidekiq.yaml @@ -11,7 +11,8 @@ spec: selector: matchLabels: {{- include "mastodon.selectorLabels" . | nindent 6 }} - component: rails + app.kubernetes.io/component: sidekiq + app.kubernetes.io/part-of: rails template: metadata: annotations: @@ -22,7 +23,8 @@ spec: rollme: {{ randAlphaNum 5 | quote }} 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 diff --git a/chart/templates/deployment-streaming.yaml b/chart/templates/deployment-streaming.yaml index 12203a530..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: diff --git a/chart/templates/deployment-web.yaml b/chart/templates/deployment-web.yaml index c50f32d98..fb58b1ade 100644 --- a/chart/templates/deployment-web.yaml +++ b/chart/templates/deployment-web.yaml @@ -11,7 +11,8 @@ spec: selector: matchLabels: {{- include "mastodon.selectorLabels" . | nindent 6 }} - component: rails + app.kubernetes.io/component: web + app.kubernetes.io/part-of: rails template: metadata: annotations: @@ -22,7 +23,8 @@ spec: rollme: {{ randAlphaNum 5 | quote }} labels: {{- include "mastodon.selectorLabels" . | nindent 8 }} - component: rails + app.kubernetes.io/component: web + app.kubernetes.io/part-of: rails spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/chart/templates/job-assets-precompile.yaml b/chart/templates/job-assets-precompile.yaml index faa51a20d..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 diff --git a/chart/templates/job-chewy-upgrade.yaml b/chart/templates/job-chewy-upgrade.yaml index ae6fb38e1..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 diff --git a/chart/templates/job-create-admin.yaml b/chart/templates/job-create-admin.yaml index 659c00671..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 diff --git a/chart/templates/job-db-migrate.yaml b/chart/templates/job-db-migrate.yaml index 8e4f70dfb..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 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 -- cgit