Skip to content

Commit 6b630be

Browse files
teoTomato-Lai
andauthored
feat: add option to override gateway sectionName for all HTTPRoutes
- Add configurable sectionName to unify all routes under one gateway section - Maintain backward compatibility with component-specific defaults - Useful for integration with existing gateways that have a single HTTPS listener - Update documentation in README and values.yaml Co-authored-by: Teo Hoinaru <[email protected]>
1 parent 416a234 commit 6b630be

File tree

10 files changed

+12
-9
lines changed

10 files changed

+12
-9
lines changed

charts/opencloud/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ This chart includes HTTPRoute resources that can be used to expose the OpenCloud
445445
| `httpRoute.enabled` | Enable HTTPRoutes | `true` |
446446
| `httpRoute.gateway.name` | Gateway name | `opencloud-gateway` |
447447
| `httpRoute.gateway.namespace` | Gateway namespace | `""` (defaults to Release.Namespace) |
448+
| `httpRoute.gateway.sectionName` | Gateway section name | `""` (defaults to multiple route-specific section names for the routes listed below) |
448449
449450
The following HTTPRoutes are created when `httpRoute.enabled` is set to `true`:
450451
@@ -495,7 +496,7 @@ The following HTTPRoutes are created when `httpRoute.enabled` is set to `true`:
495496
- Port: 9300
496497
- Headers: Adds Permissions-Policy header to prevent browser features like interest-based advertising
497498
498-
All HTTPRoutes are configured to use the same Gateway specified by `httpRoute.gateway.name` and `httpRoute.gateway.namespace`.
499+
All HTTPRoutes are configured to use the same Gateway specified by `httpRoute.gateway.name` and `httpRoute.gateway.namespace`. If `httpRoute.gateway.sectionName` is set, they also all use a single section (e.g. `https`) in the gateway resource (useful when `httpRoute.gateway.create` is `false` because a gateway already exists). Otherwise, when `httpRoute.gateway.sectionName` is left empty, each route gets its own generated `sectionName` that points to a section in the gateway resource that is automatically set up when `httpRoute.gateway.create` is `true`.
499500
500501
## Setting Up Gateway API with Talos, Cilium, and cert-manager
501502

charts/opencloud/templates/gateway/collabora-httproute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
parentRefs:
1111
- name: {{ .Values.httpRoute.gateway.name }}
1212
namespace: {{ .Values.httpRoute.gateway.namespace | default .Release.Namespace }}
13-
sectionName: collabora-https
13+
sectionName: {{ .Values.httpRoute.gateway.sectionName | default "collabora-https" }}
1414
hostnames:
1515
- {{ .Values.global.domain.collabora | quote }}
1616
rules:

charts/opencloud/templates/gateway/collaboration-httproute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
parentRefs:
1111
- name: {{ .Values.httpRoute.gateway.name }}
1212
namespace: {{ .Values.httpRoute.gateway.namespace | default .Release.Namespace }}
13-
sectionName: collaboration-https
13+
sectionName: {{ .Values.httpRoute.gateway.sectionName | default "collaboration-https" }}
1414
hostnames:
1515
- {{ .Values.global.domain.wopi | quote }}
1616
rules:

charts/opencloud/templates/gateway/https-httproute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
parentRefs:
1010
- name: {{ .Values.httpRoute.gateway.name }}
1111
namespace: {{ .Values.httpRoute.gateway.namespace | default .Release.Namespace }}
12-
sectionName: opencloud-https
12+
sectionName: {{ .Values.httpRoute.gateway.sectionName | default "opencloud-https" }}
1313
hostnames:
1414
- {{ include "opencloud.domain" . | quote }}
1515
rules:

charts/opencloud/templates/gateway/keycloak-https-httproute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
parentRefs:
1111
- name: {{ .Values.httpRoute.gateway.name }}
1212
namespace: {{ .Values.httpRoute.gateway.namespace | default .Release.Namespace }}
13-
sectionName: keycloak-https
13+
sectionName: {{ .Values.httpRoute.gateway.sectionName | default "keycloak-https" }}
1414
hostnames:
1515
- {{ include "opencloud.keycloak.domain" . | quote }}
1616
rules:

charts/opencloud/templates/gateway/minio-httproute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
parentRefs:
1111
- name: {{ .Values.httpRoute.gateway.name }}
1212
namespace: {{ .Values.httpRoute.gateway.namespace | default .Release.Namespace }}
13-
sectionName: minio-https
13+
sectionName: {{ .Values.httpRoute.gateway.sectionName | default "minio-https" }}
1414
hostnames:
1515
- {{ include "opencloud.minio.domain" . | quote }}
1616
rules:

charts/opencloud/templates/gateway/onlyoffice-httproute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
parentRefs:
1111
- name: {{ .Values.httpRoute.gateway.name }}
1212
namespace: {{ .Values.httpRoute.gateway.namespace | default .Release.Namespace }}
13-
sectionName: onlyoffice-https
13+
sectionName: {{ .Values.httpRoute.gateway.sectionName | default "onlyoffice-https" }}
1414
hostnames:
1515
- {{ .Values.global.domain.onlyoffice | quote }}
1616
rules:

charts/opencloud/templates/gateway/wopi-https-httproute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
parentRefs:
1111
- name: {{ .Values.httpRoute.gateway.name }}
1212
namespace: {{ .Values.httpRoute.gateway.namespace | default .Release.Namespace }}
13-
sectionName: wopi-https
13+
sectionName: {{ .Values.httpRoute.gateway.sectionName | default "wopi-https" }}
1414
hostnames:
1515
- {{ .Values.global.domain.wopi | quote }}
1616
rules:

charts/opencloud/templates/gateway/wopi-tlsroute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
parentRefs:
1212
- name: {{ .Values.httpRoute.gateway.name }}
1313
namespace: {{ .Values.httpRoute.gateway.namespace | default .Release.Namespace }}
14-
sectionName: wopi-https
14+
sectionName: {{ .Values.httpRoute.gateway.sectionName | default "wopi-https" }}
1515
hostnames:
1616
- {{ .Values.global.domain.wopi | quote }}
1717
rules:

charts/opencloud/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,8 @@ httpRoute:
688688
className: cilium
689689
# Gateway namespace (defaults to Release.Namespace)
690690
namespace: ""
691+
# Gateway section name (applies to all routes). If set to a non-empty value, this overrides the default component-specific section names (e.g., opencloud-https, onlyoffice-https) for all routes. If left empty, the defaults are used.
692+
sectionName: ""
691693
# Gateway annotations
692694
annotations:
693695
# Gateway annotations

0 commit comments

Comments
 (0)