-
Notifications
You must be signed in to change notification settings - Fork 38
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
[KO-259] Changing ports for headless service. #250
Conversation
…t of rack level reconciliation.
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 we add/modify test-cases for testing the service update related changes?
Adding tests to validate pod service port and headless service port, to keep it simple. |
if portSet.Has(p.Port) { | ||
portSet.Delete(p.Port) | ||
} | ||
} | ||
|
||
if portSet.Len() > 0 { | ||
return fmt.Errorf("service %s port not configured correctly", serviceNamespacesName.Name) | ||
} |
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.
nit: why not just check and move the portSet outside of for loop
if !portSet.Has(p.Port) {
return fmt.Errorf()
}
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.
multiple ways to implement this anyway, here just didn't want to return error if any port is also available in port list other than the required ones. I know in test cases it will not happen.
Changing ports for headless service when moving tls to non-tls and vice versa