From afed333f05d6b6b16be1f0d98f3a122ed525dd8d Mon Sep 17 00:00:00 2001 From: Alexandre Nuttinck Date: Tue, 27 Aug 2019 11:25:41 +0200 Subject: [PATCH] include additional libraries using postStart #5 --- Chart.yaml | 2 +- README.md | 2 ++ templates/statefulset.yaml | 5 +++++ values.yaml | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 87fbec4a..e36c5614 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,5 +1,5 @@ name: nifi -version: 0.1.5 +version: 0.1.6 appVersion: 1.9.2 description: Apache NiFi is a software project from the Apache Software Foundation designed to automate the flow of data between software systems. keywords: diff --git a/README.md b/README.md index baf916cf..23c6b9bc 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,8 @@ The following table lists the configurable parameters of the nifi chart and the | `auth.ldap.host` | ldap hostname | `ldap://:` | | `auth.ldap.searchBase` | ldap searchBase | `CN=Users,DC=example,DC=com` | | `auth.ldap.searchFilter` | ldap searchFilter | `CN=john` | +| **postStart** | +| `postStart` | Include additional libraries in the Nifi containers by using the postStart handler | `nil` | | **Service** | | `service.headless.type` | Type of the headless service for nifi | `ClusterIP` | | `service.loadBalancer.enabled` | Enable the LoadBalancerIP service | `true` | diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index fa54f693..0f721250 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -138,6 +138,11 @@ spec: - -c - | $NIFI_HOME/bin/nifi.sh stop +{{- if .Values.postStart }} + postStart: + exec: + command: ["/bin/sh", "-c", {{ .Values.postStart | quote }}] +{{- end }} readinessProbe: initialDelaySeconds: 60 periodSeconds: 20 diff --git a/values.yaml b/values.yaml index b68a29a8..90d6eb86 100644 --- a/values.yaml +++ b/values.yaml @@ -41,6 +41,10 @@ properties: port: 10000 authorizer: managed-authorizer +## Include additional libraries in the Nifi containers by using the postStart handler +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/ +# postStart: /opt/nifi/psql; wget -P /opt/nifi/psql https://jdbc.postgresql.org/download/postgresql-42.2.6.jar + # Nifi User Authentication auth: ldap: