feat: adds gateway api httproute support
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.
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
Is this ready to be merged? Looks pretty solid to me! Would be great to have this soon, as a lot of people are currently switching from nginx-ingress and are looking into switching ingress->gateway-api. 😊
@Eifoen Due to the holidays, I regret to say that a review and merge can probably not be expected until the first half of January.