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

User reports difficulty setting up redirects in Emissary 2.0 #3709

Closed
efunk opened this issue Aug 18, 2021 · 8 comments
Closed

User reports difficulty setting up redirects in Emissary 2.0 #3709

efunk opened this issue Aug 18, 2021 · 8 comments
Assignees
Labels
friction Issue causes friction in adoption of product t:bug Something isn't working v2 Related to Emissary-Ingress 2 (2.y.z) w:4 Targeted for fourth week of development cycle
Milestone

Comments

@efunk
Copy link

efunk commented Aug 18, 2021

From user Tim Rice:

Hi! Trying out the emissary-ingress 2.0 dev preview... having trouble getting redirects working, even using the basic redirect example from the docs

apiVersion: x.getambassador.io/v3alpha1
kind: AmbassadorMapping
metadata:
  name: redirect
spec:
  prefix: /redirect/
  service: httpbin.org
  host_redirect: true
  hostname: ‘*’

just returns a 404.
accessing an application in the cluster works just fine...
is this a known problem or are we doing something wrong?

Comment from Cindy:
The user is reporting an issue with redirects for Emissary 2.0 and it seems like he's using the new CRDs... he says it works for 1.13.

@efunk efunk added friction Issue causes friction in adoption of product v2 Related to Emissary-Ingress 2 (2.y.z) labels Aug 18, 2021
@efunk efunk added this to the 2021 Cycle 6 milestone Sep 3, 2021
@kflynn
Copy link
Member

kflynn commented Sep 9, 2021

@cindymullins-dw, can you check if the user has configured an AmbassadorListener and AmbassadorHost? cf https://www.getambassador.io/docs/emissary/2.0/howtos/configure-communications/

@timricese
Copy link

@cindymullins-dw, can you check if the user has configured an AmbassadorListener and AmbassadorHost? cf https://www.getambassador.io/docs/emissary/2.0/howtos/configure-communications/

Hi! Im the user.

We had AmbassadorListener and AmbassadorHost configured. A "regular" mapping exposing a service in the cluster worked fine, however host_redirect did not.

@khussey khussey modified the milestones: 2021 Cycle 6, 2021 Cycle 7 Oct 13, 2021
@cprass
Copy link

cprass commented Nov 7, 2021

I'm also unable to set up redirects.

My Setup:

  • 2 Domains pointing at the server (example.de and example.com)
  • 2 Listeners, one for HTTP and one for HTTPS
  • 2 Hosts, one for each domain, without any wildcards or subdomains
  • TLS certificates for both domains
  • a service to serve on the domains

If I create two mappings without any redirects it all works fine and I can reach the service on both example.de and example.com. But if I want to redirect one domain to the other I get a 404 on the redirected domain. Here are the mappings:

apiVersion: getambassador.io/v3alpha1
kind:  Mapping
metadata:
  name:  example-service-mapping-de
spec:
  prefix: /
  service: example-service
  hostname: example.de
---
apiVersion: getambassador.io/v3alpha1
kind:  Mapping
metadata:
  name:  example-service-mapping-com
spec:
  prefix: /
  service: example.de
  hostname: example.com
  host_redirect: true

@Elvander
Copy link

Same issue here

apiVersion: getambassador.io/v3alpha1
kind: Mapping
metadata:
  name: redirect-singapore
  namespace: production-website
spec:
  hostname: '*'
  prefix: /
  service: example.co.nz
  host_redirect: true

The result is a 404 instead of the expected 301 ...

@pjediny
Copy link

pjediny commented Dec 8, 2021

I see similar behavior in v1.14.2

@vjdhama
Copy link

vjdhama commented Jan 12, 2022

As a workaround, I am using an externalName service.

@MattMencel
Copy link

@vjdhama can you explain how you used externalName mapping to resolve your redirect problem? I created an externalName service and pointed the redirect mapping to that but still get the 404 error.

The bugfix looks like it will be in 2.1.2, anyone have an idea on the timeframe for that release?

@khussey khussey added t:bug Something isn't working w:4 Targeted for fourth week of development cycle labels Jan 26, 2022
@khussey khussey added this to the 2022 Cycle 1 milestone Jan 26, 2022
@khussey
Copy link
Contributor

khussey commented Jan 26, 2022

This was fixed in Emissary-ingresss 2.1.2, which is now available.

@khussey khussey closed this as completed Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
friction Issue causes friction in adoption of product t:bug Something isn't working v2 Related to Emissary-Ingress 2 (2.y.z) w:4 Targeted for fourth week of development cycle
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants