nifi

by Helm

Helm chartv1.2.1App 1.23.2Apache-2.0

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

$${\color{red}Maintainers \space Wanted}$$

$${\color{red}This \space project \space is \space not \space maintained \space anymore.}$$

If you are interested in maintaining a fork of this project, please chime in in the dedicated issue.

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 StorageClass is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the persistence.storageClass setting.

Configure authentication

  • By default, the authentication is a Single-User authentication. You can optionally enable ldap or oidc to 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.enabled to 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 to true and 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.

ParameterDescriptionDefault
ReplicaCount
replicaCountNumber of nifi nodes1
Image
image.repositorynifi Image nameapache/nifi
image.tagnifi Image tag1.23.2
image.pullPolicynifi Image pull policyIfNotPresent
image.pullSecretnifi Image pull secretnil
SecurityContext
securityContext.runAsUsernifi Docker User1000
securityContext.fsGroupnifi Docker Group1000
sts
sts.useHostNetworkIf true, use the host's networknil
sts.serviceAccount.createIf true, a service account will be created and used by the statefulsetfalse
sts.serviceAccount.nameWhen 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 optionsnil
sts.serviceAccount.annotationsService account annotations{}
sts.podManagementPolicyParallel podManagementPolicyParallel
sts.AntiAffinityAffinity for pod assignmentsoft
sts.pod.annotationsPod template annotationssecurity.alpha.kubernetes.io/sysctls: net.ipv4.ip_local_port_range=10000 65000
sts.hostAliases Add entries to Pod /etc/hosts[]
sts.startupProbe.enabledenable Startup Probe on Nifi server containerfalse
sts.startupProbe.failureThresholdsets Startup Probe failureThreshold field value60
sts.startupProbe.periodSecondssets Startup Probe periodSeconds field value10
secrets
secretsPass any secrets to the nifi pods. The secret can also be mounted to a specific path if required.nil
configmaps
configmapsPass any configmaps to the nifi pods. The configmap can also be mounted to a specific path if required.nil
nifi properties
properties.algorithmEncryption methodNIFI_PBKDF2_AES_GCM_256
properties.sensitiveKeyEncryption password (at least 12 characters)changeMechangeMe
properties.sensitiveKeySetFileUpdate Sensitive Properties Key if this file does not exist, and then create it.nil
properties.sensitiveKeyPriorPrior sensitiveKey when updating via sensitiveKeySetFile mechanismnil
properties.externalSecureexternalSecure for when inbound SSLfalse
properties.isNodecluster node properties (only configure for cluster nodes)false
properties.httpPortweb properties HTTP port8080
properties.httpsPortweb properties HTTPS portnull
properties.clusterPortcluster node port6007
properties.clusterNodeConnectionTimeoutcluster node connection timeout5 sec
properties.clusterNodeReadTimeoutcluster node read timeout5 sec
properties.zookeeperConnectTimeoutzookeeper connect timeout3 secs
properties.zookeeperSessionTimeoutzookeeper session timeout3 secs
properties.archiveMaxRetentionPeriodnifi content repository archive max retention period3 days
properties.archiveMaxUsagePercentagenifi content repository archive max usage

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnifi is pinned at v1.2.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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