From f1a3d1782f627940b89498590d9b1b69c8851399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Calzado?= Date: Tue, 10 Dec 2024 12:01:43 +0100 Subject: [PATCH 1/2] Use health endpoint in each API for liveness, readiness and startup probes --- chart/templates/import-api/deployment.yaml | 15 ++++++++++++--- chart/templates/lds-api/deployment.yaml | 15 ++++++++++++--- chart/templates/maps-api/deployment.yaml | 15 ++++++++++++--- chart/templates/workspace-api/deployment.yaml | 13 +++++++++++-- 4 files changed, 47 insertions(+), 11 deletions(-) diff --git a/chart/templates/import-api/deployment.yaml b/chart/templates/import-api/deployment.yaml index eff70ebd..432a89ea 100644 --- a/chart/templates/import-api/deployment.yaml +++ b/chart/templates/import-api/deployment.yaml @@ -162,24 +162,33 @@ spec: {{- if .Values.importApi.livenessProbe.enabled }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.importApi.livenessProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: / + path: /health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.importApi.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.importApi.customLivenessProbe "context" $) | nindent 12 }} {{- end }} {{- if .Values.importApi.readinessProbe.enabled }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.importApi.readinessProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: / + path: /health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.importApi.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.importApi.customReadinessProbe "context" $) | nindent 12 }} {{- end }} {{- if .Values.importApi.startupProbe.enabled }} startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.importApi.startupProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: / + path: /health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.importApi.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.importApi.customStartupProbe "context" $) | nindent 12 }} {{- end }} diff --git a/chart/templates/lds-api/deployment.yaml b/chart/templates/lds-api/deployment.yaml index bcf23825..7b02a4e1 100644 --- a/chart/templates/lds-api/deployment.yaml +++ b/chart/templates/lds-api/deployment.yaml @@ -162,24 +162,33 @@ spec: {{- if .Values.ldsApi.livenessProbe.enabled }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.ldsApi.livenessProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: /v3/lds/ + path: /v3/lds/health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.ldsApi.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.ldsApi.customLivenessProbe "context" $) | nindent 12 }} {{- end }} {{- if .Values.ldsApi.readinessProbe.enabled }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.ldsApi.readinessProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: /v3/lds/ + path: /v3/lds/health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.ldsApi.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.ldsApi.customReadinessProbe "context" $) | nindent 12 }} {{- end }} {{- if .Values.ldsApi.startupProbe.enabled }} startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.ldsApi.startupProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: /v3/lds/ + path: /v3/lds/health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.ldsApi.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.ldsApi.customStartupProbe "context" $) | nindent 12 }} {{- end }} diff --git a/chart/templates/maps-api/deployment.yaml b/chart/templates/maps-api/deployment.yaml index 4b6e5f5c..39b1a641 100644 --- a/chart/templates/maps-api/deployment.yaml +++ b/chart/templates/maps-api/deployment.yaml @@ -161,24 +161,33 @@ spec: {{- if .Values.mapsApi.livenessProbe.enabled }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.mapsApi.livenessProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: / + path: /health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.mapsApi.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.mapsApi.customLivenessProbe "context" $) | nindent 12 }} {{- end }} {{- if .Values.mapsApi.readinessProbe.enabled }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.mapsApi.readinessProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: / + path: /health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.mapsApi.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.mapsApi.customReadinessProbe "context" $) | nindent 12 }} {{- end }} {{- if .Values.mapsApi.startupProbe.enabled }} startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.mapsApi.startupProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: / + path: /health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.mapsApi.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.mapsApi.customStartupProbe "context" $) | nindent 12 }} {{- end }} diff --git a/chart/templates/workspace-api/deployment.yaml b/chart/templates/workspace-api/deployment.yaml index 092d4071..f49c0da1 100644 --- a/chart/templates/workspace-api/deployment.yaml +++ b/chart/templates/workspace-api/deployment.yaml @@ -247,16 +247,22 @@ spec: {{- if .Values.workspaceApi.livenessProbe.enabled }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.workspaceApi.livenessProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: / + path: /health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.workspaceApi.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.workspaceApi.customLivenessProbe "context" $) | nindent 12 }} {{- end }} {{- if .Values.workspaceApi.readinessProbe.enabled }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.workspaceApi.readinessProbe "enabled") "context" $) | nindent 12 }} httpGet: - path: / + path: /health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.workspaceApi.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.workspaceApi.customReadinessProbe "context" $) | nindent 12 }} {{- end }} @@ -265,6 +271,9 @@ spec: httpGet: path: /health port: http + httpHeaders: + - name: Carto-Monitoring + value: "1" {{- else if .Values.workspaceApi.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.workspaceApi.customStartupProbe "context" $) | nindent 12 }} {{- end }} From 68f1daf4db03ae0a15543c6c4d990ec7c933098c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Calzado?= Date: Tue, 10 Dec 2024 15:24:34 +0100 Subject: [PATCH 2/2] Change Carto-Monitoring header value --- chart/templates/import-api/deployment.yaml | 6 +++--- chart/templates/lds-api/deployment.yaml | 6 +++--- chart/templates/maps-api/deployment.yaml | 6 +++--- chart/templates/workspace-api/deployment.yaml | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/chart/templates/import-api/deployment.yaml b/chart/templates/import-api/deployment.yaml index 432a89ea..d4ef0adc 100644 --- a/chart/templates/import-api/deployment.yaml +++ b/chart/templates/import-api/deployment.yaml @@ -166,7 +166,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.importApi.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.importApi.customLivenessProbe "context" $) | nindent 12 }} {{- end }} @@ -177,7 +177,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.importApi.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.importApi.customReadinessProbe "context" $) | nindent 12 }} {{- end }} @@ -188,7 +188,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.importApi.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.importApi.customStartupProbe "context" $) | nindent 12 }} {{- end }} diff --git a/chart/templates/lds-api/deployment.yaml b/chart/templates/lds-api/deployment.yaml index 7b02a4e1..11d469ae 100644 --- a/chart/templates/lds-api/deployment.yaml +++ b/chart/templates/lds-api/deployment.yaml @@ -166,7 +166,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.ldsApi.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.ldsApi.customLivenessProbe "context" $) | nindent 12 }} {{- end }} @@ -177,7 +177,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.ldsApi.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.ldsApi.customReadinessProbe "context" $) | nindent 12 }} {{- end }} @@ -188,7 +188,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.ldsApi.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.ldsApi.customStartupProbe "context" $) | nindent 12 }} {{- end }} diff --git a/chart/templates/maps-api/deployment.yaml b/chart/templates/maps-api/deployment.yaml index 39b1a641..a56b649d 100644 --- a/chart/templates/maps-api/deployment.yaml +++ b/chart/templates/maps-api/deployment.yaml @@ -165,7 +165,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.mapsApi.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.mapsApi.customLivenessProbe "context" $) | nindent 12 }} {{- end }} @@ -176,7 +176,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.mapsApi.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.mapsApi.customReadinessProbe "context" $) | nindent 12 }} {{- end }} @@ -187,7 +187,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.mapsApi.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.mapsApi.customStartupProbe "context" $) | nindent 12 }} {{- end }} diff --git a/chart/templates/workspace-api/deployment.yaml b/chart/templates/workspace-api/deployment.yaml index f49c0da1..c25f680d 100644 --- a/chart/templates/workspace-api/deployment.yaml +++ b/chart/templates/workspace-api/deployment.yaml @@ -251,7 +251,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.workspaceApi.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.workspaceApi.customLivenessProbe "context" $) | nindent 12 }} {{- end }} @@ -262,7 +262,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.workspaceApi.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.workspaceApi.customReadinessProbe "context" $) | nindent 12 }} {{- end }} @@ -273,7 +273,7 @@ spec: port: http httpHeaders: - name: Carto-Monitoring - value: "1" + value: "True" {{- else if .Values.workspaceApi.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.workspaceApi.customStartupProbe "context" $) | nindent 12 }} {{- end }}