You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Resync Cargo.nix
* Add Kubernetes state provider
* Use raw strings to clean up escaping...
* Prefix the Kubernetes state configmaps by the actual stacklet name, rather than hard-coding it
* Make clustering mode configurable, add Kubernetes mode
* Regenerate CRD
* Rewrite zookeeperConfigMapName docs to emphasize that it is optional for NiFi 2.x
* Update docs to mention Kubernetes backend
* Rename clustering_mode to clustering_backend
* Make the nifi prepare script more idempotent
Previously, these bits would error when re-executed, causing confusing
errors when templating fails.
* Only include the used cluster state provider in xml config
* Add test
Copied from smoke since I'm not aware of a native way to exclude
specific dimension combinations.
* Explicitly fail when trying to use NiFi 1.x in zookeeperless mode
* Minor docs rewording
* Fix a compile error that I missed
* refmt with the right rustfmt version
* refmt python
* Changelog
* Update CHANGELOG.md
Co-authored-by: Malte Sander <[email protected]>
* split smoke test into v1 and v2
* newline
* rename dimensions
* remove trailing spaces
* Formatting
---------
Co-authored-by: Malte Sander <[email protected]>
Copy file name to clipboardExpand all lines: deploy/helm/nifi-operator/crds/crds.yaml
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,10 @@ spec:
26
26
description: A NiFi cluster stacklet. This resource is managed by the Stackable operator for Apache NiFi. Find more information on how to use it and the resources that the operator generates in the [operator documentation](https://docs.stackable.tech/home/nightly/nifi/).
27
27
properties:
28
28
clusterConfig:
29
+
anyOf:
30
+
- required:
31
+
- zookeeperConfigMapName
32
+
- {}
29
33
description: Settings that affect all roles and role groups. The settings in the `clusterConfig` are cluster wide settings that do not need to be configurable at role or role group level.
30
34
properties:
31
35
authentication:
@@ -194,12 +198,14 @@ spec:
194
198
nullable: true
195
199
type: string
196
200
zookeeperConfigMapName:
197
-
description: NiFi requires a ZooKeeper cluster connection to run. Provide the name of the ZooKeeper [discovery ConfigMap](https://docs.stackable.tech/home/nightly/concepts/service_discovery) here. When using the [Stackable operator for Apache ZooKeeper](https://docs.stackable.tech/home/nightly/zookeeper/) to deploy a ZooKeeper cluster, this will simply be the name of your ZookeeperCluster resource.
201
+
description: |-
202
+
NiFi can either use ZooKeeper or Kubernetes for managing its cluster state. To use ZooKeeper, provide the name of the ZooKeeper [discovery ConfigMap](https://docs.stackable.tech/home/nightly/concepts/service_discovery) here. When using the [Stackable operator for Apache ZooKeeper](https://docs.stackable.tech/home/nightly/zookeeper/) to deploy a ZooKeeper cluster, this will simply be the name of your ZookeeperCluster resource.
203
+
204
+
The Kubernetes provider will be used if this field is unset. Kubernetes is only supported for NiFi 2.x and newer, NiFi 1.x requires ZooKeeper.
Copy file name to clipboardExpand all lines: deploy/helm/nifi-operator/templates/roles.yaml
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -133,9 +133,11 @@ rules:
133
133
- apiGroups:
134
134
- ""
135
135
resources:
136
-
- configmaps
137
136
- secrets
138
137
- serviceaccounts
138
+
# This is redundant with the rule for specifically about configmaps
139
+
# (due to clustering), but we read them for other purposes too
140
+
- configmaps
139
141
verbs:
140
142
- get
141
143
- apiGroups:
@@ -144,6 +146,29 @@ rules:
144
146
- events
145
147
verbs:
146
148
- create
149
+
# Required for Kubernetes-managed clustering, see https://nifi.apache.org/nifi-docs/administration-guide.html#kubernetes-clustering
150
+
- apiGroups:
151
+
- coordination.k8s.io
152
+
resources:
153
+
- leases
154
+
verbs:
155
+
- create
156
+
- get
157
+
- update
158
+
# undocumented but required
159
+
- patch
160
+
# Required for Kubernetes cluster state provider, see https://nifi.apache.org/nifi-docs/administration-guide.html#kubernetes-configmap-cluster-state-provider
161
+
- apiGroups:
162
+
- ""
163
+
resources:
164
+
- configmaps
165
+
verbs:
166
+
- create
167
+
- delete
168
+
- get
169
+
- list
170
+
- patch
171
+
- update
147
172
{{ if .Capabilities.APIVersions.Has "security.openshift.io/v1" }}
Apache NiFi requires{empty}footnote:[Apache NiFi also supports a single-node mode with no cluster backend, but this is not supported by the Stackable Operator for Apache NiFi. The Stackable Operator does require a cluster backend.] an external backend for state management and leader election.
6
+
7
+
Currently, the Stackable Operator for Apache NiFi supports the following backends:
8
+
9
+
- xref:#backend-kubernetes[]
10
+
- xref:#backend-zookeeper[]
11
+
12
+
CAUTION: The cluster backend of an existing cluster should never be changed. Otherwise data loss may occur, both due to losing NiFi processor state, and due to potential split-brain scenarios during the migration.
13
+
14
+
[#backend-kubernetes]
15
+
== Kubernetes
16
+
17
+
NOTE: The Kubernetes provider is only supported by Apache NiFi 2.0 or newer. When using NiFi 1.x, use the xref:#backend-zookeeper[] backend instead.
18
+
19
+
The Kubernetes backend is used by default (unless the xref:#backend-zookeeper[] backend is configured), and stores all state in Kubernetes objects, in the same namespace as the `NifiCluster` object.
20
+
21
+
It takes no configuration.
22
+
23
+
[#backend-zookeeper]
24
+
== Apache ZooKeeper
25
+
26
+
NiFi can also be configured to store its state in Apache ZooKeeper.
27
+
28
+
NiFi in cluster mode requires an Apache ZooKeeper ensemble for state management and leader election purposes, the Stackable operator for Apache NiFi does not support single node deployments without ZooKeeper, hence this is a required setting.
29
+
30
+
This is enabled by setting the `spec.clusterConfig.zookeeperConfigMapName` to a xref:concepts:service-discovery.adoc[discovery ConfigMap]:
31
+
32
+
[source,yaml]
33
+
----
34
+
spec:
35
+
clusterConfig:
36
+
zookeeperConfigMapName: simple-nifi-znode
37
+
----
38
+
39
+
The ConfigMap needs to contain two keys: `ZOOKEEPER_HOSTS` containing the value being the ZooKeeper connection string, and `ZOOKEEPER_CHROOT` containing the ZooKeeper chroot.
40
+
41
+
The xref:zookeeper:index.adoc[Stackable operator for Apache ZooKeeper] automatically creates this ConfigMap for every ZookeeperZnode object.
0 commit comments