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

Support for ExternalName services #39

Closed
DavidZisky opened this issue Aug 26, 2020 · 7 comments
Closed

Support for ExternalName services #39

DavidZisky opened this issue Aug 26, 2020 · 7 comments
Labels
enhancement New feature or request help-wanted Extra attention is needed stale

Comments

@DavidZisky
Copy link

Is your feature request related to a problem? Please describe.
I am trying to setup Varnish for caching calls in between a pod in k8s and an external service which is called via ExternalName service so it doesn't have an Endpoint. Your solutions requires specifying service name and is looking for Endpoints for that Service so I guess it won't work with ExternalName.

Describe the solution you'd like
The best would be to make native support for ExternalName services. So it should detect is Service is type of ExternalName and if it is then don't try to find it's Endpoint but use External-IP

Describe alternatives you've considered
I would be happy to hardcode backend for now. Please explain if I can just put it somewhere in vcl template or so?

Additional context

@DavidZisky DavidZisky added the enhancement New feature or request label Aug 26, 2020
@martin-helmich
Copy link
Member

As a workaround: yes, you can hardcode your backend in the VCL template.

Currently, we recommend a backend definition like follows:

{{ range .Backends }}
backend be-{{ .Name }} {
    .host = "{{ .Host }}";
    .port = "{{ .Port }}";
}
{{- end }}

But this is neither enforced nor required. You can simply hardcode your backend to any external (or internal, if you like) address:

backend be-external {
    .host = "external-address.example";
    .port = "80";
}

@DavidZisky
Copy link
Author

Great! Thanks for quick response. I'll try that.

For permanent solutions - is it something you can look into? any idea if that would be easy or too complex request?

@martin-helmich
Copy link
Member

Support for ExternalName services certainly would be nice feature. However, given that feasible workarounds do exist, this would most probably not be a high-priority feature for us. Pull requests are welcome, though. 😉

@martin-helmich martin-helmich added the help-wanted Extra attention is needed label Aug 31, 2020
@martin-helmich
Copy link
Member

Oh, and just an addendum: When starting the cache, you'll probably need to add the --backend-watch=false flag to the controller. Otherwise, the controller will try to watch the non-existent endpoints of an equally non-existent service.

@mittwald-machine
Copy link
Collaborator

There has not been any activity to this issue in the last 14 days. It will automatically be closed after 7 more days. Remove the stale label to prevent this.

@martin-helmich
Copy link
Member

Apologies on behalf of @mittwald-machine. Issues with the help wanted label should have been excluded from being marked as stale.

@mittwald-machine
Copy link
Collaborator

There has not been any activity to this issue in the last 14 days. It will automatically be closed after 7 more days. Remove the stale label to prevent this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help-wanted Extra attention is needed stale
Projects
None yet
Development

No branches or pull requests

3 participants