Skip to content

Commit

Permalink
alluxio using post start instead of startup probe when k8s version is…
Browse files Browse the repository at this point in the history
… less than 1.18 (#3425)

* using poststart instead of startupprobe when k8s version is less than 1.18

Signed-off-by: xliu1992 <[email protected]>

* fix if syntax error

Signed-off-by: xliuqq <[email protected]>

---------

Signed-off-by: xliu1992 <[email protected]>
Signed-off-by: xliuqq <[email protected]>
  • Loading branch information
xliuqq authored Aug 29, 2023
1 parent d1bdadb commit 69a8706
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions charts/alluxio/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,20 @@ spec:
{{ toYaml .Values.master.args | trim | indent 12 }}
{{- end }}
{{- if eq .Values.master.mountConfigStorage "configmap"}}
{{- if semverCompare ">=1.18.0-0" .Capabilities.KubeVersion.Version }}
startupProbe:
exec:
command: ["bash", "-c", "/etc/fluid/scripts/mount.sh >> /proc/1/fd/1 2>&1"]
initialDelaySeconds: 5
failureThreshold: 10
timeoutSeconds: 15
periodSeconds: 20
{{- else }}
lifecycle:
postStart:
exec:
command: ["bash", "-c", "while true; do /etc/fluid/scripts/mount.sh >> /proc/1/fd/1 2>&1; if [ $? -ne 0 ];then sleep 20; else break; fi; done" ]
{{- end }}
{{- end }}
{{- if $isHaEmbedded }}
env:
Expand Down

0 comments on commit 69a8706

Please sign in to comment.