From d975d6a8241409b33a08758d1ad8aed5d6817f92 Mon Sep 17 00:00:00 2001 From: Michael Hotan Date: Mon, 24 Jun 2024 10:52:31 -0700 Subject: [PATCH] flyteconsole readiness & liveness probe (#337) Make flyteconsole readiness & liveness probe configurable --- charts/flyte-core/README.md | 2 ++ charts/flyte-core/templates/console/deployment.yaml | 8 ++++++++ charts/flyte-core/values.yaml | 3 +++ docker/sandbox-bundled/manifests/complete-agent.yaml | 4 ++-- docker/sandbox-bundled/manifests/complete.yaml | 4 ++-- docker/sandbox-bundled/manifests/dev.yaml | 4 ++-- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/charts/flyte-core/README.md b/charts/flyte-core/README.md index b429ec0b0a3..d57bb7fdef1 100644 --- a/charts/flyte-core/README.md +++ b/charts/flyte-core/README.md @@ -232,11 +232,13 @@ helm install gateway bitnami/contour -n flyte | flyteconsole.image.repository | string | `"cr.flyte.org/flyteorg/flyteconsole"` | Docker image for Flyteconsole deployment | | flyteconsole.image.tag | string | `"v1.12.2"` | | | flyteconsole.imagePullSecrets | list | `[]` | ImagePullSecrets to assign to the Flyteconsole deployment | +| flyteconsole.livenessProbe | object | `{}` | | | flyteconsole.nodeSelector | object | `{}` | nodeSelector for Flyteconsole deployment | | flyteconsole.podAnnotations | object | `{}` | Annotations for Flyteconsole pods | | flyteconsole.podEnv | object | `{}` | Additional Flyteconsole container environment variables | | flyteconsole.podLabels | object | `{}` | Labels for Flyteconsole pods | | flyteconsole.priorityClassName | string | `""` | Sets priorityClassName for flyte console pod(s). | +| flyteconsole.readinessProbe | object | `{}` | | | flyteconsole.replicaCount | int | `1` | Replicas count for Flyteconsole deployment | | flyteconsole.resources | object | `{"limits":{"cpu":"500m","memory":"250Mi"},"requests":{"cpu":"10m","memory":"50Mi"}}` | Default resources requests and limits for Flyteconsole deployment | | flyteconsole.securityContext | object | `{"fsGroupChangePolicy":"OnRootMismatch","runAsNonRoot":true,"runAsUser":1000,"seLinuxOptions":{"type":"spc_t"}}` | Sets securityContext for flyteconsole pod(s). | diff --git a/charts/flyte-core/templates/console/deployment.yaml b/charts/flyte-core/templates/console/deployment.yaml index 7d089b3b5ea..834b3cf84c5 100644 --- a/charts/flyte-core/templates/console/deployment.yaml +++ b/charts/flyte-core/templates/console/deployment.yaml @@ -64,6 +64,14 @@ spec: volumeMounts: - mountPath: /srv/flyte name: shared-data + {{- with .Values.flyteconsole.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 10 }} + {{- end }} + {{- with .Values.flyteconsole.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 10 }} + {{- end }} volumes: - emptyDir: {} name: shared-data diff --git a/charts/flyte-core/values.yaml b/charts/flyte-core/values.yaml index 6facb72edf4..047f0ece9bf 100755 --- a/charts/flyte-core/values.yaml +++ b/charts/flyte-core/values.yaml @@ -507,6 +507,9 @@ flyteconsole: # prometheus to auto-detect the service monitor and start scrapping the metrics labels: {} + livenessProbe: {} + readinessProbe: {} + # It will enable the redoc route in ingress deployRedoc: false diff --git a/docker/sandbox-bundled/manifests/complete-agent.yaml b/docker/sandbox-bundled/manifests/complete-agent.yaml index aaa7834aca6..f498f4029f0 100644 --- a/docker/sandbox-bundled/manifests/complete-agent.yaml +++ b/docker/sandbox-bundled/manifests/complete-agent.yaml @@ -818,7 +818,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: U1FuMWl3Uk94bjQ5Y09maw== + haSharedSecret: aUlwRTZPQmF4ajJaeFpZNQ== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1414,7 +1414,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 7326ccfff54143a9e3477857987d0421d5899e73631ac94d8bbc74d9cd967741 + checksum/secret: 8c1c8d72ada2b59e44648c99190b2f44ef9d029b33960d594d63a26d7ed88b59 labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/sandbox-bundled/manifests/complete.yaml index c025ff950f8..9e56c7a3b31 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/sandbox-bundled/manifests/complete.yaml @@ -798,7 +798,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: b2hQNExPWDNVYWFEUHFsbQ== + haSharedSecret: RWp4T3JqT21jMHN0OVI3Rw== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1362,7 +1362,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: fda733c2919be871149059d46c328a58258cde6bcc4509e04b2ada41c5b464c3 + checksum/secret: 68496ca3c958aab64339583d8333cdd47d2c42a4794eaa852ca48aa02658ecbf labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/sandbox-bundled/manifests/dev.yaml index 5a196859ecc..e2330de7b38 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/sandbox-bundled/manifests/dev.yaml @@ -499,7 +499,7 @@ metadata: --- apiVersion: v1 data: - haSharedSecret: Y1NrZnhvWDQ3TTF1b0lGTw== + haSharedSecret: Qkd3VTBSRGxmV09aM210Ng== proxyPassword: "" proxyUsername: "" kind: Secret @@ -934,7 +934,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 03c2cbc9a43c2893090f33043bcafcc198b77426c7192e9884970a926d15847f + checksum/secret: 3dd8013f4cb4bb5c5ae374b3ebf996bce1f49680d93afa991496ee68c9ada3e5 labels: app: docker-registry release: flyte-sandbox