diff --git a/incubator/kafka/Chart.yaml b/incubator/kafka/Chart.yaml index 371d07e192..a2e6cc94f4 100755 --- a/incubator/kafka/Chart.yaml +++ b/incubator/kafka/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 description: Apache Kafka is publish-subscribe messaging rethought as a distributed commit log. name: kafka -version: 0.4.4 +version: 0.4.5 keywords: - kafka - zookeeper diff --git a/incubator/kafka/README.md b/incubator/kafka/README.md index 2f6f5de733..50dd778ba9 100644 --- a/incubator/kafka/README.md +++ b/incubator/kafka/README.md @@ -71,6 +71,11 @@ following configurable parameters: | `external.domain` | Domain in which to advertise Kafka external listeners. | `cluster.local` | | `external.init` | External init container settings. | (see `values.yaml`) | | `configurationOverrides` | `Kafka ` [configuration setting][brokerconfigs] overrides in the dictionary format | `{ offsets.topic.replication.factor: 3 }` | +| `readinessProbe.initialDelaySeconds` | Number of seconds before probe is initiated. | `30` | +| `readinessProbe.periodSeconds` | How often (in seconds) to perform the probe. | `10` | +| `readinessProbe.timeoutSeconds` | Number of seconds after which the probe times out. | `5` | +| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` | +| `readinessProbe.failureThreshold` | After the probe fails this many times, pod will be marked Unready. | `3` | | `updateStrategy` | StatefulSet update strategy to use. | `{ type: "OnDelete" }` | | `persistence.enabled` | Use a PVC to persist data | `true` | | `persistence.size` | Size of data volume | `1Gi` | diff --git a/incubator/kafka/templates/statefulset.yaml b/incubator/kafka/templates/statefulset.yaml index 4f4c0896a1..54b209fe2a 100644 --- a/incubator/kafka/templates/statefulset.yaml +++ b/incubator/kafka/templates/statefulset.yaml @@ -70,8 +70,11 @@ spec: - --zookeeper - {{ template "zookeeper.url" . }} - --list - initialDelaySeconds: 30 - timeoutSeconds: 5 + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} ports: - containerPort: 9092 name: kafka diff --git a/incubator/kafka/values.yaml b/incubator/kafka/values.yaml index 5a11d9cd2b..c84c9cada3 100644 --- a/incubator/kafka/values.yaml +++ b/incubator/kafka/values.yaml @@ -51,6 +51,16 @@ affinity: {} ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector nodeSelector: {} +## Readiness probe config. +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +## +readinessProbe: + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 3 + # Tolerations for nodes that have taints on them. # Useful if you want to dedicate nodes to just run kafka # https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/