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

Errors when using ExternalName or Headless services #547

Closed
cmergenthaler opened this issue Jul 16, 2024 · 1 comment · Fixed by #763
Closed

Errors when using ExternalName or Headless services #547

cmergenthaler opened this issue Jul 16, 2024 · 1 comment · Fixed by #763
Assignees
Labels
area/controllers type/bug Something isn't working

Comments

@cmergenthaler
Copy link

cmergenthaler commented Jul 16, 2024

Describe the bug
Retina agents log a lot of error messages when having headless service in the cluster or of type ExternalName.

updateSvc: error getting primary IP for service
no primary IP found for service myService

To Reproduce
Steps to reproduce the behavior:

  1. Deploy externalname or headless service to the cluster
  2. Observe agent logs

Expected behavior
Retina should just ignore those services (or use endpoint ips of headless service?)

Platform (please complete the following information):

  • OS: AzureLinux
  • Kubernetes Version: 1.19
  • Host: AKS
  • Retina Version: 0.0.12

Additional Information:
I guess the relevant code is this, where it tries to save ClusterIP, even though not all services is k8s have a ClusterIP

ips.IPv4 = net.ParseIP(service.Spec.ClusterIP)

pip := s.ips.PrimaryIP()

@nddq nddq added type/bug Something isn't working area/controllers labels Jul 18, 2024
@whatnick
Copy link
Contributor

Confirmed this as an issue with our Headless services as well.

github-merge-queue bot pushed a commit that referenced this issue Sep 24, 2024
# Description

* update service controller to ignore headless svc and re-trigger
reconcile when encountering one
* create test to validate UpdateRetinaSvc still throws an error if a
retina svc has no IPv4 (this is to make sure existing validation post
retinaSvc creation is not broken)

## Related Issue

If this pull request is related to any issue, please mention it here.
Additionally, make sure that the issue is assigned to you before
submitting this pull request.

fix #547 

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [x] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.

Signed-off-by: Simone Rodigari <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controllers type/bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants