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

Headless service support #80

Open
matteo-gsr opened this issue Dec 29, 2024 · 8 comments
Open

Headless service support #80

matteo-gsr opened this issue Dec 29, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@matteo-gsr
Copy link

This is more of a question / feature request rather than an issue itself.

I was looking at using the hostport allocator in combination with a headless service. However, I don't see any references or examples of whether this is supported or not.

Thank you.

@rmb938
Copy link
Owner

rmb938 commented Dec 29, 2024

You can create a headless service that points to your pods however the hostport allocator won't do anything with it, the headless service will just act as it does normally.

It is only made to assign ports for pod host ports.

@matteo-gsr
Copy link
Author

understood - reason why I was asking is that I wanted to expose the allocated host port through the SRV record registered into kube dns. If that makes sense..

@rmb938
Copy link
Owner

rmb938 commented Dec 29, 2024

Ah I see. What you could do is create the HostPortClaim and wait for it to to be Bound. Then do a kubectl get hostport, to find the actual port allocated, then create the headless service with that port. This is what I did at a previous job.

@matteo-gsr
Copy link
Author

matteo-gsr commented Dec 29, 2024

It's a bit manual though, ideally I would package the HostPortClaim along with the app in the same chart and then it would automatically set up the service with the allocated host port. However, I do understand this is a bit more involved and probably not easily achievable. Thank you for prompt responses. It's a great and useful project, I'll definitely use it.

@rmb938
Copy link
Owner

rmb938 commented Dec 29, 2024

No problem! I can look into supporting something like that. It is a bit tricky since services act differently then pods but I'll see what I can do.

@rmb938 rmb938 added the enhancement New feature or request label Dec 29, 2024
@matteo-gsr
Copy link
Author

thanks @rmb938 - look forward to seeing what you come up with there.

@matteo-gsr
Copy link
Author

hey @rmb938! HNY ;) - was just checking back in today after the hols as I am looking at running some tests with the controller. Did you have time to find out whether it's possible to support services at all? Thanks.

@rmb938
Copy link
Owner

rmb938 commented Jan 3, 2025

Yep it should be possible. I will see if I can get something out this weekend, otherwise I'll probably be a week or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants