Skip to content

Commit c7b328f

Browse files
Health check added for HA deployment
1 parent 0ffaa51 commit c7b328f

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

deployment/haystack-agent/templates/deployment.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,14 @@ spec:
4545
value: "${jvm_memory_limit}m"
4646
- name: "JAVA_XMX"
4747
value: "${jvm_memory_limit}m"
48-
# livenessProbe:
49-
# exec:
50-
# command:
51-
# - grep
52-
# - "true"
53-
# - /app/isHealthy
54-
# initialDelaySeconds: 30
55-
# periodSeconds: 5
56-
# timeoutSeconds: 5
57-
# failureThreshold: 6
48+
livenessProbe:
49+
exec:
50+
command:
51+
- /bin/grpc_health_probe
52+
- "-addr=:${blobs_service_port}"
53+
initialDelaySeconds: 30
54+
periodSeconds: 15
55+
failureThreshold: 3
5856
nodeSelector:
5957
${node_selecter_label}
6058
volumes:

docker/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ ENV APP_HOME /app/bin
66

77
RUN mkdir -p ${APP_HOME}
88

9+
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \
10+
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
11+
chmod +x /bin/grpc_health_probe
12+
913
COPY bundlers/haystack-agent/target/${APP_NAME}.jar ${APP_HOME}/
1014

1115
COPY docker/default.conf ${APP_HOME}/

0 commit comments

Comments
 (0)