Skip to content

Commit

Permalink
Merge pull request #1427 from mapellidario/20231013-crabdev-liveready
Browse files Browse the repository at this point in the history
crabserver helm - test liveness readiness probes
  • Loading branch information
muhammadimranfarooqi authored Oct 13, 2023
2 parents 0ac6b75 + d258723 commit 287cff1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/crabserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.4
version: 0.1.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
8 changes: 6 additions & 2 deletions helm/crabserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ spec:
livenessProbe:
{{- if eq (toString $environment) "prod" }}
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- else }}
{{- else if eq (toString $environment) "preprod" }}
{{- toYaml .Values.livenessProbePreProd | nindent 12 }}
{{- else }}
{{- toYaml .Values.livenessProbeTest | nindent 12 }}
{{- end }}
readinessProbe:
{{- if eq (toString $environment) "prod" }}
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- else }}
{{- else if eq (toString $environment) "preprod" }}
{{- toYaml .Values.readinessProbePreProd | nindent 12 }}
{{- else }}
{{- toYaml .Values.readinessProbeTest | nindent 12 }}
{{- end }}
volumeMounts:
- name: proxy-secrets
Expand Down
22 changes: 22 additions & 0 deletions helm/crabserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,28 @@ readinessProbePreProd:
periodSeconds: 60
timeoutSeconds: 60

livenessProbeTest:
exec:
command:
- /bin/sh
- -c
- |
cmsweb-ping --url=http://localhost:8270/crabserver/dev/info --authz=/etc/hmac/hmac -verbose 0 | egrep "^[2-4]"
failureThreshold: 3
initialDelaySeconds: 120
periodSeconds: 60
timeoutSeconds: 60

readinessProbeTest:
exec:
command:
- /bin/sh
- -c
- |
cmsweb-ping --url=http://localhost:8270/crabserver/dev/info --authz=/etc/hmac/hmac -verbose 0 | egrep "^[2-4]"
periodSeconds: 60
timeoutSeconds: 60

autoscaling:
enabled: false
minReplicas: 1
Expand Down

0 comments on commit 287cff1

Please sign in to comment.