Description
What steps will reproduce the bug?
I'm using nifikop to deploy a nifi cluster with 4 nifi nodes and 3 zookeper nodes.
I discovered that the nifi cluster is consuming between 7x to 10x times the cpu.
Looking to logs and statistics I found that the operator is doing a lot of calls to NiFi APIs and this generates the CPU consumption.
The main issue is that all these API calls are done during the reconcile loop with a frequency that is quite aggressive.
Killing the operator the CPU usage is collapsing
What is the expected behavior?
A Nifi Cluster with 4 nodes in idle usually consumes around 0,5 cpus
What do you see instead?
The same cluster with the operator consumes between 3 CPU and 5 CPU
Possible solution
Try to distinguish between a reconcile rerun during a the setup phase and the reconceile run interval during "idle" state, so that you can relax the frequancy of API calls during in idle state
NiFiKop version
v1.10.0
Golang version
1.19
Kubernetes version
v1.26.0
NiFi version
1.27.0
Additional context
No response