From cef816a7403dbebfd7cef41c1a0855c4b899a501 Mon Sep 17 00:00:00 2001 From: Aikawa Date: Mon, 24 Feb 2025 18:31:51 +0900 Subject: [PATCH] feat(argo-workflows): Support livenessProbe to server (#3175) * feat(argo-workflows): Support readinessProbe to server Signed-off-by: yu-croco * fix: readiness/liveness Signed-off-by: yu-croco --------- Signed-off-by: yu-croco Co-authored-by: JM (Jason Meridth) --- charts/argo-workflows/Chart.yaml | 6 +++--- charts/argo-workflows/README.md | 8 +++++++ .../enable-server-liveness-probe-values.yaml | 6 ++++++ .../templates/server/server-deployment.yaml | 16 ++++++++++++++ charts/argo-workflows/values.yaml | 21 +++++++++++++++++++ 5 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 charts/argo-workflows/ci/enable-server-liveness-probe-values.yaml diff --git a/charts/argo-workflows/Chart.yaml b/charts/argo-workflows/Chart.yaml index c1f8df1a..47f8f4af 100644 --- a/charts/argo-workflows/Chart.yaml +++ b/charts/argo-workflows/Chart.yaml @@ -3,7 +3,7 @@ appVersion: v3.6.4 name: argo-workflows description: A Helm chart for Argo Workflows type: application -version: 0.45.7 +version: 0.45.8 icon: https://argo-workflows.readthedocs.io/en/stable/assets/logo.png home: https://github.com/argoproj/argo-helm sources: @@ -16,5 +16,5 @@ annotations: fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252 url: https://argoproj.github.io/argo-helm/pgp_keys.asc artifacthub.io/changes: | - - kind: fixed - description: Update the SSO configuration instructions to reflect the correct field name + - kind: added + description: Support livenessProbe to server diff --git a/charts/argo-workflows/README.md b/charts/argo-workflows/README.md index 6e400596..79f13779 100644 --- a/charts/argo-workflows/README.md +++ b/charts/argo-workflows/README.md @@ -310,6 +310,14 @@ Fields to note: | server.ingress.paths | list | `["/"]` | List of ingress paths | | server.ingress.tls | list | `[]` | Ingress TLS configuration | | server.lifecycle | object | `{}` | Specify postStart and preStop lifecycle hooks for server container | +| server.livenessProbe.enabled | bool | `false` | Enable Kubernetes liveness probe for server | +| server.livenessProbe.failureThreshold | int | `3` | Minimum consecutive failures for the [probe] to be considered failed after having succeeded | +| server.livenessProbe.httpGet.path | string | `"/"` | Http path to use for the liveness probe | +| server.livenessProbe.httpGet.port | int | `2746` | Http port to use for the liveness probe | +| server.livenessProbe.initialDelaySeconds | int | `10` | Number of seconds after the container has started before [probe] is initiated | +| server.livenessProbe.periodSeconds | int | `10` | How often (in seconds) to perform the [probe] | +| server.livenessProbe.successThreshold | int | `1` | Minimum consecutive successes for the [probe] to be considered successful after having failed | +| server.livenessProbe.timeoutSeconds | int | `1` | Number of seconds after which the [probe] times out | | server.loadBalancerClass | string | `""` | The class of the load balancer implementation | | server.loadBalancerIP | string | `""` | Static IP address to assign to loadBalancer service type `LoadBalancer` | | server.loadBalancerSourceRanges | list | `[]` | Source ranges to allow access to service from. Only applies to service type `LoadBalancer` | diff --git a/charts/argo-workflows/ci/enable-server-liveness-probe-values.yaml b/charts/argo-workflows/ci/enable-server-liveness-probe-values.yaml new file mode 100644 index 00000000..3a5892b8 --- /dev/null +++ b/charts/argo-workflows/ci/enable-server-liveness-probe-values.yaml @@ -0,0 +1,6 @@ +crds: + keep: false + +server: + livenessProbe: + enabled: true diff --git a/charts/argo-workflows/templates/server/server-deployment.yaml b/charts/argo-workflows/templates/server/server-deployment.yaml index b9a2541b..9d3e8c20 100644 --- a/charts/argo-workflows/templates/server/server-deployment.yaml +++ b/charts/argo-workflows/templates/server/server-deployment.yaml @@ -87,6 +87,22 @@ spec: {{- end }} initialDelaySeconds: 10 periodSeconds: 20 + {{- if .Values.server.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: {{ .Values.server.livenessProbe.httpGet.path }} + port: {{ .Values.server.livenessProbe.httpGet.port }} + {{- if .Values.server.secure }} + scheme: HTTPS + {{- else }} + scheme: HTTP + {{- end }} + initialDelaySeconds: {{ .Values.server.livenessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.server.livenessProbe.timeoutSeconds }} + periodSeconds: {{ .Values.server.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.server.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.server.livenessProbe.failureThreshold }} + {{- end }} env: - name: IN_CLUSTER value: "true" diff --git a/charts/argo-workflows/values.yaml b/charts/argo-workflows/values.yaml index 0c044454..cfec5948 100644 --- a/charts/argo-workflows/values.yaml +++ b/charts/argo-workflows/values.yaml @@ -776,6 +776,27 @@ server: # -- terminationGracePeriodSeconds for container lifecycle hook terminationGracePeriodSeconds: 30 + ## livenessProbe for server + ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ + livenessProbe: + # -- Enable Kubernetes liveness probe for server + enabled: false + httpGet: + # -- Http port to use for the liveness probe + port: 2746 + # -- Http path to use for the liveness probe + path: / + # -- Minimum consecutive failures for the [probe] to be considered failed after having succeeded + failureThreshold: 3 + # -- Number of seconds after the container has started before [probe] is initiated + initialDelaySeconds: 10 + # -- How often (in seconds) to perform the [probe] + periodSeconds: 10 + # -- Number of seconds after which the [probe] times out + timeoutSeconds: 1 + # -- Minimum consecutive successes for the [probe] to be considered successful after having failed + successThreshold: 1 + # -- Array of extra K8s manifests to deploy extraObjects: [] # - apiVersion: secrets-store.csi.x-k8s.io/v1