Skip to content

Commit

Permalink
Merge pull request #99 from langchain-ai/infra/make-probes-configurable
Browse files Browse the repository at this point in the history
fix: make probes configurable
  • Loading branch information
langchain-infra authored Jun 20, 2024
2 parents 774ad16 + c9a4cc3 commit dc50d56
Show file tree
Hide file tree
Showing 11 changed files with 229 additions and 143 deletions.
2 changes: 1 addition & 1 deletion charts/langsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ maintainers:
email: [email protected]
description: Helm chart to deploy the langsmith application and all services it depends on.
type: application
version: 0.6.2
version: 0.6.3
appVersion: "0.6.9"
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": post-install, post-upgrade
"helm.sh/hook": post-install, pre-upgrade
"helm.sh/hook-weight": "-1"
"argocd.argoproj.io/hook": "PostSync"
{{- include "langsmith.annotations" . | nindent 4 }}
{{- with.Values.backend.clickhouseMigrations.annotations }}
{{- toYaml . | nindent 4 }}
Expand Down
27 changes: 9 additions & 18 deletions charts/langsmith/templates/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,18 @@ spec:
- name: backend
containerPort: {{ .Values.backend.containerPort }}
protocol: TCP
{{- with .Values.backend.deployment.startupProbe }}
startupProbe:
httpGet:
path: /ok
port: {{ .Values.backend.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.deployment.livenessProbe }}
livenessProbe:
httpGet:
path: /ok
port: {{ .Values.backend.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.deployment.readinessProbe }}
readinessProbe:
httpGet:
path: /ok
port: {{ .Values.backend.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.backend.deployment.resources | nindent 12 }}
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ metadata:
annotations:
"helm.sh/hook": post-install, post-upgrade
"helm.sh/hook-weight": "-1"
"argocd.argoproj.io/hook": "PostSync"
{{- include "langsmith.annotations" . | nindent 4 }}
{{- with.Values.backend.migrations.annotations }}
{{- toYaml . | nindent 4 }}
Expand Down
29 changes: 10 additions & 19 deletions charts/langsmith/templates/clickhouse/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,18 @@ spec:
- name: ch-native
containerPort: {{ .Values.clickhouse.containerNativePort }}
protocol: TCP
{{- with .Values.clickhouse.statefulSet.startupProbe }}
startupProbe:
httpGet:
path: /ping
port: {{ .Values.clickhouse.containerHttpPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /ping
port: {{ .Values.clickhouse.containerHttpPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.clickhouse.statefulSet.livenessProbe }}
livenessProbe:
httpGet:
path: /ping
port: {{ .Values.clickhouse.containerHttpPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.clickhouse.statefulSet.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.clickhouse.statefulSet.resources | nindent 12 }}
securityContext:
Expand Down
27 changes: 9 additions & 18 deletions charts/langsmith/templates/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,18 @@ spec:
- name: frontend
containerPort: {{ .Values.frontend.containerPort }}
protocol: TCP
{{- with .Values.frontend.deployment.startupProbe }}
startupProbe:
httpGet:
path: /health
port: {{ .Values.frontend.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.frontend.deployment.livenessProbe }}
livenessProbe:
httpGet:
path: /health
port: {{ .Values.frontend.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.frontend.deployment.readinessProbe }}
readinessProbe:
httpGet:
path: /health
port: {{ .Values.frontend.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.frontend.deployment.resources | nindent 12 }}
securityContext:
Expand Down
27 changes: 9 additions & 18 deletions charts/langsmith/templates/platform-backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,18 @@ spec:
- name: platform
containerPort: {{ .Values.platformBackend.containerPort }}
protocol: TCP
{{- with .Values.platformBackend.deployment.startupProbe }}
startupProbe:
httpGet:
path: /ok
port: {{ .Values.platformBackend.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.platformBackend.deployment.livenessProbe }}
livenessProbe:
httpGet:
path: /ok
port: {{ .Values.platformBackend.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.platformBackend.deployment.readinessProbe }}
readinessProbe:
httpGet:
path: /ok
port: {{ .Values.platformBackend.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.platformBackend.deployment.resources | nindent 12 }}
securityContext:
Expand Down
27 changes: 9 additions & 18 deletions charts/langsmith/templates/playground/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,18 @@ spec:
- name: playground
containerPort: {{ .Values.playground.containerPort }}
protocol: TCP
{{- with .Values.playground.deployment.startupProbe }}
startupProbe:
httpGet:
path: /ok
port: {{ .Values.playground.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.playground.deployment.livenessProbe }}
livenessProbe:
httpGet:
path: /ok
port: {{ .Values.playground.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.playground.deployment.readinessProbe }}
readinessProbe:
httpGet:
path: /ok
port: {{ .Values.playground.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.playground.deployment.resources | nindent 12 }}
securityContext:
Expand Down
35 changes: 10 additions & 25 deletions charts/langsmith/templates/postgres/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,33 +73,18 @@ spec:
- name: postgres
containerPort: {{ .Values.postgres.containerPort }}
protocol: TCP
{{- with .Values.postgres.statefulSet.startupProbe }}
startupProbe:
exec:
command:
- /bin/sh
- -c
- exec pg_isready -d {{ .Values.postgres.external.database }} -U {{ .Values.postgres.external.user }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
readinessProbe:
exec:
command:
- /bin/sh
- -c
- exec pg_isready -d {{ .Values.postgres.external.database }} -U {{ .Values.postgres.external.user }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.postgres.statefulSet.livenessProbe }}
livenessProbe:
exec:
command:
- /bin/sh
- -c
- exec pg_isready -d {{ .Values.postgres.external.database }} -U {{ .Values.postgres.external.user }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.postgres.statefulSet.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.postgres.statefulSet.resources | nindent 12 }}
securityContext:
Expand Down
35 changes: 10 additions & 25 deletions charts/langsmith/templates/redis/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,18 @@ spec:
- name: redis
containerPort: {{ .Values.redis.containerPort }}
protocol: TCP
{{- with .Values.redis.statefulSet.startupProbe }}
startupProbe:
exec:
command:
- /bin/sh
- -c
- exec redis-cli ping
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
readinessProbe:
exec:
command:
- /bin/sh
- -c
- exec redis-cli ping
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.redis.statefulSet.livenessProbe }}
livenessProbe:
exec:
command:
- /bin/sh
- -c
- exec redis-cli ping
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.redis.statefulSet.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.redis.statefulSet.resources | nindent 12 }}
securityContext:
Expand Down
Loading

0 comments on commit dc50d56

Please sign in to comment.