From 9bea1286d09300fed028800c4fd9a98caebf67ff Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Mon, 16 Oct 2017 13:48:46 +0200 Subject: More lightweight kafka probe, essentially the same thing --- 50kafka.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/50kafka.yml b/50kafka.yml index 430423a..0ed8e2f 100644 --- a/50kafka.yml +++ b/50kafka.yml @@ -49,11 +49,9 @@ spec: cpu: 100m memory: 512Mi readinessProbe: - exec: - command: - - /bin/sh - - -c - - 'echo "" | nc -w 1 127.0.0.1 9092' + tcpSocket: + port: 9092 + timeoutSeconds: 10 volumeMounts: - name: config mountPath: /etc/kafka -- cgit v1.2.3 From e0824f64aa7feb629f3ef127c0ba85393c0e1d8c Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 7 Nov 2017 12:55:07 +0100 Subject: Timeout was 1s with the old /bin/sh exec, now it's interval -1 s --- 50kafka.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/50kafka.yml b/50kafka.yml index 0ed8e2f..cabbfad 100644 --- a/50kafka.yml +++ b/50kafka.yml @@ -51,7 +51,7 @@ spec: readinessProbe: tcpSocket: port: 9092 - timeoutSeconds: 10 + timeoutSeconds: 9 volumeMounts: - name: config mountPath: /etc/kafka -- cgit v1.2.3 From b462dac8cfd33ccac4aec84fcf5f915cbfc135a3 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 7 Nov 2017 12:57:01 +0100 Subject: Actually, for readiness not liveness, let's go offline fast ... and trust alarms on Under-replicated Partitions to let us know when something is really wrong. Do clients actually care about Readiness? The bootstrap service (https://github.com/Yolean/kubernetes-kafka/pull/52) will definitely care, which is good. The `broker` service, that the StatefulSet manifest depends on (https://github.com/Yolean/kubernetes-kafka/blob/v2.1.0/50kafka.yml#L7) for naming, is without `publishNotReadyAddresses`. Clients will bootstrap, get the individual DNS names of brokers, resolve those addresses and connect directly to pods. --- 50kafka.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/50kafka.yml b/50kafka.yml index cabbfad..50d0228 100644 --- a/50kafka.yml +++ b/50kafka.yml @@ -51,7 +51,7 @@ spec: readinessProbe: tcpSocket: port: 9092 - timeoutSeconds: 9 + timeoutSeconds: 1 volumeMounts: - name: config mountPath: /etc/kafka -- cgit v1.2.3