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

Ingress should support frontend and backend via path based routing #255

Open
raffraffraff opened this issue Mar 12, 2025 · 0 comments
Open

Comments

@raffraffraff
Copy link

Problem: can't expost frontend and backend on different paths

The chart does not appear to support this because it's too prescriptive about what is allowed, ie: the host rule contains one port/path, and an extraHosts rule forces you to add another host which supports one port/path

  rules:
    - host: {{ include "common.tplvalues.render" ( dict "value" .Values.ingress.host "context" $ ) }}
      http:
        paths:
          - path: {{ .Values.ingress.path }}
            pathType: Prefix
            backend:
              service:
                name: {{ include "common.names.fullname" . }}
                port:
                  number: {{ .Values.service.ports.backend }}
    {{- range .Values.ingress.extraHosts }}
    - host: {{ .name | quote }}
      http:
        paths:
          - path: {{ default $.Values.ingress.path .path }}
            pathType: {{ default "Prefix" .pathType }}
            backend:
              service:
                name: {{ include "common.names.fullname" $ }}
                port:
                  number: {{ default $.Values.service.ports.backend .port }}

Use case

I'm deploying Backstage with Github OAuth authentication, which requires a callback address (that hits the backend). I don't want two different hosts, I want a single host with path based routing, eg:

  • https://backstage.internal.company.com/frontend
  • https://backstage.internal.company.com/backend

Suggestion

The template should have a more flexible approach to ingress configuration, allowing multiple path/port rules within a single host item. But instead of reinventing the wheel piecemeal, you could use the example from the NGNIX chart, which has support for flexible host/port/path combinations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant