From 95978784b69981fa1cd76db7b0e7b03c8d9c2ff1 Mon Sep 17 00:00:00 2001 From: Karol Chrapek Date: Wed, 12 Sep 2018 15:58:48 +0200 Subject: [PATCH] SSL support - Disable value from secret when secret is mounted (#7693) Signed-off-by: Karol Chrapek --- incubator/kafka/Chart.yaml | 2 +- incubator/kafka/README.md | 2 +- incubator/kafka/templates/statefulset.yaml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/incubator/kafka/Chart.yaml b/incubator/kafka/Chart.yaml index b674690e8d..2564adbbc3 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.9.5 +version: 0.9.6 appVersion: 4.1.2 keywords: - kafka diff --git a/incubator/kafka/README.md b/incubator/kafka/README.md index 7a23849d3f..8bcd5ddce2 100644 --- a/incubator/kafka/README.md +++ b/incubator/kafka/README.md @@ -81,7 +81,7 @@ following configurable parameters: | `podAnnotations` | Annotation to be added to Kafka pods | `{}` | | `rbac.enabled` | Enable a service account and role for the init container to use in an RBAC enabled cluster | `false` | | `configurationOverrides` | `Kafka ` [configuration setting][brokerconfigs] overrides in the dictionary format | `{ offsets.topic.replication.factor: 3 }` | -| `secrets` | `{}` | Pass any secrets to the kafka pods. Each secret will be passed as an environment variable by default. The secret can also be mounted to a specific path (in addition to environment variable) if required. Environment variable names are generated as: `_` (All upper case)| +| `secrets` | `{}` | Pass any secrets to the kafka pods. Each secret will be passed as an environment variable by default. The secret can also be mounted to a specific path if required. Environment variable names are generated as: `_` (All upper case)| | `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` | diff --git a/incubator/kafka/templates/statefulset.yaml b/incubator/kafka/templates/statefulset.yaml index 0e6220683e..acbdc060c3 100644 --- a/incubator/kafka/templates/statefulset.yaml +++ b/incubator/kafka/templates/statefulset.yaml @@ -177,12 +177,14 @@ spec: value: "{{ .Values.jmx.port }}" {{- end }} {{- range $secret := .Values.secrets }} - {{- range $key := $secret.keys }} + {{- if not $secret.mountPath }} + {{- range $key := $secret.keys }} - name: {{ (print $secret.name "_" $key) | upper }} valueFrom: secretKeyRef: name: {{ $secret.name }} key: {{ $key }} + {{- end }} {{- end }} {{- end }} # This is required because the Downward API does not yet support identification of