The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes. Apache NiFI is a free, open-source solution that support powerful and scalable directed graphs of data routing, transformation, and system mediation logic.
Scenario: Provision a dataflow version controlled in NiFi Registry which does not require any parameters via the parameter context.
Bug: It's not possible to configure an empty parameter context with a dataflow. If you do attempt to configure an empty parameter context, the nifikop Dataflow controller finds itself in an infinite failing reconciliation loop. The NiFiParameterContext attributes parameters and secretRefs are documented as optional, but if you don't provide them (or at least provide 1 property) then the operator finds itself in this failure loop.
One issue is despite parameters being documented as optional, you must actually provide at least an empty list or resource creation fails. You need not provide a secretRefs. Additionally, if you provide an empty list for parameters, then understandably nifikop does not create a ParameterContext in NiFi. Due to this, when nifikop actually deploys the dataflow (the creation of which succeeds), it cannot subsequently reconcile the state since there's no parameter context configured in NiFi -- empty or otherwise.
Basically, when there's no parameter context in NiFi then the operator can't reconcile the state of the dataflow deployed.
I'd consider this low priority and easily avoidable by providing a dummy property in the parameter context, but it is a bug nonetheless. Perhaps NiFiParameterContext should enforce that at least one property is provided or, if possible, create an empty Parameter Context in NiFi.
What did you do?
A clear and concise description of the steps you took (or insert a code snippet).
and a NiFiDataFlow referencing this parameter context.
What did you expect to see?
NiFiKop correctly deploys the dataflow and reconciles the state.
What did you see instead? Under which circumstances?
Nifikop does create the dataflow in the NiFi canvas and connect to NiFiRegistry to fetch the flow. However, because the NiFiParameterContext contains no properties it does not create a parameter context in NiFi itself. This causes the nifikop dataflow controller to endlessly loop in reconciliation, never resolving the dataflow state.
Bug Report
Scenario: Provision a dataflow version controlled in NiFi Registry which does not require any parameters via the parameter context.
Bug: It's not possible to configure an empty parameter context with a dataflow. If you do attempt to configure an empty parameter context, the nifikop Dataflow controller finds itself in an infinite failing reconciliation loop. The
NiFiParameterContext
attributesparameters
andsecretRefs
are documented as optional, but if you don't provide them (or at least provide 1 property) then the operator finds itself in this failure loop.https://orange-opensource.github.io/nifikop/docs/5_references/4_nifi_parameter_context#nifiparametercontextsspec
One issue is despite
parameters
being documented as optional, you must actually provide at least an empty list or resource creation fails. You need not provide asecretRefs
. Additionally, if you provide an empty list forparameters
, then understandably nifikop does not create a ParameterContext in NiFi. Due to this, when nifikop actually deploys the dataflow (the creation of which succeeds), it cannot subsequently reconcile the state since there's no parameter context configured in NiFi -- empty or otherwise.Basically, when there's no parameter context in NiFi then the operator can't reconcile the state of the dataflow deployed.
I'd consider this low priority and easily avoidable by providing a dummy property in the parameter context, but it is a bug nonetheless. Perhaps
NiFiParameterContext
should enforce that at least one property is provided or, if possible, create an empty Parameter Context in NiFi.What did you do? A clear and concise description of the steps you took (or insert a code snippet).
Create a
NiFiParameterContext
:and a
NiFiDataFlow
referencing this parameter context.What did you expect to see?
NiFiKop correctly deploys the dataflow and reconciles the state.
What did you see instead? Under which circumstances?
Nifikop does create the dataflow in the NiFi canvas and connect to NiFiRegistry to fetch the flow. However, because the
NiFiParameterContext
contains no properties it does not create a parameter context in NiFi itself. This causes the nifikop dataflow controller to endlessly loop in reconciliation, never resolving the dataflow state.This start of the issue is here: https://github.com/Orange-OpenSource/nifikop/blob/master/controllers/nifidataflow_controller.go#L133
And then the operator logs these two messages endlessly:
"Failing" https://github.com/Orange-OpenSource/nifikop/blob/master/controllers/nifidataflow_controller.go#L269
"Synchronizing" https://github.com/Orange-OpenSource/nifikop/blob/master/controllers/nifidataflow_controller.go#L329
Environment
Kubernetes cluster kind:
NiFi version: 1.13.2
Possible Solution
Perhaps
NiFiParameterContext
should enforce that at least one property is provided or, if possible, create an empty Parameter Context in NiFi.