Skip to content

Commit b1edce5

Browse files
committed
chore: some fix from review
Signed-off-by: DrummyFloyd <jonathan.monnet28@gmail.com>
1 parent 25653c5 commit b1edce5

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
{{- if .Values.route.enabled }}
2-
apiVersion: {{ .Values.route.apiVersion }}
3-
kind: {{ .Values.route.kind }}
1+
{{- if .Values.httpRoute.enabled }}
2+
apiVersion: {{ .Values.httpRoute.apiVersion }}
3+
kind: {{ .Values.httpRoute.kind }}
44
metadata:
55
name: {{ template "nextcloud.fullname" . }}
66
namespace: {{ .Release.Namespace }}
77
labels:
88
{{- include "nextcloud.labels" ( dict "component" "app" "rootContext" $ ) | nindent 4 }}
9-
{{- with .Values.route.labels }}
9+
{{- with .Values.httpRoute.labels }}
1010
{{- toYaml . | nindent 4 }}
1111
{{- end }}
12-
{{- with .Values.route.annotations }}
12+
{{- with .Values.httpRoute.annotations }}
1313
annotations:
1414
{{- toYaml . | nindent 4 }}
1515
{{- end }}
1616
spec:
17-
{{- with .Values.route.parentRefs }}
17+
{{- with .Values.httpRoute.parentRefs }}
1818
parentRefs:
1919
{{- toYaml . | nindent 4 }}
2020
{{- end }}
21-
{{- with .Values.route.hostnames }}
21+
{{- with .Values.httpRoute.hostnames }}
2222
hostnames:
2323
{{- tpl (toYaml .) $ | nindent 4 }}
2424
{{- end }}
2525
rules:
26-
{{- with .Values.route.additionalRules }}
27-
{{- tpl (toYaml .) $ | nindent 4 }}
26+
{{- range .Values.httpRoute.rules }}
27+
{{- with .matches }}
28+
- matches:
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
31+
{{- with .filters }}
32+
filters:
33+
{{- toYaml . | nindent 8 }}
2834
{{- end }}
2935
- backendRefs:
3036
- name: {{ template "nextcloud.fullname" . }}
3137
port: {{ .Values.service.port }}
32-
{{- with .Values.route.filters }}
33-
filters:
34-
{{- toYaml . | nindent 8 }}
35-
{{- end }}
36-
{{- with .Values.route.matches }}
37-
matches:
38-
{{- tpl (toYaml .) $ | nindent 8 }}
39-
{{- end }}
38+
weight: 1
39+
{{- end }}
4040
{{- end }}

charts/nextcloud/values.yaml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ deploymentLabels: {}
2929
# Number of replicas to be deployed
3030
replicaCount: 1
3131

32-
route:
33-
# -- enable an HTTPRoute resource for nextcloud .
32+
httpRoute:
33+
# -- Enable an HTTPRoute resource for nextcloud .
3434
enabled: false
3535
# -- Set the route apiVersion
3636
apiVersion: gateway.networking.k8s.io/v1
@@ -41,25 +41,31 @@ route:
4141
annotations: {}
4242
# -- Route labels
4343
labels: {}
44-
4544
# -- Route hostnames
4645
hostnames: []
4746
# -- Reference to parent gateways
4847
parentRefs: []
49-
# -- Route matches
50-
matches:
51-
- path:
52-
type: PathPrefix
53-
value: "/"
54-
# -- Route filters
55-
filters: []
56-
57-
# -- Additional custom rules that can be added to the route
58-
additionalRules: []
59-
# - type: RequestRedirect
60-
# requestRedirect:
61-
# scheme: https
62-
# statusCode: 301
48+
# -- List of rules and filters applied.
49+
rules:
50+
- matches:
51+
- path:
52+
type: PathPrefix
53+
value: "/"
54+
# filters:
55+
# - type: RequestHeaderModifier
56+
# requestHeaderModifier:
57+
# set:
58+
# - name: My-Overwrite-Header
59+
# value: this-is-the-only-value
60+
# remove:
61+
# - User-Agent
62+
# - matches:
63+
# - path:
64+
# type: PathPrefix
65+
# value: /echo
66+
# headers:
67+
# - name: version
68+
# value: v2
6369

6470
## Allowing use of ingress controllers
6571
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/

0 commit comments

Comments
 (0)