File tree Expand file tree Collapse file tree 2 files changed +2
-36
lines changed Expand file tree Collapse file tree 2 files changed +2
-36
lines changed Original file line number Diff line number Diff line change 1
1
# This configMap contains scirpts for MarkLogic Helm Chart:
2
- # liveness-probe.sh
3
2
# copy-certs.sh
4
3
# prestop-hook.sh
5
4
# poststart-hook.sh
@@ -8,37 +7,6 @@ kind: ConfigMap
8
7
metadata :
9
8
name : {{ include "marklogic.fullname" . }}-scripts
10
9
data :
11
- liveness-probe.sh : |
12
- #!/bin/bash
13
- log () {
14
- local TIMESTAMP=$(date +"%Y-%m-%d %T.%3N")
15
- echo "${TIMESTAMP} $@" > /proc/1/fd/1
16
- }
17
-
18
- # Check if ML service is running. Exit with 1 if it is other than running
19
- if [ -e /etc/init.d/MarkLogic ]; then
20
- ml_status=$(/etc/init.d/MarkLogic status)
21
- else
22
- ml_status=$(/etc/MarkLogic/MarkLogic-service.sh status)
23
- fi
24
-
25
- if [[ "$ml_status" =~ "running" ]]; then
26
- http_code=$(curl -o /tmp/probe_response.txt -s -w "%{http_code}" "http://${HOSTNAME}:8001/admin/v1/timestamp")
27
- curl_code=$?
28
- http_resp=$(cat /tmp/probe_response.txt)
29
-
30
- if [[ $curl_code -ne 0 && $http_code -ne 401 ]]; then
31
- log "Info: [Liveness Probe] Error with MarkLogic"
32
- log "Info: [Liveness Probe] Curl response code: "$curl_code
33
- log "Info: [Liveness Probe] Http response code: "$http_code
34
- log "Info: [Liveness Probe] Http response message: "$http_resp
35
- fi
36
- rm -f /tmp/probe_response.txt
37
- exit 0
38
- else
39
- exit 1
40
- fi
41
-
42
10
copy-certs.sh : |
43
11
#!/bin/bash
44
12
MARKLOGIC_ADMIN_USERNAME="$(< /run/secrets/ml-secrets/username)"
Original file line number Diff line number Diff line change @@ -200,10 +200,8 @@ spec:
200
200
{{- end }}
201
201
{{- if .Values.livenessProbe.enabled }}
202
202
livenessProbe :
203
- exec :
204
- command :
205
- - /bin/bash
206
- - /tmp/helm-scripts/liveness-probe.sh
203
+ tcpSocket :
204
+ port : 8001
207
205
initialDelaySeconds : {{ .Values.livenessProbe.initialDelaySeconds }}
208
206
periodSeconds : {{ .Values.livenessProbe.periodSeconds }}
209
207
timeoutSeconds : {{ .Values.livenessProbe.timeoutSeconds }}
You can’t perform that action at this time.
0 commit comments