Skip to content

Commit

Permalink
fix: readiness/liveness
Browse files Browse the repository at this point in the history
Signed-off-by: yu-croco <[email protected]>
  • Loading branch information
yu-croco committed Feb 20, 2025
1 parent 200c26d commit 66619a4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion charts/argo-workflows/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ annotations:
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: |
- kind: added
description: Support readinessProbe to server
description: Support livenessProbe to server
17 changes: 8 additions & 9 deletions charts/argo-workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand All @@ -324,15 +332,6 @@ Fields to note:
| server.podSecurityContext | object | `{}` | SecurityContext to set on the server pods |
| server.priorityClassName | string | `""` | Leverage a PriorityClass to ensure your pods survive resource shortages |
| server.rbac.create | bool | `true` | Adds Role and RoleBinding for the server. |
| server.readinessProbe | object | See [values.yaml] | Configure readiness [probe] for the server |
| server.readinessProbe.enabled | bool | `false` | Enable Kubernetes readiness probe for server |
| server.readinessProbe.failureThreshold | int | `3` | Minimum consecutive failures for the [probe] to be considered failed after having succeeded |
| server.readinessProbe.httpGet.path | string | `"/"` | Http path to use for the readiness probe |
| server.readinessProbe.httpGet.port | int | `2746` | Http port to use for the readiness probe |
| server.readinessProbe.initialDelaySeconds | int | `10` | Number of seconds after the container has started before [probe] is initiated |
| server.readinessProbe.periodSeconds | int | `10` | How often (in seconds) to perform the [probe] |
| server.readinessProbe.successThreshold | int | `1` | Minimum consecutive successes for the [probe] to be considered successful after having failed |
| server.readinessProbe.timeoutSeconds | int | `1` | Number of seconds after which the [probe] times out |
| server.replicas | int | `1` | The number of server pods to run |
| server.resources | object | `{}` | Resource limits and requests for the server |
| server.revisionHistoryLimit | int | `10` | The number of revisions to keep. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ crds:
keep: false

server:
readinessProbe:
livenessProbe:
enabled: true
18 changes: 9 additions & 9 deletions charts/argo-workflows/templates/server/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ spec:
{{- end }}
initialDelaySeconds: 10
periodSeconds: 20
{{- if .Values.server.readinessProbe.enabled }}
readinessProbe:
{{- if .Values.server.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.server.readinessProbe.httpGet.path }}
port: {{ .Values.server.readinessProbe.httpGet.port }}
initialDelaySeconds: {{ .Values.server.readinessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.server.readinessProbe.timeoutSeconds }}
periodSeconds: {{ .Values.server.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.server.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.server.readinessProbe.failureThreshold }}
path: {{ .Values.server.livenessProbe.httpGet.path }}
port: {{ .Values.server.livenessProbe.httpGet.port }}
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
Expand Down
12 changes: 6 additions & 6 deletions charts/argo-workflows/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -776,15 +776,15 @@ server:
# -- terminationGracePeriodSeconds for container lifecycle hook
terminationGracePeriodSeconds: 30

# -- Configure readiness [probe] for the server
# @default -- See [values.yaml]
readinessProbe:
# -- Enable Kubernetes readiness probe for server
## 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 readiness probe
# -- Http port to use for the liveness probe
port: 2746
# -- Http path to use for the readiness probe
# -- Http path to use for the liveness probe
path: /
# -- Minimum consecutive failures for the [probe] to be considered failed after having succeeded
failureThreshold: 3
Expand Down

0 comments on commit 66619a4

Please sign in to comment.