Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Support exposing jmx and additional ports #4072

Merged
merged 8 commits into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion incubator/kafka/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: Apache Kafka is publish-subscribe messaging rethought as a distributed
commit log.
name: kafka
version: 0.4.5
version: 0.4.6
keywords:
- kafka
- zookeeper
Expand Down
2 changes: 2 additions & 0 deletions incubator/kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ 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 }` |
| `jmxPort` | The jmx port to use for brokers. Will expose both the port and set the KAFKA_JMX_PORT env variable. | blank |
| `additionalPorts` | Additional ports to expose on brokers. Useful when the image exposes metrics (like prometheus, etc.) through a javaagent instead of a sidecar | `{}` |
| `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` |
Expand Down
11 changes: 11 additions & 0 deletions incubator/kafka/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ spec:
name: external-{{ $i }}
{{- end }}
{{- end }}
{{- if .Values.jmxPort }}
- containerPort: {{ .Values.jmxPort }}
name: jmx
{{- end }}
{{- if .Values.additionalPorts }}
{{ toYaml .Values.additionalPorts | indent 8 }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 10 }}
env:
Expand All @@ -105,6 +112,10 @@ spec:
- name: {{ printf "KAFKA_%s" $key | replace "." "_" | upper | quote }}
value: {{ $value | quote }}
{{- end }}
{{- if .Values.jmxPort }}
- name: KAFKA_JMX_PORT
value: "{{ .Values.jmxPort }}"
{{- end }}
# This is required because the Downward API does not yet support identification of
# pod numbering in statefulsets. Thus, we are required to specify a command which
# allows us to extract the pod ID for usage as the Kafka Broker ID.
Expand Down
7 changes: 7 additions & 0 deletions incubator/kafka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ configurationOverrides:
# "listener.security.protocol.map": |-
# PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT

## The jmx port to use for brokers. Will expose both the port and set the KAFKA_JMX_PORT env variable
# jmxPort: 9998

## A collection of additional ports to expose on brokers (formatted as normal containerPort yaml)
# Useful when the image exposes metrics (like prometheus, etc.) through a javaagent instead of a sidecar
additionalPorts: {}

## Persistence configuration. Specify if and how to persist data to a persistent volume.
##
persistence:
Expand Down