Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.
Open
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
6 changes: 6 additions & 0 deletions charts/cp-kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ The configuration parameters in this section control the resources requested and
| `nodeport.servicePort` | The Port broker will advertise to external producers and consumers. | `19092` |
| `nodeport.firstListenerPort` | The first NodePort that Kafka Broker will use for advertising to external producers and consumers. For each broker, advertise.listeners port for external will be set to `31090 + {index of broker pod}`. | `31090` |

### Metrics Reporting

| Parameter | Description | Default |
| --------- | ----------- | ------- |
| `metrics.report` | Whether or not to allow metrics reporting to confluent. Sets KAFKA_METRIC_REPORTERS and CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS env variables. | `true` |

### Deployment Topology

| Parameter | Description | Default |
Expand Down
9 changes: 6 additions & 3 deletions charts/cp-kafka/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ spec:
{{- end }}
{{- end }}
spec:
{{- if .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
affinity:
{{- if .Values.affinity }}
{{ toYaml .Values.affinity | indent 8 }}
Expand Down Expand Up @@ -85,9 +89,6 @@ spec:
- name: {{ template "cp-kafka.name" . }}-broker
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 10 }}
{{- end }}
ports:
- containerPort: 9092
name: kafka
Expand Down Expand Up @@ -128,10 +129,12 @@ spec:
value: {{ include "cp-kafka.cp-zookeeper.service-name" . | quote }}
- name: KAFKA_LOG_DIRS
value: {{ include "cp-kafka.log.dirs" . | quote }}
{{- if .Values.metrics.report }}
- name: KAFKA_METRIC_REPORTERS
value: "io.confluent.metrics.reporter.ConfluentMetricsReporter"
- name: CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS
value: {{ printf "PLAINTEXT://%s:9092" (include "cp-kafka.cp-kafka-headless.fullname" .) | quote }}
{{- end }}
{{- range $key, $value := .Values.configurationOverrides }}
- name: {{ printf "KAFKA_%s" $key | replace "." "_" | upper | quote }}
value: {{ $value | quote }}
Expand Down
5 changes: 5 additions & 0 deletions charts/cp-kafka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ nodeport:
servicePort: 19092
firstListenerPort: 31090

## Set to true for enabling metrics reporting to Confluent.
## It sets KAFKA_METRIC_REPORTERS and CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS env variables.
metrics:
report: true

## ------------------------------------------------------
## Zookeeper
## ------------------------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions charts/cp-zookeeper/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ spec:
{{- end }}
{{- end }}
spec:
{{- if .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
affinity:
{{- if .Values.affinity }}
{{ toYaml .Values.affinity | indent 8 }}
Expand Down Expand Up @@ -85,9 +89,6 @@ spec:
- name: {{ template "cp-zookeeper.name" . }}-server
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 10 }}
{{- end }}
ports:
- containerPort: {{ .Values.clientPort }}
name: client
Expand Down