BorislavG | f923b2e | 2018-05-08 15:18:57 +0000 | [diff] [blame] | 1 | kafkapod=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "message-router-kafka-[^[:space:]]*") |
jasmineWen | 85d9d73 | 2018-03-06 16:13:35 +0000 | [diff] [blame] | 2 | if [ -n "$kafkapod" ]; then |
Priyanka Jain | c07e1d1 | 2018-05-03 12:52:04 +0000 | [diff] [blame] | 3 | if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $kafkapod -- ps ef | grep -i kafka; then |
jasmineWen | 85d9d73 | 2018-03-06 16:13:35 +0000 | [diff] [blame] | 4 | echo Success. Kafka process is running. 2>&1 |
| 5 | exit 0 |
| 6 | else |
| 7 | echo Failed. Kafka is not running. 2>&1 |
| 8 | exit 1 |
| 9 | fi |
| 10 | else |
| 11 | echo Failed. Kafka container is offline. 2>&1 |
| 12 | exit 1 |
| 13 | fi |