Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
### Changed

- `operator-rs` `0.10.0` -> `0.15.0` ([#218], [#223], [#230]).
- [BREAKING] Specifying the product version has been changed to adhere to [ADR018](https://docs.stackable.tech/home/contributor/adr/ADR018-product_image_versioning.html) instead of just specifying the product version you will now have to add the Stackable image version as well, so `version: 3.5.8` becomes (for example) `version: 3.5.8-stackable0.1.0` ([#270])

### Removed

Expand All @@ -23,6 +24,7 @@ All notable changes to this project will be documented in this file.
[#218]: https://github.com/stackabletech/nifi-operator/pull/218
[#223]: https://github.com/stackabletech/nifi-operator/pull/223
[#230]: https://github.com/stackabletech/nifi-operator/pull/230
[#270]: https://github.com/stackabletech/nifi-operator/pull/270

## [0.5.0] - 2022-02-14

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/config_properties.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ kind: NifiCluster
metadata:
name: simple-nifi
spec:
version: "1.15.0"
version: "1.15.0-stackable0.4.0"
zookeeperConfigMapName: simple-nifi-znode
authenticationConfig:
method:
Expand Down
9 changes: 7 additions & 2 deletions docs/modules/ROOT/pages/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ If you are not installing the operator using Helm then after installation the CR

kubectl apply -f deploy/nificluster.yaml

To create a three-node Apache NiFi (v1.15.0) cluster with SingleUser authentication enabled apply the following to your Kubernetes cluster.
To create a three-node Apache NiFi cluster with SingleUser authentication enabled apply the following to your Kubernetes cluster.

Please note that the version you need to specify is not only the version of NiFi which you want to roll out, but has to be amended with a Stackable version as shown.
This Stackable version is the version of the underlying container image which is used to execute the processes.
For a list of available versions please check our https://repo.stackable.tech/#browse/browse:docker:v2%2Fstackable%2Fnifi%2Ftags[image registry].
It should generally be safe to simply use the latest image version that is available.

The admin credentials that you can then log in with are: `admin:supersecretpassword`

Expand All @@ -22,7 +27,7 @@ kind: NifiCluster
metadata:
name: simple-nifi
spec:
version: "1.15.0"
version: "1.15.0-stackable0.4.0"
zookeeperConfigMapName: simple-nifi-znode
authenticationConfig:
method:
Expand Down
4 changes: 2 additions & 2 deletions examples/simple-nifi-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kind: ZookeeperCluster
metadata:
name: simple-zk
spec:
version: 3.5.8
version: 3.5.8-stackable0.7.0
servers:
roleGroups:
default:
Expand Down Expand Up @@ -37,7 +37,7 @@ kind: NifiCluster
metadata:
name: simple-nifi
spec:
version: "1.15.0"
version: "1.15.0-stackable0.4.0"
zookeeperConfigMapName: simple-nifi-znode
authenticationConfig:
method:
Expand Down
5 changes: 1 addition & 4 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,7 @@ fn build_node_rolegroup_statefulset(
.get(&rolegroup_ref.role_group);

let nifi_version = nifi_version(nifi)?;
let image = format!(
"docker.stackable.tech/stackable/nifi:{}-stackable0",
nifi_version
);
let image = format!("docker.stackable.tech/stackable/nifi:{}", nifi_version);

let node_address = format!(
"$POD_NAME.{}-node-{}.{}.svc.cluster.local",
Expand Down
Empty file removed tests/templates/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions tests/templates/kuttl/smoke/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-zk-server-default
status:
readyReplicas: 1
replicas: 1
22 changes: 22 additions & 0 deletions tests/templates/kuttl/smoke/00-install-zk.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: zookeeper.stackable.tech/v1alpha1
kind: ZookeeperCluster
metadata:
name: test-zk
spec:
servers:
roleGroups:
default:
replicas: 1
config:
myidOffset: 10
version: {{ test_scenario['values']['zookeeper'] }}
stopped: false
---
apiVersion: zookeeper.stackable.tech/v1alpha1
kind: ZookeeperZnode
metadata:
name: test-nifi-znode
spec:
clusterRef:
name: test-zk
14 changes: 14 additions & 0 deletions tests/templates/kuttl/smoke/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
metadata:
name: install-nifi
timeout: 1200
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-nifi-node-default
status:
readyReplicas: 2
replicas: 2
41 changes: 41 additions & 0 deletions tests/templates/kuttl/smoke/01-install-nifi.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
apiVersion: v1
kind: Secret
metadata:
name: nifi-admin-credentials-simple
stringData:
username: admin
password: supersecretpassword
---
apiVersion: v1
kind: Secret
metadata:
name: nifi-sensitive-property-key
stringData:
nifiSensitivePropsKey: mYsUp3rS3cr3tk3y
---
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: test-nifi
spec:
version: {{ test_scenario['values']['nifi'] }}
zookeeperConfigMapName: test-nifi-znode
authenticationConfig:
method:
SingleUser:
adminCredentialsSecret:
name: nifi-admin-credentials-simple
sensitivePropertiesConfig:
keySecret: nifi-sensitive-property-key
nodes:
roleGroups:
default:
selector:
matchLabels:
kubernetes.io/os: linux
config:
log:
rootLogLevel: INFO
replicas: 2

8 changes: 8 additions & 0 deletions tests/templates/kuttl/smoke/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-nifi-node-default
status:
readyReplicas: 3
replicas: 3
25 changes: 25 additions & 0 deletions tests/templates/kuttl/smoke/02-scale-up-nifi.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: test-nifi
spec:
version: {{ test_scenario['values']['nifi'] }}
zookeeperConfigMapName: test-nifi-znode
authenticationConfig:
method:
SingleUser:
adminCredentialsSecret:
name: nifi-admin-credentials-simple
sensitivePropertiesConfig:
keySecret: nifi-sensitive-property-key
nodes:
roleGroups:
default:
selector:
matchLabels:
kubernetes.io/os: linux
config:
log:
rootLogLevel: INFO
replicas: 3
14 changes: 14 additions & 0 deletions tests/templates/kuttl/smoke/03-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
metadata:
name: install-test-nifi
timeout: 300
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-nifi
status:
readyReplicas: 1
replicas: 1
22 changes: 22 additions & 0 deletions tests/templates/kuttl/smoke/03-install-test-nifi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-nifi
labels:
app: test-nifi
spec:
replicas: 1
selector:
matchLabels:
app: test-nifi
template:
metadata:
labels:
app: test-nifi
spec:
containers:
- name: test-nifi
image: python:3.10-slim
stdin: true
tty: true
8 changes: 8 additions & 0 deletions tests/templates/kuttl/smoke/04-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
metadata:
name: test-nifi
commands:
- script: kubectl exec -n $NAMESPACE test-nifi-0 -- python /tmp/test_nifi.py -u admin -p supersecretpassword -n $NAMESPACE
- script: kubectl exec -n $NAMESPACE test-nifi-0 -- python /tmp/test_nifi_metrics.py -n $NAMESPACE
9 changes: 9 additions & 0 deletions tests/templates/kuttl/smoke/04-prepare-test-nifi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: kubectl cp -n $NAMESPACE ./test_nifi_metrics.py test-nifi-0:/tmp
- script: kubectl cp -n $NAMESPACE ./test_nifi.py test-nifi-0:/tmp
- script: kubectl cp -n $NAMESPACE ./cacert.pem test-nifi-0:/tmp
- script: kubectl cp -n $NAMESPACE ./requirements.txt test-nifi-0:/tmp
- script: kubectl exec -n $NAMESPACE test-nifi-0 -- pip install --user -r /tmp/requirements.txt
38 changes: 38 additions & 0 deletions tests/templates/kuttl/smoke/05-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
apiVersion: v1
kind: Event
reason: Started
source:
component: kubelet
involvedObject:
apiVersion: v1
kind: Pod
name: test-nifi-node-default-0
---
apiVersion: v1
kind: Event
reason: Started
source:
component: kubelet
involvedObject:
apiVersion: v1
kind: Pod
name: test-nifi-node-default-1
---
apiVersion: v1
kind: Event
reason: Started
source:
component: kubelet
involvedObject:
apiVersion: v1
kind: Pod
name: test-nifi-node-default-2
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-nifi-node-default
status:
readyReplicas: 3
replicas: 3
30 changes: 30 additions & 0 deletions tests/templates/kuttl/smoke/05-enable-anonymous.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: test-nifi
spec:
version: {{ test_scenario['values']['nifi'] }}
zookeeperConfigMapName: test-nifi-znode
authenticationConfig:
method:
SingleUser:
adminCredentialsSecret:
name: nifi-admin-credentials-simple
allowAnonymousAccess: true
nodes:
roleGroups:
default:
selector:
matchLabels:
kubernetes.io/os: linux
config:
sensitivePropertyKeySecret: nifi-sensitive-property-key
log:
rootLogLevel: INFO
replicas: 2
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl rollout restart statefulset test-nifi-node-default --namespace $NAMESPACE
20 changes: 20 additions & 0 deletions tests/templates/kuttl/smoke/cacert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDVTCCAj2gAwIBAgIJAJ8/0entaUgnMA0GCSqGSIb3DQ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EfbHYXtTfMbi01Wi5TtVhFCjyXK6KDsqSgU+9McExIy70k=
-----END CERTIFICATE-----
1 change: 1 addition & 0 deletions tests/templates/kuttl/smoke/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests==2.27.1
Loading