nifi
by RADAR-Base
Apache NiFi is a software project from the Apache Software Foundation designed to automate the flow of data between software systems.
About this chart
Helm Chart for Apache NiFi
Introduction
This Helm chart installs Apache NiFi 1.23.2 in a Kubernetes cluster.
Prerequisites
- Kubernetes cluster 1.10+
- Helm 3.0.0+
- Persistent Volumes (PV) provisioner support in the underlying infrastructure.
Installation
Add Helm repository
helm repo add cetic https://cetic.github.io/helm-charts
helm repo update
Configure the chart
The following items can be set via --set flag during installation or configured by editing the values.yaml file directly (need to download the chart first).
Configure how to expose nifi service
- Ingress: The ingress controller must be installed in the Kubernetes cluster.
- ClusterIP: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster.
- NodePort: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting
NodeIP:NodePort. - LoadBalancer: Exposes the service externally using a cloud provider’s load balancer.
Configure how to persist data
- Disable(default): The data does not survive the termination of a pod.
- Persistent Volume Claim: Enable persistence so that data survives termination of the pod. There is the choice of using one large persistent volume (using subPath) or seven separate persistent volumes for config, data, logs, repos, etc.
A default
StorageClassis needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in thepersistence.storageClasssetting.
Configure authentication
- By default, the authentication is a
Single-Userauthentication. You can optionally enableldaporoidcto provide an external authentication. See the configuration section or doc folder for more details.
Use custom processors
To add custom processors, the values.yaml file nifi section should contain the following options, where CUSTOM_LIB_FOLDER should be replaced by the path where the libs are:
extraVolumeMounts:
- name: mycustomlibs
mountPath: /opt/configuration_resources/custom_lib
extraVolumes: # this will create the volume from the directory
- name: mycustomlibs
hostPath:
path: "CUSTOM_LIB_FOLDER"
properties:
customLibPath: "/opt/configuration_resources/custom_lib"
Configure prometheus monitoring
- You first need monitoring to be enabled which can be accomplished by enabling the appropriate metrics flag (
metrics.prometheus.enabledto true). To enable the creation of prometheus metrics within Nifi we need to create a Reporting Task. Login to the Nifi UI and go to the Hamburger menu on the top right corner, click Controller Settings --> Reporting Tasks After that use the + icon to add a task. Click on the Reporting in the wordcloud on the left and select PrometheusReportingTask --> change Send JVM metrics totrueand click on the play button to enable this task.
If you plan to use Grafana for the visualization of the metrics data the following dashboard is compatible with the exposed metrics.
Install the chart
Install the nifi helm chart with a release name my-release:
helm install my-release cetic/nifi
Install from local clone
You will find how to perform an installation from a local clone on this page.
Uninstallation
To uninstall/delete the my-release deployment:
helm uninstall my-release
Configuration
The following table lists the configurable parameters of the nifi chart and the default values.
| Parameter | Description | Default |
|---|---|---|
| ReplicaCount | ||
replicaCount | Number of nifi nodes | 1 |
| Image | ||
image.repository | nifi Image name | apache/nifi |
image.tag | nifi Image tag | 1.23.2 |
image.pullPolicy | nifi Image pull policy | IfNotPresent |
image.pullSecret | nifi Image pull secret | nil |
| SecurityContext | ||
securityContext.runAsUser | nifi Docker User | 1000 |
securityContext.fsGroup | nifi Docker Group | 1000 |
| sts | ||
sts.useHostNetwork | If true, use the host's network | nil |
sts.serviceAccount.create | If true, a service account will be created and used by the statefulset | false |
sts.serviceAccount.name | When set, the set name will be used as the service account name. If a value is not provided a name will be generated based on Chart options | nil |
sts.serviceAccount.annotations | Service account annotations | {} |
sts.podManagementPolicy | Parallel podManagementPolicy | Parallel |
sts.AntiAffinity | Affinity for pod assignment | soft |
sts.pod.annotations | Pod template annotations | security.alpha.kubernetes.io/sysctls: net.ipv4.ip_local_port_range=10000 65000 |
sts.hostAliases | Add entries to Pod /etc/hosts | [] |
sts.startupProbe.enabled | enable Startup Probe on Nifi server container | false |
sts.startupProbe.failureThreshold | sets Startup Probe failureThreshold field value | 60 |
sts.startupProbe.periodSeconds | sets Startup Probe periodSeconds field value | 10 |
| secrets | ||
secrets | Pass any secrets to the nifi pods. The secret can also be mounted to a specific path if required. | nil |
| configmaps | ||
configmaps | Pass any configmaps to the nifi pods. The configmap can also be mounted to a specific path if required. | nil |
| nifi properties | ||
properties.algorithm | Encryption method | NIFI_PBKDF2_AES_GCM_256 |
properties.sensitiveKey | Encryption password (at least 12 characters) | changeMechangeMe |
properties.sensitiveKeySetFile | Update Sensitive Properties Key if this file does not exist, and then create it. | nil |
properties.sensitiveKeyPrior | Prior sensitiveKey when updating via sensitiveKeySetFile mechanism | nil |
properties.externalSecure | externalSecure for when inbound SSL | false |
properties.isNode | cluster node properties (only configure for cluster nodes) | false |
properties.httpPort | web properties HTTP port | 8080 |
properties.httpsPort | web properties HTTPS port | null |
properties.clusterPort | cluster node port | 6007 |
properties.clusterNodeConnectionTimeout | cluster node connection timeout | 5 sec |
properties.clusterNodeReadTimeout | cluster node read timeout | 5 sec |
properties.zookeeperConnectTimeout | zookeeper connect timeout | 3 secs |
properties.zookeeperSessionTimeout | zookeeper session timeout | 3 secs |
properties.archiveMaxRetentionPeriod | nifi content repository archive max retention period | 3 days |
properties.archiveMaxUsagePercentage | nifi content repository archive max usage | 85% |
properties.provenanceStorage | nifi provenance repository max storage size | 8 GB |
properties.provenanceMaxStorageTime | nifi provenance repository max storage time | 10 days |
properties.flowArchiveMaxTime | nifi flow archive max time |
Deploy nifi with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nifi on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartnifi is pinned at v1.2.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply