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 wildcard host/multiple hosts #419

Open
9 tasks
pbusko opened this issue Jul 19, 2023 · 6 comments
Open
9 tasks

Support for wildcard host/multiple hosts #419

pbusko opened this issue Jul 19, 2023 · 6 comments
Labels
area/api-gateway Issues or PRs related to api-gateway kind/feature Categorizes issue or PR as related to a new feature.

Comments

@pbusko
Copy link

pbusko commented Jul 19, 2023

Description

At the moment, each APIRule object is bound to single external URL, however the underlying VirtualService object is capable of serving multiple hosts at the same time, or use regex matchers for the Host header.

Example with regex matcher (will match a-http-echo.my.domain.com, b-http-echo.my.domain.com etc.):

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: http-echo
  namespace: http-echo
spec:
  gateways:
    - kyma-system/kyma-gateway
  hosts:
    - '*'
  http:
    - corsPolicy:
        allowHeaders:
          - Authorization
          - Content-Type
          - '*'
        allowMethods:
          - GET
          - POST
          - PUT
          - DELETE
          - PATCH
        allowOrigins:
          - regex: .*
      match:
        - uri:
            regex: /.*
          headers:
            Host:
              regex: ^(.*)-http-echo\.my\.domain\.com$
      route:
        - weight: 100
          destination:
            host: http-echo.http-echo.svc.cluster.local

Example with multiple hosts:

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: http-echo
  namespace: http-echo
spec:
  gateways:
    - kyma-system/kyma-gateway
  hosts:
    - 'a-http-echo.my.domain.com'
    - 'b-http-echo.my.domain.com'
  http:
    - corsPolicy:
        allowHeaders:
          - Authorization
          - Content-Type
          - '*'
        allowMethods:
          - GET
          - POST
          - PUT
          - DELETE
          - PATCH
        allowOrigins:
          - regex: .*
      match:
        - uri:
            regex: /.*
      route:
        - weight: 100
          destination:
            host: http-echo.http-echo.svc.cluster.local

Would be very helpful to have support from APIRule for such use cases, by either introducing new spec.hosts array, or making spec.host regex capable by switching to the Host header regex matcher (or both).

Reasons

These features would greatly improve Kyma support for Multitenant CAP applications, which are using SaaS Registry Service.
At the moment there's no easy way to handle multitenant URLs on Kyma.

DoD:

  • provide documentation
  • release notes and What's New updates for Kyma customers
  • provide unit tests
  • provide integration tests
  • test on production-like environment
  • verify resource limits
  • followup issue
  • create release and bump in kyma
  • PR reviewer will verify code coverage and evaluate if it is acceptable

Attachments

@pbusko pbusko added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 19, 2023
@strekm strekm added the area/api-gateway Issues or PRs related to api-gateway label Jul 27, 2023
@kyma-bot
Copy link
Contributor

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 25, 2023
@kyma-bot
Copy link
Contributor

kyma-bot commented Oct 2, 2023

This issue or PR has been automatically closed due to the lack of activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle stale

If you think that I work incorrectly, kindly raise an issue with the problem.

/close

@kyma-bot kyma-bot closed this as completed Oct 2, 2023
@kyma-bot
Copy link
Contributor

kyma-bot commented Oct 2, 2023

@kyma-bot: Closing this issue.

In response to this:

This issue or PR has been automatically closed due to the lack of activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle stale

If you think that I work incorrectly, kindly raise an issue with the problem.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@strekm strekm removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 27, 2023
@strekm strekm reopened this Oct 27, 2023
@kyma-bot
Copy link
Contributor

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 26, 2023
@kyma-bot
Copy link
Contributor

kyma-bot commented Jan 2, 2024

This issue or PR has been automatically closed due to the lack of activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle stale

If you think that I work incorrectly, kindly raise an issue with the problem.

/close

@kyma-bot kyma-bot closed this as completed Jan 2, 2024
@kyma-bot
Copy link
Contributor

kyma-bot commented Jan 2, 2024

@kyma-bot: Closing this issue.

In response to this:

This issue or PR has been automatically closed due to the lack of activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle stale

If you think that I work incorrectly, kindly raise an issue with the problem.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@strekm strekm removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 24, 2024
@strekm strekm reopened this Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api-gateway Issues or PRs related to api-gateway kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants