-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[bitnami/kafka] Adding option to gracefully shutdown sidecar container in provisioning pod #5835
Comments
Hi @nc-ruth Thanks for bringing up this topic! First of all, our charts are not designed to work with Istio. That said, they can be integrated with Istio since they can be extended adding custom sidecar containers, labels, annotations, etc. Sticking to the topic you brought up, please correct me if I'm wrong but basically your goal is to mark the provisioning job as "completed" regardless the state of the sidecar container that Istio injects in every pod, right?
What is the purpose of this? Doing some "curl" call that shutdowns the Istio sidecar? I guess we could implement some |
Hi @juan131, Thank you very much for your answer! I completely understand that your charts are not designed to work with Istio, and it's a bonus if it works with Istio. I make sense that your pipelines does not test the Kafka chart with Istio integration, and it makes no sense to do so. I mean, there is a lot of integrations, and if your pipeline had to test each one out (and in combination), it would be a nightmare. I understand that you can't guarantee the compability with Istio in the future. Back to the topic, the solution you are bringing up will solve our issue (the usecase). This is actually the solution I prefer. Is there any other charts, that have some similar implementation with provisioning.command / provisioning.args? How would it work, if it is only extending the already supported and tested command (within your pipeline)? |
Hi @nc-ruth Thanks for your consideration. Regarding the issue, please take a look to the PR I just created. Using these changes, you should be able to set in your values.yaml any custom command or args you want to use in the provisioning container. |
Hi @juan131, Thank you for the PR! I have pulled down your PR, and tested the base case (without any args or commands specified) and it works well. What is needed for this PR to be accepted and merged into master? Once again, thank you for the PR and answers :) values.yaml file that uses
|
Hi @nc-ruth The PR was just merged! Thanks for your feedback and helping us to improve the chart. Thanks also for sharing the values.yaml you used to manage the Istio integration! |
Which chart:
Bitnami Kafka 12.11.1
Is your feature request related to a problem? Please describe.
My cluster is using Istio for traffic control/shaping, and Kafka works really well with Istio.
I have an issue with the provisioning job, the provisioning job is not marked as completed due to the sidecar container staying in a running state.
See more about the issue here:
istio/istio#11659
istio/istio#15041
istio/istio#6324
Describe the solution you'd like
I see two different approaches that might solve the issue:
Allow the provisioning job to run without the Istio sidecar.
With the use of podAnnotations to the pod generated by the kafka-provisioning job, and adding the annotation:
sidecar.istio.io/inject: "false" (See example here: istio/istio#11659 (comment) )
The disadvantage with this approach is:
The advantage with this approach is:
Allow the provisioning job to run code after finished provisioning of topics.
I don't know how to implement this, the most efficient way?
Describe alternatives you've considered
I have exec'ed into the sidecar container, and curl'ed to quitquitquit endpoint, which afterwards shutdowns the sidecar container and completes the job successfully.
Additional context
Add any other context or screenshots about the feature request here.
kubectl get pods
kubectl logs <topic-provisioning-pod> # just finished
kubectl get pods # after the provisioning job is done
kubectl describe pod <topic-provisioning-pod> # just finished provisioning topics - shows the provisioning container state
kubectl describe pod <topic-provisioning-pod> # just finished provisioning topics - shows the Istio sidecar container state
kubectl exec -it <topic-provisioning-pod> -c istio-proxy -- curl -fsI -X POST http://localhost:15020/quitquitquit
kubectl get pods # after sidecar has been terminated
The text was updated successfully, but these errors were encountered: