@@ -11,7 +11,7 @@ metadata:
11
11
spec :
12
12
containers :
13
13
- name : curl
14
- image : alpine
14
+ image : alpine/curl
15
15
env :
16
16
- name : NODE_IP
17
17
valueFrom :
@@ -23,16 +23,37 @@ spec:
23
23
- " sh"
24
24
- " -c"
25
25
- |
26
- apk add curl
27
- {{- if eq .Values.service.type "NodePort" -}}
28
- && [ "$(curl -k --retry 3 --retry-all-errors --connect-timeout 5 --retry-delay 5 https://${NODE_IP}:30443/entity/GATEWAY_BACKEND )" = "[]" ] && [ "$(curl --retry 3 --retry-all-errors --connect-timeout 5 --retry-delay 5 http://${NODE_IP}:30080/entity/GATEWAY_BACKEND )" = "[]" ]
29
- {{- end }}
30
- {{- if index .Values "config" "serverConfig" "http-server.https.enabled" -}}
31
- && [ "$(curl -k --retry 3 --retry-all-errors --connect-timeout 5 --retry-delay 5 -v https://{{ .Values.serviceName }}:8443/entity/GATEWAY_BACKEND )" = "[]" ]
32
- {{- end }}
33
- {{- if index .Values "config" "serverConfig" "http-server.http.enabled" -}}
34
- && [ "$(curl --retry 3 --retry-all-errors --connect-timeout 5 --retry-delay 5 -v http://{{ .Values.serviceName }}:8080/entity/GATEWAY_BACKEND )" = "[]" ]
35
- {{- end }}
26
+ {{ $curlOpts := "--fail --retry 5 --retry-all-errors --connect-timeout 10 --retry-delay 10 --verbose" }}
27
+ {{- if eq .Values.service.type "NodePort" }}
28
+ if curl {{ $curlOpts }} --insecure https://${NODE_IP}:30443/entity/GATEWAY_BACKEND; then
29
+ echo "HTTPS connection to NodePort service successful"
30
+ else
31
+ echo "HTTPS connection to NodePort service failed"
32
+ exit 1
33
+ fi
34
+ if curl {{ $curlOpts }} http://${NODE_IP}:30080/entity/GATEWAY_BACKEND; then
35
+ echo "HTTP connection to NodePort service successful"
36
+ else
37
+ echo "HTTP connection to NodePort service failed"
38
+ exit 1
39
+ fi
40
+ {{- end }}
41
+ {{- if index .Values "config" "serverConfig" "http-server.https.enabled" }}
42
+ if curl {{ $curlOpts }} --insecure https://{{ .Values.serviceName }}:8443/entity/GATEWAY_BACKEND; then
43
+ echo "HTTPS connection to service successful"
44
+ else
45
+ echo "HTTPS connection to service failed"
46
+ exit 1
47
+ fi
48
+ {{- end }}
49
+ {{- if index .Values "config" "serverConfig" "http-server.http.enabled" }}
50
+ if curl {{ $curlOpts }} http://{{ .Values.serviceName }}:8080/entity/GATEWAY_BACKEND; then
51
+ echo "HTTP connection to service successful"
52
+ else
53
+ echo "HTTP connection to service failed"
54
+ exit 1
55
+ fi
56
+ {{- end }}
36
57
volumes :
37
58
- name : persistence-sql
38
59
emptyDir :
0 commit comments