-
Notifications
You must be signed in to change notification settings - Fork 54
Add container selection logic #626
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
Add container selection logic #626
Conversation
Use the logic that the first container listed will be the primary container.
src/warnet/bitcoin.py
Outdated
| try: | ||
| pod = get_pod(tank) | ||
| container_names = [container.name for container in pod.spec.containers] | ||
| container_name = container_names[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.
What determines the order of containers in a pod? Can we guarantee the one we want is always [0] because of the yaml file? Or should we hard code the name from the chart bitcoincore ?
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.
The first container has been the bitcoincore container and commander container from what I have seen, but I agree that we have no way of guaranteeing that.
I changed the logic so that we use hard coded values from the constants file which match the helm charts.
|
looks good! testing ... |
pinheadmz
left a comment
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.
👍 ACK
|
Thanks @pinheadmz I'll merge |
This fixes the logs container selection issues in #623