From 0e6ecc1e80d4eb4b77523ab5f3d1ba7fb2168f4d Mon Sep 17 00:00:00 2001 From: Niclas Schad Date: Mon, 1 Jul 2024 08:39:55 +0200 Subject: [PATCH 1/2] remove default livenessProbe for compactor and storage-gateway Signed-off-by: Niclas Schad --- CHANGELOG.md | 1 + README.md | 8 ++------ templates/compactor/compactor-statefulset.yaml | 2 ++ .../store-gateway/store-gateway-statefulset.yaml | 2 ++ values.yaml | 12 ++---------- 5 files changed, 9 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dbe031e..a433adf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## master / unreleased +* [CHANGE] Removed the default `livenessProbe` for store-gateway and compactor. You can still use a `livenessProbe` but we advise against it #502 * [DEPENDENCY] Update quay.io/cortexproject/cortex Docker tag to v1.17.1 #501 ## 2.3.0 / 2024-04-12 diff --git a/README.md b/README.md index 1a6c775f..aedbd0b1 100644 --- a/README.md +++ b/README.md @@ -179,9 +179,7 @@ Kubernetes: `^1.19.0-0` | compactor.​extraVolumeMounts | list | `[]` | | | compactor.​extraVolumes | list | `[]` | | | compactor.​initContainers | list | `[]` | | -| compactor.​livenessProbe.​httpGet.​path | string | `"/ready"` | | -| compactor.​livenessProbe.​httpGet.​port | string | `"http-metrics"` | | -| compactor.​livenessProbe.​httpGet.​scheme | string | `"HTTP"` | | +| compactor.​livenessProbe | list | `[]` | | | compactor.​nodeSelector | object | `{}` | | | compactor.​persistentVolume.​accessModes | list | `["ReadWriteOnce"]` | compactor data Persistent Volume access modes Must match those of existing PV or dynamic provisioner Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ | | compactor.​persistentVolume.​annotations | object | `{}` | compactor data Persistent Volume Claim annotations | @@ -811,9 +809,7 @@ Kubernetes: `^1.19.0-0` | store_gateway.​extraVolumeMounts | list | `[]` | | | store_gateway.​extraVolumes | list | `[]` | | | store_gateway.​initContainers | list | `[]` | | -| store_gateway.​livenessProbe.​httpGet.​path | string | `"/ready"` | | -| store_gateway.​livenessProbe.​httpGet.​port | string | `"http-metrics"` | | -| store_gateway.​livenessProbe.​httpGet.​scheme | string | `"HTTP"` | | +| store_gateway.​livenessProbe | list | `[]` | | | store_gateway.​nodeSelector | object | `{}` | | | store_gateway.​persistentVolume.​accessModes | list | `["ReadWriteOnce"]` | Store-gateway data Persistent Volume access modes Must match those of existing PV or dynamic provisioner Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ | | store_gateway.​persistentVolume.​annotations | object | `{}` | Store-gateway data Persistent Volume Claim annotations | diff --git a/templates/compactor/compactor-statefulset.yaml b/templates/compactor/compactor-statefulset.yaml index c051e69c..12578172 100644 --- a/templates/compactor/compactor-statefulset.yaml +++ b/templates/compactor/compactor-statefulset.yaml @@ -127,8 +127,10 @@ spec: protocol: TCP startupProbe: {{- toYaml .Values.compactor.startupProbe | nindent 12 }} + {{- if .Values.compactor.livenessProbe }} livenessProbe: {{- toYaml .Values.compactor.livenessProbe | nindent 12 }} + {{- end }} readinessProbe: {{- toYaml .Values.compactor.readinessProbe | nindent 12 }} resources: diff --git a/templates/store-gateway/store-gateway-statefulset.yaml b/templates/store-gateway/store-gateway-statefulset.yaml index ad97f7aa..e29f519b 100644 --- a/templates/store-gateway/store-gateway-statefulset.yaml +++ b/templates/store-gateway/store-gateway-statefulset.yaml @@ -133,8 +133,10 @@ spec: protocol: TCP startupProbe: {{- toYaml .Values.store_gateway.startupProbe | nindent 12 }} + {{- if .Values.store_gateway.livenessProbe }} livenessProbe: {{- toYaml .Values.store_gateway.livenessProbe | nindent 12 }} + {{- end }} readinessProbe: {{- toYaml .Values.store_gateway.readinessProbe | nindent 12 }} resources: diff --git a/values.yaml b/values.yaml index 1d9012c0..e1f70e37 100644 --- a/values.yaml +++ b/values.yaml @@ -1410,11 +1410,7 @@ store_gateway: path: /ready port: http-metrics scheme: HTTP - livenessProbe: - httpGet: - path: /ready - port: http-metrics - scheme: HTTP + livenessProbe: [] readinessProbe: httpGet: path: /ready @@ -1530,11 +1526,7 @@ compactor: path: /ready port: http-metrics scheme: HTTP - livenessProbe: - httpGet: - path: /ready - port: http-metrics - scheme: HTTP + livenessProbe: [] readinessProbe: httpGet: path: /ready From 786f9cbff068f6be80b50f58106aa32b0376cf4e Mon Sep 17 00:00:00 2001 From: Niclas Schad Date: Tue, 2 Jul 2024 10:02:20 +0200 Subject: [PATCH 2/2] pr review: use correct brackets Signed-off-by: Niclas Schad --- README.md | 4 ++-- values.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index aedbd0b1..444804b4 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ Kubernetes: `^1.19.0-0` | compactor.​extraVolumeMounts | list | `[]` | | | compactor.​extraVolumes | list | `[]` | | | compactor.​initContainers | list | `[]` | | -| compactor.​livenessProbe | list | `[]` | | +| compactor.​livenessProbe | object | `{}` | | | compactor.​nodeSelector | object | `{}` | | | compactor.​persistentVolume.​accessModes | list | `["ReadWriteOnce"]` | compactor data Persistent Volume access modes Must match those of existing PV or dynamic provisioner Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ | | compactor.​persistentVolume.​annotations | object | `{}` | compactor data Persistent Volume Claim annotations | @@ -809,7 +809,7 @@ Kubernetes: `^1.19.0-0` | store_gateway.​extraVolumeMounts | list | `[]` | | | store_gateway.​extraVolumes | list | `[]` | | | store_gateway.​initContainers | list | `[]` | | -| store_gateway.​livenessProbe | list | `[]` | | +| store_gateway.​livenessProbe | object | `{}` | | | store_gateway.​nodeSelector | object | `{}` | | | store_gateway.​persistentVolume.​accessModes | list | `["ReadWriteOnce"]` | Store-gateway data Persistent Volume access modes Must match those of existing PV or dynamic provisioner Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ | | store_gateway.​persistentVolume.​annotations | object | `{}` | Store-gateway data Persistent Volume Claim annotations | diff --git a/values.yaml b/values.yaml index e1f70e37..ea87bf5d 100644 --- a/values.yaml +++ b/values.yaml @@ -1410,7 +1410,7 @@ store_gateway: path: /ready port: http-metrics scheme: HTTP - livenessProbe: [] + livenessProbe: {} readinessProbe: httpGet: path: /ready @@ -1526,7 +1526,7 @@ compactor: path: /ready port: http-metrics scheme: HTTP - livenessProbe: [] + livenessProbe: {} readinessProbe: httpGet: path: /ready