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

sync-catalog: K8s to Consul: Support Ingress objects #5

Closed
muffin87 opened this issue Oct 1, 2018 · 6 comments · Fixed by #2098
Closed

sync-catalog: K8s to Consul: Support Ingress objects #5

muffin87 opened this issue Oct 1, 2018 · 6 comments · Fixed by #2098
Labels
area/sync Related to catalog sync theme/ingress Related to ingress controllers type/enhancement New feature or request

Comments

@muffin87
Copy link

muffin87 commented Oct 1, 2018

Hi everyone,

I was wonderring if it's also possible to support syncing Ingress objects.
I believe that the use of Ingress controllers is quite common to expose http(s) based services to the outside of the cluster. They offer quite big feature set which makes it easy to manage certain settings like TLS cert handling or path / name based routing. Without the Ingress controller I would need to reinvent these features for every service.

The tricky part for this feature is how to transform the Ingress object into DNS. One solution could be to create a CNAME for each object and let it point to the A record of the Ingress controller IP. The Ingress controller service needs to be from type LoadBalancer of course.

An example would be:

Ingress controller service:

NAME                    TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE     SELECTOR
traefik                 LoadBalancer   10.253.35.66     28.125.10.5   80:32281/TCP,443:32209/TCP   1d      app=traefik,component=proxy

This would create a A record like this:

traefik.example.com. 3600 IN     A       28.125.10.5

Now I got a webservice which I want to expose. I would create an Ingress object and set the host field like awesomeservice.example.com. This would create the following DNS entry:

awesomeservice.example.com. 3600 IN     CNAME   traefik.example.com.
traefik.example.com.        3600 IN     A       28.125.10.5
@splashx
Copy link

splashx commented Jan 24, 2019

Maybe @adilyse could help with the design on this or point to someone who could? I could take a shot on the implementation but it would be good if we have an expectation if this is even desirable/possible without major refactoring..

@splashx
Copy link

splashx commented Jan 24, 2019

@muffin87 did you ever solve this problem? I was looking into https://github.com/aswinkarthik/ingress-consul-register but it doesnt look very complete..

@joshbenner
Copy link

I released something we've been using successfully in production: https://pypi.org/project/consulk8s/, and we recently refactored this into a metacontroller-compatible operator we run in the cluster.

@yarinm
Copy link

yarinm commented Sep 12, 2019

+1 for this, service sync should support ingresses as well.

The suggested alternatives are far from ideal and I might have to resort to using one of them.

@lkysow lkysow added area/sync Related to catalog sync type/enhancement New feature or request theme/ingress Related to ingress controllers labels Sep 19, 2019
kschoche added a commit that referenced this issue Apr 6, 2021
# This is the 1st commit message:

fix

# This is the commit message #2:

test

# This is the commit message #3:

fix ci

# This is the commit message #4:

fix ci

# This is the commit message #5:

remove namespaces because oss agent response doesnt provide it
kschoche added a commit that referenced this issue Apr 6, 2021
# This is the 1st commit message:

fix

# This is the commit message #2:

test

# This is the commit message #3:

fix ci

# This is the commit message #4:

fix ci

# This is the commit message #5:

remove namespaces because oss agent response doesnt provide it
ndhanushkodi referenced this issue in ndhanushkodi/consul-k8s Jul 9, 2021
Add link to correct yq in README
@owenJiao
Copy link

Now I use ingress to expose service in k8s, meanwhile, I use consul as our service discovery tool, so I wonder if this feature can work now?

@david-yu
Copy link
Contributor

Hi @owenJiao we don't support syncing Ingress objects via catalogSync. We are willing to take PRs though for this work if you are interested in contributing.

t-eckert pushed a commit that referenced this issue Sep 8, 2022
# This is the 1st commit message:

Add service for terminating-gateways

# This is the commit message #2:

Add gateway-kind:terminating to deployment

# This is the commit message #3:

Add registration path for terminating gateways

# This is the commit message #4:

Add BATS tests

# This is the commit message #5:

Remove registration from terminating gateways deployment

# This is the commit message #6:

Set ports AFAIK in service

# This is the commit message #7:

Begin setting values for endpoints controller

# This is the commit message #8:

Copy values from deployment to endpoints controller (as comment)

# This is the commit message #9:

Use connect-init instead of acl-init

# This is the commit message #10:

Remove guards from term gw service (they will get hit by the deployment)

# This is the commit message #11:

Range over gateways to produce a service for each deployment

# This is the commit message #12:

Add test for multiple gateways

# This is the commit message #13:

Remove the format script

# This is the commit message #14:

Note which parts of the config have been set
wilkermichael added a commit that referenced this issue Oct 12, 2022
wilkermichael added a commit that referenced this issue Oct 14, 2022
wilkermichael added a commit that referenced this issue Oct 17, 2022
wilkermichael added a commit that referenced this issue Oct 17, 2022
wilkermichael added a commit that referenced this issue Oct 18, 2022
wilkermichael added a commit that referenced this issue Oct 18, 2022
wilkermichael added a commit that referenced this issue Oct 18, 2022
wilkermichael added a commit that referenced this issue Oct 19, 2022
@david-yu david-yu linked a pull request May 1, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sync Related to catalog sync theme/ingress Related to ingress controllers type/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants