From 189d7816da62a0ebf25ceb07e1d094f6ff3d16e2 Mon Sep 17 00:00:00 2001 From: stoetti <31430612+stoetti@users.noreply.github.com> Date: Mon, 27 Apr 2020 09:02:53 +0200 Subject: [PATCH] Add variable for additional environment variables (#56) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add configurable initContainers add configurable extraVolumes add configurable extraVolumeMounts * updated README * add configurable initContainers add configurable extraVolumes add configurable extraVolumeMounts Signed-off-by: Michael Stöttinger * updated README Signed-off-by: Michael Stöttinger * add additional environmentVariables to values and add them to the server-container of the pod Signed-off-by: stoetti * merge cetic-master Signed-off-by: stoetti --- README.md | 2 ++ templates/statefulset.yaml | 3 +++ values.yaml | 17 ++++++++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f26ad6a..93c85c18 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,8 @@ The following table lists the configurable parameters of the nifi chart and the | `extraVolumes` | Additional Volumes available within the pod (see [spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#volume-v1-core) for format) | `[]` | | **extraVolumeMounts** | | `extraVolumeMounts` | VolumeMounts for the nifi-server container (see [spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#volumemount-v1-core) for details) | `[]` | +| **environmentVariables** | +| `environmentVariables` | Additional environment variables for the nifi-container (see [spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#envvar-v1-core) for details) | `[]` | | **zookeeper** | |`zookeeper.enabled` | If true, deploy Zookeeper | `true` | |`zookeeper.url` | If the Zookeeper Chart is disabled a URL and port are required to connect | `nil` | diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index a6e1de7c..70b4f8ea 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -145,6 +145,9 @@ spec: env: - name: NIFI_ZOOKEEPER_CONNECT_STRING value: {{ template "zookeeper.url" . }} +{{- if .Values.environmentVariables }} +{{ toYaml .Values.environmentVariables | indent 8 }} +{{- end }} lifecycle: preStop: exec: diff --git a/values.yaml b/values.yaml index d16f5f0c..015d6031 100644 --- a/values.yaml +++ b/values.yaml @@ -97,7 +97,20 @@ service: ## # loadBalancerSourceRanges: # - 10.10.10.0/24 - + + # Enables additional port/ports to nifi service for internal processors + processors: + enabled: false + ports: + - name: processor01 + port: 7001 + targetPort: 7001 + #nodePort: 30701 + - name: processor02 + port: 7002 + targetPort: 7002 + #nodePort: 30702 + # Enables additional port/ports to nifi service for internal processors processors: enabled: false @@ -203,6 +216,8 @@ extraVolumeMounts: [] extraVolumes: [] +environmentVariables: [] + # ------------------------------------------------------------------------------ # Zookeeper: # ------------------------------------------------------------------------------