From e94cfc1253e5e3a3ffb0627adadbf2a2f0fe3bcf Mon Sep 17 00:00:00 2001 From: Joshua Dotson Date: Thu, 22 Mar 2018 08:43:04 -0400 Subject: [PATCH] [incubator/kafka] Fix initContainer failure which did not error (#4400) * [incubator/kafka] Fix initContainer failure which did not error * [incubator/kafka] Set initContainer to fail when vars are undefined --- incubator/kafka/Chart.yaml | 2 +- incubator/kafka/templates/statefulset.yaml | 6 ++++-- incubator/kafka/values.yaml | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/incubator/kafka/Chart.yaml b/incubator/kafka/Chart.yaml index 88a672aa26c5..371d07e19273 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.3 +version: 0.4.4 keywords: - kafka - zookeeper diff --git a/incubator/kafka/templates/statefulset.yaml b/incubator/kafka/templates/statefulset.yaml index 4f65aa3a3a2e..4f4c0896a162 100644 --- a/incubator/kafka/templates/statefulset.yaml +++ b/incubator/kafka/templates/statefulset.yaml @@ -28,8 +28,10 @@ spec: - name: init-ext image: "{{ .Values.external.init.image }}:{{ .Values.external.init.imageTag }}" imagePullPolicy: "{{ .Values.external.init.imagePullPolicy }}" - args: - - -n ${POD_NAMESPACE} label pods ${POD_NAME} pod=${POD_NAME} + command: + - sh + - -euxc + - "kubectl label pods ${POD_NAME} --namespace ${POD_NAMESPACE} pod=${POD_NAME}" env: - name: POD_NAME valueFrom: diff --git a/incubator/kafka/values.yaml b/incubator/kafka/values.yaml index f40750102619..5a11d9cd2b62 100644 --- a/incubator/kafka/values.yaml +++ b/incubator/kafka/values.yaml @@ -69,8 +69,8 @@ external: firstListenerPort: 31090 domain: cluster.local init: - image: "lachlanevenson/k8s-kubectl" - imageTag: "v1.9.3" + image: "lwolf/kubectl_deployer" + imageTag: "0.4" imagePullPolicy: "IfNotPresent" ## Configuration Overrides. Specify any Kafka settings you would like set on the StatefulSet