From 234e176804a9121257ba71320f3cae0a1fb12961 Mon Sep 17 00:00:00 2001 From: DrummyFloyd Date: Sun, 30 Nov 2025 12:06:43 +0100 Subject: [PATCH 1/5] feat: add httpRoute ingress successor Signed-off-by: DrummyFloyd --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/templates/route.yaml | 40 +++++++++++++++++++++++++++ charts/nextcloud/values.yaml | 32 +++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 charts/nextcloud/templates/route.yaml diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 3633ea10..db560bbd 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 8.6.0 +version: 8.7.0 # renovate: image=docker.io/library/nextcloud appVersion: 32.0.2 description: A file sharing server that puts the control and security of your own data back into your hands. diff --git a/charts/nextcloud/templates/route.yaml b/charts/nextcloud/templates/route.yaml new file mode 100644 index 00000000..c94d38a4 --- /dev/null +++ b/charts/nextcloud/templates/route.yaml @@ -0,0 +1,40 @@ +{{- if .Values.route.enabled }} +apiVersion: {{ .Values.route.apiVersion | default "gateway.networking.k8s.io/v1" }} +kind: {{ .Values.route.kind | default "HTTPRoute" }} +metadata: + name: {{ template "nextcloud.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "nextcloud.labels" ( dict "component" "app" "rootContext" $ ) | nindent 4 }} + {{- with .Values.route.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.route.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.route.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.route.hostnames }} + hostnames: + {{- tpl (toYaml .) $ | nindent 4 }} + {{- end }} + rules: + {{- if .Values.route.additionalRules }} + {{- tpl (toYaml .Values.route.additionalRules) $ | nindent 4 }} + {{- end }} + - backendRefs: + - name: {{ template "nextcloud.fullname" . }} + port: {{ .Values.service.port }} + {{- with .Values.route.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.route.matches }} + matches: + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} +{{- end }} diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 9c44fd28..d9dc1adf 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -29,6 +29,38 @@ deploymentLabels: {} # Number of replicas to be deployed replicaCount: 1 +route: + # -- enable an HTTPRoute resource for nextcloud . + enabled: false + # -- Set the route apiVersion + apiVersion: gateway.networking.k8s.io/v1 + # -- Set the route kind + kind: HTTPRoute + + # -- Route annotations + annotations: {} + # -- Route labels + labels: {} + + # -- Route hostnames + hostnames: [] + # -- Reference to parent gateways + parentRefs: [] + # -- Route matches + matches: + - path: + type: PathPrefix + value: "/" + # -- Route filters + filters: [] + + # -- Additional custom rules that can be added to the route + additionalRules: [] + # - type: RequestRedirect + # requestRedirect: + # scheme: https + # statusCode: 301 + ## Allowing use of ingress controllers ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ ## From 893b15cae86b8e65fe26b78cfa1698f9ec8661a8 Mon Sep 17 00:00:00 2001 From: DrummyFloyd Date: Thu, 4 Dec 2025 20:29:41 +0100 Subject: [PATCH 2/5] chore: some fix from review Signed-off-by: DrummyFloyd --- charts/nextcloud/templates/route.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/nextcloud/templates/route.yaml b/charts/nextcloud/templates/route.yaml index c94d38a4..d1275610 100644 --- a/charts/nextcloud/templates/route.yaml +++ b/charts/nextcloud/templates/route.yaml @@ -1,6 +1,6 @@ {{- if .Values.route.enabled }} -apiVersion: {{ .Values.route.apiVersion | default "gateway.networking.k8s.io/v1" }} -kind: {{ .Values.route.kind | default "HTTPRoute" }} +apiVersion: {{ .Values.route.apiVersion }} +kind: {{ .Values.route.kind }} metadata: name: {{ template "nextcloud.fullname" . }} namespace: {{ .Release.Namespace }} @@ -23,7 +23,7 @@ spec: {{- tpl (toYaml .) $ | nindent 4 }} {{- end }} rules: - {{- if .Values.route.additionalRules }} + {{- with .Values.route.additionalRules }} {{- tpl (toYaml .Values.route.additionalRules) $ | nindent 4 }} {{- end }} - backendRefs: From 25653c53fd78d29577eeeb4d9fa13bbb5598e666 Mon Sep 17 00:00:00 2001 From: DrummyFloyd Date: Fri, 5 Dec 2025 09:28:58 +0100 Subject: [PATCH 3/5] Update charts/nextcloud/templates/route.yaml Co-authored-by: WrenIX <133280015+wrenix@users.noreply.github.com> Signed-off-by: DrummyFloyd --- charts/nextcloud/templates/route.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/nextcloud/templates/route.yaml b/charts/nextcloud/templates/route.yaml index d1275610..dbb8733a 100644 --- a/charts/nextcloud/templates/route.yaml +++ b/charts/nextcloud/templates/route.yaml @@ -24,7 +24,7 @@ spec: {{- end }} rules: {{- with .Values.route.additionalRules }} - {{- tpl (toYaml .Values.route.additionalRules) $ | nindent 4 }} + {{- tpl (toYaml .) $ | nindent 4 }} {{- end }} - backendRefs: - name: {{ template "nextcloud.fullname" . }} From b1edce514c3182df2962efb5dd46adc5d1a52ebb Mon Sep 17 00:00:00 2001 From: DrummyFloyd Date: Fri, 5 Dec 2025 10:54:09 +0100 Subject: [PATCH 4/5] chore: some fix from review Signed-off-by: DrummyFloyd --- charts/nextcloud/templates/route.yaml | 34 +++++++++++------------ charts/nextcloud/values.yaml | 40 +++++++++++++++------------ 2 files changed, 40 insertions(+), 34 deletions(-) diff --git a/charts/nextcloud/templates/route.yaml b/charts/nextcloud/templates/route.yaml index dbb8733a..56f059b0 100644 --- a/charts/nextcloud/templates/route.yaml +++ b/charts/nextcloud/templates/route.yaml @@ -1,40 +1,40 @@ -{{- if .Values.route.enabled }} -apiVersion: {{ .Values.route.apiVersion }} -kind: {{ .Values.route.kind }} +{{- if .Values.httpRoute.enabled }} +apiVersion: {{ .Values.httpRoute.apiVersion }} +kind: {{ .Values.httpRoute.kind }} metadata: name: {{ template "nextcloud.fullname" . }} namespace: {{ .Release.Namespace }} labels: {{- include "nextcloud.labels" ( dict "component" "app" "rootContext" $ ) | nindent 4 }} - {{- with .Values.route.labels }} + {{- with .Values.httpRoute.labels }} {{- toYaml . | nindent 4 }} {{- end }} - {{- with .Values.route.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.route.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- with .Values.route.hostnames }} + {{- with .Values.httpRoute.hostnames }} hostnames: {{- tpl (toYaml .) $ | nindent 4 }} {{- end }} rules: - {{- with .Values.route.additionalRules }} - {{- tpl (toYaml .) $ | nindent 4 }} + {{- range .Values.httpRoute.rules }} + {{- with .matches }} + - matches: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .filters }} + filters: + {{- toYaml . | nindent 8 }} {{- end }} - backendRefs: - name: {{ template "nextcloud.fullname" . }} port: {{ .Values.service.port }} - {{- with .Values.route.filters }} - filters: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.route.matches }} - matches: - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} + weight: 1 + {{- end }} {{- end }} diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index d9dc1adf..f604b964 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -29,8 +29,8 @@ deploymentLabels: {} # Number of replicas to be deployed replicaCount: 1 -route: - # -- enable an HTTPRoute resource for nextcloud . +httpRoute: + # -- Enable an HTTPRoute resource for nextcloud . enabled: false # -- Set the route apiVersion apiVersion: gateway.networking.k8s.io/v1 @@ -41,25 +41,31 @@ route: annotations: {} # -- Route labels labels: {} - # -- Route hostnames hostnames: [] # -- Reference to parent gateways parentRefs: [] - # -- Route matches - matches: - - path: - type: PathPrefix - value: "/" - # -- Route filters - filters: [] - - # -- Additional custom rules that can be added to the route - additionalRules: [] - # - type: RequestRedirect - # requestRedirect: - # scheme: https - # statusCode: 301 + # -- List of rules and filters applied. + rules: + - matches: + - path: + type: PathPrefix + value: "/" + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: My-Overwrite-Header + # value: this-is-the-only-value + # remove: + # - User-Agent + # - matches: + # - path: + # type: PathPrefix + # value: /echo + # headers: + # - name: version + # value: v2 ## Allowing use of ingress controllers ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ From d9696ccc683a34cad9c92256d715d7e0e6e9a8dd Mon Sep 17 00:00:00 2001 From: DrummyFloyd Date: Fri, 5 Dec 2025 11:08:08 +0100 Subject: [PATCH 5/5] chore: some fix from review Signed-off-by: DrummyFloyd --- charts/nextcloud/templates/route.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/charts/nextcloud/templates/route.yaml b/charts/nextcloud/templates/route.yaml index 56f059b0..8f9c4319 100644 --- a/charts/nextcloud/templates/route.yaml +++ b/charts/nextcloud/templates/route.yaml @@ -1,8 +1,10 @@ {{- if .Values.httpRoute.enabled }} +{{- $fullName := include "nextcloud.fullname" . -}} +{{- $svcPort := .Values.service.port -}} apiVersion: {{ .Values.httpRoute.apiVersion }} kind: {{ .Values.httpRoute.kind }} metadata: - name: {{ template "nextcloud.fullname" . }} + name: {{ $fullName }} namespace: {{ .Release.Namespace }} labels: {{- include "nextcloud.labels" ( dict "component" "app" "rootContext" $ ) | nindent 4 }} @@ -33,8 +35,8 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} - backendRefs: - - name: {{ template "nextcloud.fullname" . }} - port: {{ .Values.service.port }} + - name: {{ $fullName }} + port: {{ $svcPort }} weight: 1 {{- end }} {{- end }}