Skip to content

Conversation

@wilmardo
Copy link
Contributor

Adds support for the HTTPRoute resource.

I adapted the default template/values that came with helm create chart to have it uniform with other helm charts. I kept it as close to the current ingress setup as possible by splitting console and allowing templating on the path.

The templating on the path meant however that (for now) only the path matcher is supported since I needed to traverse the dict to be able to run tpl. This is represented in the schema, it won't allow other matchers then path.

I think this is the best solution to keep backwards compatible and adding other matcher is still possible, you will just need to add another clause to the if. Kept it simple for now.

@wilmardo wilmardo requested a review from a team as a code owner November 21, 2025 08:01
@wilmardo
Copy link
Contributor Author

wilmardo commented Nov 21, 2025

Output with both routes enabled:

---
# Source: keycloakx/templates/httproute.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: release-name-keycloakx
  labels:
    helm.sh/chart: keycloakx-7.1.5
    app.kubernetes.io/name: keycloakx
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/version: "26.4.5"
    app.kubernetes.io/managed-by: Helm
spec:
  parentRefs:
    - name: gateway
      sectionName: http
  hostnames:
    - chart-example.local
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /auth/
      backendRefs:
        - name: release-name-keycloakx-http
          port:
            name: http
---
# Source: keycloakx/templates/httproute.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: release-name-keycloakx
  labels:
    helm.sh/chart: keycloakx-7.1.5
    app.kubernetes.io/name: keycloakx
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/version: "26.4.5"
    app.kubernetes.io/managed-by: Helm
spec:
  parentRefs:
    - name: gateway
      sectionName: http
  hostnames:
    - chart-example.local
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /auth/admin
      backendRefs:
        - name: release-name-keycloakx-http
          port:
            name: http

@wilmardo wilmardo force-pushed the add-gateway-api-support branch from c3385e5 to a8b9a47 Compare November 21, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant