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
Fix CLI failed to set up port-forwarding when multiple controller pods exist in the same namespace #712
Conversation
fission/portforward.go
Outdated
nsList = append(nsList, p.Namespace) | ||
} | ||
} | ||
if len(nsList) > 1 { |
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.
Don't you have to handle the case where there are more pods but only one namespace? For some reason, just in case it happens? In that case you have to talk to any pod that's in a healthy state...
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.
Thank for pointing that out! Just push a new commit to fix the problem.
f821c33
to
b163931
Compare
b163931
to
c770f2f
Compare
LGTM |
…s exist in the same namespace (fission#712) * Fix CLI failed to set up port-forwarding when multiple controller pods exist in the same namespace * Check pod healthy state before establishing the connection
Root cause
runPortForward
only checks amount of controllers not the namespaceSolution
Use map to filter same namespace and check length of namespace list.
This change is