Skip to content
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

Merged
merged 8 commits into from
Oct 2, 2023
Merged

[KO-259] Changing ports for headless service. #250

merged 8 commits into from
Oct 2, 2023

Conversation

tanmayja
Copy link
Contributor

Changing ports for headless service when moving tls to non-tls and vice versa

controllers/service.go Outdated Show resolved Hide resolved
controllers/rack.go Outdated Show resolved Hide resolved
controllers/reconciler.go Outdated Show resolved Hide resolved
controllers/service.go Outdated Show resolved Hide resolved
controllers/service.go Outdated Show resolved Hide resolved
controllers/service.go Show resolved Hide resolved
controllers/service.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@abhishekdwivedi3060 abhishekdwivedi3060 left a 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?

@tanmayja
Copy link
Contributor Author

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.

test/utils.go Outdated Show resolved Hide resolved
test/cluster_helper.go Show resolved Hide resolved
Comment on lines +421 to +428
if portSet.Has(p.Port) {
portSet.Delete(p.Port)
}
}

if portSet.Len() > 0 {
return fmt.Errorf("service %s port not configured correctly", serviceNamespacesName.Name)
}
Copy link
Collaborator

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()
			}

Copy link
Contributor Author

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.

@sud82 sud82 merged commit 8fcd986 into master Oct 2, 2023
4 checks passed
@sud82 sud82 deleted the hearlessfix branch April 24, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants