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 1 commit
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.1
version: 0.4.2
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 @@ -70,6 +70,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 |
| `additionsPorts` | Additional ports to expose on brokers. Useful when the image exposes metrics (like prometheus, etc.) through a javaagent instead of a sidecar | `{}` |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additionsPorts -> additionalPorts

| `updateStrategy` | StatefulSet update strategy to use. | `{ type: "OnDelete" }` |
| `persistence.enabled` | Use a PVC to persist data | `true` |
| `persistence.size` | Size of data volume | `1Gi` |
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 @@ -78,6 +78,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 @@ -102,6 +109,10 @@ spec:
name: "{{ $configMapName }}"
key: {{ $configName }}
{{- 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
8 changes: 8 additions & 0 deletions incubator/kafka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ 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: {}


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm extra newline

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