Kafka release name check (#5770)

* Add default function from chart template to check release name match

* Increment chart version

* Update to latest _helpers.tpl

* Unset deprecated port created by kubernetes

* Revert change to zookeeper.fullname for  KAFKA_ZOOKEEPER_CONNECT var

* Update readme to clarify limitation

* Increment version number

* Bump chart version, not appversion

* Alter maintainers to have github username for CI
This commit is contained in:
Tim Curtin
2018-06-13 12:27:28 -07:00
committed by k8s-ci-robot
parent 145a8d6690
commit d4be57fa06
4 changed files with 22 additions and 5 deletions
+4 -4
View File
@@ -2,7 +2,7 @@ apiVersion: v1
description: Apache Kafka is publish-subscribe messaging rethought as a distributed
commit log.
name: kafka
version: 0.7.3
version: 0.7.4
appVersion: 4.0.1
keywords:
- kafka
@@ -15,10 +15,10 @@ sources:
- https://github.com/confluentinc/cp-docker-images
- https://github.com/apache/kafka
maintainers:
- name: Faraaz Khan
- name: faraazkhan
email: faraaz@rationalizeit.us
- name: Marc Villacorta
- name: h0tbird
email: marc.villacorta@gmail.com
- name: Ben Goldberg
- name: benjigoldberg
email: ben@spothero.com
icon: https://kafka.apache.org/images/logo.png
+1 -1
View File
@@ -187,7 +187,7 @@ such port at a time, setting the range at every Kafka pod is a reasonably safe c
* Topic creation is not automated
* Only supports storage options that have backends for persistent volume claims (tested mostly on AWS)
* There must not exist a service called `kafka` in the same namespace
* KAFKA_PORT will be created as an envvar and brokers will fail to start when there is a service named `kafka` in the same namespace. We work around this be unsetting that envvar `unset KAFKA_PORT`.
[brokerconfigs]: https://kafka.apache.org/documentation/#brokerconfigs
+16
View File
@@ -9,11 +9,20 @@ Expand the name of the chart.
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kafka.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create a default fully qualified zookeeper name.
@@ -38,3 +47,10 @@ else use user-provided URL
{{- default $zookeeperConnect $zookeeperConnectOverride }}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kafka.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -159,6 +159,7 @@ spec:
- sh
- -exc
- |
unset KAFKA_PORT && \
export KAFKA_BROKER_ID=${HOSTNAME##*-} && \
export KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://${POD_IP}:9092{{ if kindIs "string" $advertisedListenersOverride }}{{ printf ",%s" $advertisedListenersOverride }}{{ end }} && \
exec /etc/confluent/docker/run