-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat(operator): update pod definition and nifi reconciliation for istio compatibility #476
feat(operator): update pod definition and nifi reconciliation for istio compatibility #476
Conversation
Worth mentioning that I tested this with zookeeper (1.28.0, 2.0.0) as well as the new kubernetes state management (2.0.0) |
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.
Can you update the CHANGELOG.md
file to reflect your changes?
Can you explain me why these changes are necessary for Istio? |
And can also rebase your PR and check if everything is still fine (we never know 😀). |
When using an init container that requires network connectivity, and in an environment with restrictive |
…io compatibility this pushes the zk connectivity check into the pod command instead of the init container and removes istio overrides from reconciliation checks relates to konpyutaika#172
ba59f14
to
66db052
Compare
The other changes relate to the mutations performed on the pod by istio injection. This causes the reconciler to incorrectly flag the pods as out of sync and constantly recreates them as a result. By adjusting the "desired" pod spec to include the mutated parts of the pod, this reconciliation infinite loop is fixed. |
Co-authored-by: Juldrixx <[email protected]>
Thanks for the contribution. Will merge after the pipeline ends. |
What's in this PR?
This pushes the zookeeper connectivity check into the pod command instead of the init container. Because the nifi image doesn't have netcat, the implementation was adjusted to use
curl
with a telnet address and a bad option so it immediately terminates the connection. This results in a specific exit code48
when the connectivity check passes. However, the overall logic is unchanged.The reconciliation checks were also adjusted to remove prometheus annotations and the liveness probe definition from consideration when checking for the difference between the currently running and the "desired" pod state when the pod has been affected by istio injection. Additional containers present on the current pod spec are carried over to the desired pod spec to ensure injected containers don't trigger reconciliation.
Additional context
There are a couple of caveats with this approach to Istio compatibility that are important to call out. I believe these can be addressed via an architecture change to utilize a
StatefulSet
over reconciling the individual pods directly, but that was out of scope for what I'm trying to accomplish with this PR.Checklist
To Do