From 4d45dc31a9e0eac013b1248e03e3d3a96fe070cd Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 19 May 2020 21:25:56 +0200 Subject: [PATCH] helm: limit deployments to their respective components --- helm/templates/static-deployment.yaml | 2 ++ helm/templates/web-deployment.yaml | 2 ++ helm/templates/worker-deployment.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/helm/templates/static-deployment.yaml b/helm/templates/static-deployment.yaml index 710bd082f..8e9b1e331 100644 --- a/helm/templates/static-deployment.yaml +++ b/helm/templates/static-deployment.yaml @@ -7,11 +7,13 @@ metadata: helm.sh/chart: {{ include "passbook.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} + k8s.passbook.io/component: static spec: selector: matchLabels: app.kubernetes.io/name: {{ include "passbook.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} + k8s.passbook.io/component: static template: metadata: labels: diff --git a/helm/templates/web-deployment.yaml b/helm/templates/web-deployment.yaml index b898fd426..9031b3713 100644 --- a/helm/templates/web-deployment.yaml +++ b/helm/templates/web-deployment.yaml @@ -7,12 +7,14 @@ metadata: helm.sh/chart: {{ include "passbook.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} + k8s.passbook.io/component: web spec: replicas: 2 selector: matchLabels: app.kubernetes.io/name: {{ include "passbook.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} + k8s.passbook.io/component: web template: metadata: labels: diff --git a/helm/templates/worker-deployment.yaml b/helm/templates/worker-deployment.yaml index 82dcdf275..f4bb5abc1 100644 --- a/helm/templates/worker-deployment.yaml +++ b/helm/templates/worker-deployment.yaml @@ -7,12 +7,14 @@ metadata: helm.sh/chart: {{ include "passbook.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} + k8s.passbook.io/component: worker spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: {{ include "passbook.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} + k8s.passbook.io/component: worker template: metadata: labels: