From a525a87113e030b83af43f805c02a0527b570556 Mon Sep 17 00:00:00 2001 From: Remy Date: Wed, 26 Jun 2024 10:20:16 +0200 Subject: [PATCH] feat(chart): auto deploy when secrets change (#2911) --- chart/templates/services/admin/deployment.yaml | 4 ++++ chart/templates/services/api/deployment.yaml | 4 ++++ chart/templates/services/rows/deployment.yaml | 4 ++++ chart/templates/services/search/deployment.yaml | 4 ++++ chart/templates/services/sse-api/deployment.yaml | 4 ++++ chart/templates/services/webhook/deployment.yaml | 4 ++++ chart/templates/worker/_deployment.yaml | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/chart/templates/services/admin/deployment.yaml b/chart/templates/services/admin/deployment.yaml index 17a4571b10..850134074c 100644 --- a/chart/templates/services/admin/deployment.yaml +++ b/chart/templates/services/admin/deployment.yaml @@ -7,6 +7,10 @@ metadata: labels: {{ include "labels.admin" . | nindent 4 }} name: "{{ include "name" . }}-admin" namespace: {{ .Release.Namespace }} + {{- if .Values.secrets.infisical.enabled }} + annotations: + secrets.infisical.com/auto-reload: "true" + {{- end }} spec: progressDeadlineSeconds: 600 replicas: {{ .Values.admin.replicas }} diff --git a/chart/templates/services/api/deployment.yaml b/chart/templates/services/api/deployment.yaml index 65a6297521..629e43114e 100644 --- a/chart/templates/services/api/deployment.yaml +++ b/chart/templates/services/api/deployment.yaml @@ -7,6 +7,10 @@ metadata: labels: {{ include "labels.api" . | nindent 4 }} name: "{{ include "name" . }}-api" namespace: {{ .Release.Namespace }} + {{- if .Values.secrets.infisical.enabled }} + annotations: + secrets.infisical.com/auto-reload: "true" + {{- end }} spec: progressDeadlineSeconds: 600 replicas: {{ .Values.api.replicas }} diff --git a/chart/templates/services/rows/deployment.yaml b/chart/templates/services/rows/deployment.yaml index 43680050d7..29254b08f9 100644 --- a/chart/templates/services/rows/deployment.yaml +++ b/chart/templates/services/rows/deployment.yaml @@ -7,6 +7,10 @@ metadata: labels: {{ include "labels.rows" . | nindent 4 }} name: "{{ include "name" . }}-rows" namespace: {{ .Release.Namespace }} + {{- if .Values.secrets.infisical.enabled }} + annotations: + secrets.infisical.com/auto-reload: "true" + {{- end }} spec: progressDeadlineSeconds: 600 replicas: {{ .Values.rows.replicas }} diff --git a/chart/templates/services/search/deployment.yaml b/chart/templates/services/search/deployment.yaml index 5a80a1a620..f1498d7002 100644 --- a/chart/templates/services/search/deployment.yaml +++ b/chart/templates/services/search/deployment.yaml @@ -7,6 +7,10 @@ metadata: labels: {{ include "labels.search" . | nindent 4 }} name: "{{ include "name" . }}-search" namespace: {{ .Release.Namespace }} + {{- if .Values.secrets.infisical.enabled }} + annotations: + secrets.infisical.com/auto-reload: "true" + {{- end }} spec: progressDeadlineSeconds: 600 replicas: {{ .Values.search.replicas }} diff --git a/chart/templates/services/sse-api/deployment.yaml b/chart/templates/services/sse-api/deployment.yaml index bf74981992..01e920728d 100644 --- a/chart/templates/services/sse-api/deployment.yaml +++ b/chart/templates/services/sse-api/deployment.yaml @@ -7,6 +7,10 @@ metadata: labels: {{ include "labels.sseApi" . | nindent 4 }} name: "{{ include "name" . }}-sse-api" namespace: {{ .Release.Namespace }} + {{- if .Values.secrets.infisical.enabled }} + annotations: + secrets.infisical.com/auto-reload: "true" + {{- end }} spec: progressDeadlineSeconds: 600 replicas: {{ .Values.sseApi.replicas }} diff --git a/chart/templates/services/webhook/deployment.yaml b/chart/templates/services/webhook/deployment.yaml index 145c2ee06d..5dc1ab9325 100644 --- a/chart/templates/services/webhook/deployment.yaml +++ b/chart/templates/services/webhook/deployment.yaml @@ -7,6 +7,10 @@ metadata: labels: {{ include "labels.webhook" . | nindent 4 }} name: "{{ include "name" . }}-webhook" namespace: {{ .Release.Namespace }} + {{- if .Values.secrets.infisical.enabled }} + annotations: + secrets.infisical.com/auto-reload: "true" + {{- end }} spec: progressDeadlineSeconds: 600 replicas: {{ .Values.webhook.replicas }} diff --git a/chart/templates/worker/_deployment.yaml b/chart/templates/worker/_deployment.yaml index 882ef52fd7..b63ff333a8 100644 --- a/chart/templates/worker/_deployment.yaml +++ b/chart/templates/worker/_deployment.yaml @@ -9,6 +9,10 @@ metadata: labels: {{ include "labels.worker" (merge (dict "workerValues" .workerValues) $ ) | nindent 4 }} name: "{{ include "name" . }}-worker-{{ .workerValues.deployName }}" namespace: {{ .Release.Namespace }} + {{- if .Values.secrets.infisical.enabled }} + annotations: + secrets.infisical.com/auto-reload: "true" + {{- end }} spec: progressDeadlineSeconds: 600 {{- if not .workerValues.autoscaling.enabled }}