-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update nifi.properties template for NiFi 2.0.0-M1 #344
Conversation
nifi.cluster.is.node={{.IsNode}} | ||
nifi.cluster.node.protocol.threads=10 | ||
nifi.cluster.leader.election.implementation=CuratorLeaderElectionManager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nifi.cluster.leader.election.implementation=CuratorLeaderElectionManager | |
# TODO: implement in operator the Kubernetes integration with configmap | |
nifi.cluster.leader.election.implementation=CuratorLeaderElectionManager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm most excited to test with the ConfigMap provider so we can drop ZooKeeper all together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be done.
Should I add an example on how to do it in the documentation and mention that you need to have a ServiceAccount with the correct roles?
But I'm not sure of multiple things:
ConfigMaps
andLeases
are not uniquely named based on their cluster. So I think that if you have multiple clusters in one namespace, you can have some issues.ConfigMaps
aren't deleted with the Cluster. We don't have any way to identify theConfigMaps
associated to a cluster to delete them with it in the Operator.Leases
seem to be deleted after sometime by Kubernetes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah our docs assume you need a zookeeper, so explaining how to configure zookeeper or kubernetes would be a good idea. There's also the topic of migrating from zookeeper to kubernetes, but that is something we can address in a later PR. I don't believe it's fully implemented in NiFi, yet.
Is there an API endpoint that would provide the name of the configmap? If so, nifikop could use that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the ConfigMap, the implementation in NiFi clearly assumes only one NiFi cluster per namespace. Here's how NiFi finds the components storing state in ConfigMaps: https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-kubernetes-bundle/nifi-framework-kubernetes-state-provider/src/main/java/org/apache/nifi/kubernetes/state/provider/KubernetesConfigMapStateProvider.java#L329-L338
So this would be a new constraint users of this feature should be aware of unless the state management implementation adds a label or something to the ConfigMaps to identify them by the cluster they belong to. Honestly, i think this should be contributed to NiFi because it's an unnecessary new constraint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, that function I linked finds all component IDs (one per config map) within the namespace they get created in and it assumes there is only one NiFi cluster in the namespace. That is, there's no filter for "this NiFi cluster", for example.
IMO, NiFi should allow for multiple clusters per namespace so I think NiFi's implementation should change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started a conversation on the Slack, if you want to participate: https://apachenifi.slack.com/archives/C0L9VCD47/p1704727400482319
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jira on NiFi to implement a prefix: https://issues.apache.org/jira/browse/NIFI-12590
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can still merge this PR while a fix is implemented 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will try to do the documentation by the end of the week. And in it I will indicate the current limitation.
Is it worth looking at replacing the |
Hmm i think we ought to consider doing this as well. And NiFi 2.0.0 would be a good time to introduce breaking changes in nifikop as well, if we find that it's needed. One minor hurdle may be that NiFi doesn't currently support being entirely configured through environment variables. I think the majority of properties are covered, but it's not a general solution as it's currently written. I saw a PR last week to add support for more properties. For that reason, we may need to keep both options around. |
It's why I didn't removed them, just added the new ones. To stay compatible with previous version. |
And I'm not sure, it will work with custom image. |
2749cec
to
1875268
Compare
What's in this PR?
Update of the nifi.properties template.
Why?
To add the new properties and the changes on the old ones for
2.0.0-M1
.Checklist