From e83aaa3dbd86802154dc9bdeb90e11ed2abf3216 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 7 Nov 2017 20:29:52 +0100 Subject: Fixes container log to show unreplicated partitions (if there are any) --- maintenance/test/replicated-partitions.yml | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 maintenance/test/replicated-partitions.yml (limited to 'maintenance') diff --git a/maintenance/test/replicated-partitions.yml b/maintenance/test/replicated-partitions.yml new file mode 100644 index 0000000..a1f8158 --- /dev/null +++ b/maintenance/test/replicated-partitions.yml @@ -0,0 +1,50 @@ +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: replicated-partitions + namespace: test-kafka +spec: + replicas: 1 + selector: + matchLabels: + test-type: readiness + test-target: under-replicated-partitions + template: + metadata: + labels: + test-type: readiness + test-target: under-replicated-partitions + spec: + containers: + - name: kafka + image: solsson/kafka:1.0.0@sha256:17fdf1637426f45c93c65826670542e36b9f3394ede1cb61885c6a4befa8f72d + command: + - /bin/bash + - -ec + - > + touch /tmp/testlog; + tail -f /tmp/testlog + readinessProbe: + exec: + command: + - /bin/bash + - -c + - > + echo "### $(date -Ins -u) ###" >> /tmp/testlog + && + [ + $( + ./bin/kafka-topics.sh + --zookeeper zookeeper.kafka:2181 + --describe + --under-replicated-partitions + | + tee -a /tmp/testlog + | + wc -l + ) + -eq + 0 + ] + periodSeconds: 30 + timeoutSeconds: 29 -- cgit v1.2.3