Configuring NiFi properties

Learn how to override default NiFi configuration settings provided by Cloudera Flow Management - Kubernetes Operator from the CR file.

NiFI settings are available as part of the specification, under the configOverride key. They can be provided in one of the following ways:

  • inline,
  • as a ConfigMap
  • as a Secret
spec:
  configOverride:
    nifiProperties:
      upsert:
        nifi.cluster.load.balance.connections.per.node: "1"
        nifi.cluster.load.balance.max.thread.count: "4"
        nifi.cluster.node.connection.timeout: "60 secs"
        nifi.cluster.node.read.timeout: "60 secs"
    bootstrapConf:
      upsert:
        java.arg.2: -Xms2g
        java.arg.3: -Xmx2g
        java.arg.13: -XX:+UseConcMarkSweepGC

Overriding NiFi settings using ConfigMaps and Secrets

Learn about overriding default NiFi settings using ConfigMaps and Secrets.

The ConfigMap or Secret values are available to inject into the environment for the following files:

  • authorizers.xml

  • bootstrap.conf

  • logback.xml

  • login-identity-providers.xml

  • nifi.properties

  • state-management.xml

Each of these config overrides must be in an individual ConfigMap with the key being the filename to be replaced. Using this ConfigMap or Secret reference method entirely overrides the defaults provided by the Cloudera Flow Management - Kubernetes Operator, which may impact cluster operation.

NiFiSpec
spec:
  configOverride:
    authorizersObjectReference:
      kind: "ConfigMap"
      name: "custom-authorizers"

ConfigMapSpec
data:
  authorizers.xml: |
      <authorizers>
        <authorizer>
          <identifier>single-user-authorizer</identifier>
          <class>org.apache.nifi.authorization.single.user.SingleUserAuthorizer</class>
        </authorizer>
      </authorizers>