Neither of the two forms are correct, because they don't run the command
in a shell (and you need one because you're actually running multiple
commans & using pipes).
The correct form is:
readinessProbe:
exec:
command:
- sh
- -c
- '/usr/bin/curl --insecure
https://127.0.0.1:8443/check_alive 2>/dev/null | grep Anonymous || exit 1'
Also, you don't really need that last "|| exit 1" part. Even without it,
the command's exit code will be 1 (grep returns 1 when it doesn't find a
match).
Marko
On 06. 06. 2017 06:08, Marc Boorshtein wrote:
I'm trying to use the following command as my liveness check:
/usr/bin/curl --insecure https://127.0.0.1:8443/check_alive
<https://127.0.0.1/check_alive> 2>/dev/null | grep Anonymous || exit 1
I tried:
readinessProbe:
exec:
command:
- '/usr/bin/curl'
- '--insecure'
- 'https://127.0.0.1:8443/check_alive'
- '2>/dev/null'
- '|'
- 'grep'
- 'Anonymous'
- '||'
- 'exit'
- '1'
and
readinessProbe:
exec:
command:
- '/usr/bin/curl --insecure
https://127.0.0.1:8443/check_alive 2>/dev/null | grep Anonymous || exit 1'
but openshift doesn't seem to like that either. Thoughts? Any help is
greatly appreciated.
Thanks
Marc
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users