Skip to content

Make front proxy ingress paths configurable #134

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

Open
martivo opened this issue Apr 24, 2025 · 4 comments
Open

Make front proxy ingress paths configurable #134

martivo opened this issue Apr 24, 2025 · 4 comments

Comments

@martivo
Copy link

martivo commented Apr 24, 2025

We serve multiple services from the same host as the KCP front proxy. It would be desired to be able to configure the ingress paths that are to be sent to KCP front proxy. Our current manually created ingress for KCP has the paths for /clusters and /services. At the moment we have disabled the creation of Ingress by the KCP chart and create it separately as a workaround.

  rules:
    - host: XXX
      http:
        paths:
          - path: /clusters
            pathType: Prefix
            backend:
              service:
                name: kcp-front-proxy
                port:
                  number: 8443
          - path: /services
            pathType: Prefix
            backend:
              service:
                name: kcp-front-proxy
                port:
                  number: 8443

If this is acceptable I could create the PR. The values file would be something like this:

kcpFrontProxy:
    ingress:
      paths:
      - /clusters
      - /services

The default would remain "/" and be backwards compatible. Would this be a good improvement?

@embik
Copy link
Member

embik commented Apr 24, 2025

Would making the prefix under which the kcp-front-proxy is exposed configurable be an acceptable solution to you as well? I'm skeptical about /clusters and /services, but having a value like

kcpFrontProxy:
  ingress:
    prefix: /

Which can then be set to e.g. /front-proxy/ would make it possible to amend the host with other ingress paths without splitting the routing for the front-proxy into implementation details of the proxy.

@martivo
Copy link
Author

martivo commented Apr 24, 2025

Would making the prefix under which the kcp-front-proxy is exposed configurable be an acceptable solution to you as well? I'm skeptical about /clusters and /services, but having a value like

kcpFrontProxy:
ingress:
prefix: /
Which can then be set to e.g. /front-proxy/ would make it possible to amend the host with other ingress paths without splitting the routing for the front-proxy into implementation details of the proxy.

It would be even better solution if we could change the "root" to be used. My only concern with it is compatibility with other components and tools.
Will "kubectl-workspace set" commands keep this custom prefix? Also kcp itself does some calls to the front proxy ( externalLogicalClusterAdminFlag ).

@embik
Copy link
Member

embik commented Apr 24, 2025

That is a good point. I'd have to check if the plugins would be compatible with this change.

@martivo
Copy link
Author

martivo commented Apr 24, 2025

I can confirm that only sending /clusters and /services to the front proxy works for us. Then again we only have a single location and don't use "sharding". It is possible there are other paths needed for some use cases. Then again the proposal would be backwards compatible for those that leave it as a default. I do agree that configuring the entire root prefix would be the best solution, maybe just not as simple to do.

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

2 participants