[go: up one dir, main page]

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

spec.host_redirect in Mapping does not work #5776

Open
Vislor opened this issue Aug 15, 2024 · 1 comment
Open

spec.host_redirect in Mapping does not work #5776

Vislor opened this issue Aug 15, 2024 · 1 comment
Labels
t:bug Something isn't working

Comments

@Vislor
Copy link
Vislor commented Aug 15, 2024

Describe the bug
In a Mapping, whenever host_redirect is set to true, the mapping is not recognized and doesn't work. This happens no matter what redirect options are used (path, regex, prefix). We are not using label selectors to link the Mapping to a Host, we are using hostname and the hostname is not a wildcard (nor does it contain a wildcard). Mappings without host_redirect seem to work as expected (they are applied and associated with the proper Host).

To Reproduce
Steps to reproduce the behavior:

  1. Create a mapping with a host_redirect, such as:
apiVersion: ambassador.io/v3alpha1
kind: Mapping
metadata:
  name: test
  namespace: some-namespace
spec:
  hostname: api.dev.local
  service: users-svc
  prefix: /swagger-dev/
  host_redirect: true
  prefix_redirect: /swagger
  1. Apply the mapping to the cluster
  2. In the diagnostics endpoint (http://localhost:8877/ambassador/v0/diag/) observe that the mapping has not been applied.
  3. Test the route, observe that a 404 is returned.

Expected behavior
I expect the mapping to be applied and a 301 redirect to be returned.

Versions (please complete the following information):

  • Ambassador: Emissary-Ingress 3.9.1
  • Kubernetes environment : kubeadm on VMWare vSphere
  • Version: 1.30.3
@dosubot dosubot bot added the t:bug Something isn't working label Aug 15, 2024
@cindymullins-dw
Copy link
Contributor

HI @Vislor, we do expect this to work. If the API version above is not a typo please try correcting it to 'getambassador', pls see example here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants