From fc0c14373830a6434a8315a49a1b31da30b4c3f1 Mon Sep 17 00:00:00 2001 From: EmilHorne <104511486+EmilHorne@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:47:43 -0400 Subject: [PATCH 1/2] Update values.yaml with readiness probe that checks payload For this change to work requires that the relay image includes curl, which is not currently the case for existing deployments. https://github.com/launchdarkly/ld-relay/pull/259 seeks to change this moving forward. I am not sure how to define different probes depending on the image version to ensure that we only use the curl-based probe with newer images. --- values.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/values.yaml b/values.yaml index aa1e601..e130d7d 100644 --- a/values.yaml +++ b/values.yaml @@ -188,10 +188,15 @@ relay: path: /status port: api readinessProbe: - httpGet: - path: /status - port: api - + httpGet: null + failureThreshold: 1 + exec: + command: + - sh + - -c + - >- + curl -s -X GET "http://127.0.0.1:8030/status" | + grep -q healthy # Enables mounting a k8s volume onto the relay container. # From 0c48429588dedb8edb67cbc1ec1b9fa29e71cee5 Mon Sep 17 00:00:00 2001 From: EmilHorne <104511486+EmilHorne@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:51:04 -0400 Subject: [PATCH 2/2] Update README.md to reflect modified readiness probe --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4d4110..06c39a6 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Here's a summary of the available configuration options: | relay.secrets | array | `[]` | Defines container environment variables or volumes populated from k8s secrets | | relay.volume | object | `{}` | Enables offline mode or references an existing config file from a defined volume | | relay.livenessProbe | object | `{httpGet: { port: "api", path: "/status" }}` | Defines the liveness probe for the relay container | -| relay.readinessProbe | object | `{httpGet: { port: "api", path: "/status" }}` | Defines the readiness probe for the relay container | +| relay.readinessProbe | object | `{httpGet: null, failureThreshold: 1, exec: ... curl,grep }` | Defines the readiness probe for the relay container | | replicaCount | integer | `1` | Number of replicas of the relay pod | | image.repository | string | `launchdarkly/ld-relay` | ld-relay image repository | | image.pullPolicy | string | `IfNotPresent` | ld-relay image pull policy |