Skip to content

Commit efb5451

Browse files
committed
Rerun helm create to att httproute
1 parent 93317c2 commit efb5451

File tree

3 files changed

+91
-1
lines changed

3 files changed

+91
-1
lines changed

Charts/glazed/templates/NOTES.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
1. Get the application URL by running these commands:
2-
{{- if .Values.ingress.enabled }}
2+
{{- if .Values.httpRoute.enabled }}
3+
{{- if .Values.httpRoute.hostnames }}
4+
export APP_HOSTNAME={{ .Values.httpRoute.hostnames | first }}
5+
{{- else }}
6+
export APP_HOSTNAME=$(kubectl get --namespace {{(first .Values.httpRoute.parentRefs).namespace | default .Release.Namespace }} gateway/{{ (first .Values.httpRoute.parentRefs).name }} -o jsonpath="{.spec.listeners[0].hostname}")
7+
{{- end }}
8+
{{- if and .Values.httpRoute.rules (first .Values.httpRoute.rules).matches (first (first .Values.httpRoute.rules).matches).path.value }}
9+
echo "Visit http://$APP_HOSTNAME{{ (first (first .Values.httpRoute.rules).matches).path.value }} to use your application"
10+
11+
NOTE: Your HTTPRoute depends on the listener configuration of your gateway and your HTTPRoute rules.
12+
The rules can be set for path, method, header and query parameters.
13+
You can check the gateway configuration with 'kubectl get --namespace {{(first .Values.httpRoute.parentRefs).namespace | default .Release.Namespace }} gateway/{{ (first .Values.httpRoute.parentRefs).name }} -o yaml'
14+
{{- end }}
15+
{{- else if .Values.ingress.enabled }}
316
{{- range $host := .Values.ingress.hosts }}
417
{{- range .paths }}
518
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{- if .Values.httpRoute.enabled -}}
2+
{{- $fullName := include "glazed.fullname" . -}}
3+
{{- $svcPort := .Values.service.port -}}
4+
apiVersion: gateway.networking.k8s.io/v1
5+
kind: HTTPRoute
6+
metadata:
7+
name: {{ $fullName }}
8+
labels:
9+
{{- include "glazed.labels" . | nindent 4 }}
10+
{{- with .Values.httpRoute.annotations }}
11+
annotations:
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
14+
spec:
15+
parentRefs:
16+
{{- with .Values.httpRoute.parentRefs }}
17+
{{- toYaml . | nindent 4 }}
18+
{{- end }}
19+
{{- with .Values.httpRoute.hostnames }}
20+
hostnames:
21+
{{- toYaml . | nindent 4 }}
22+
{{- end }}
23+
rules:
24+
{{- range .Values.httpRoute.rules }}
25+
{{- with .matches }}
26+
- matches:
27+
{{- toYaml . | nindent 8 }}
28+
{{- end }}
29+
{{- with .filters }}
30+
filters:
31+
{{- toYaml . | nindent 8 }}
32+
{{- end }}
33+
backendRefs:
34+
- name: {{ $fullName }}
35+
port: {{ $svcPort }}
36+
weight: 1
37+
{{- end }}
38+
{{- end }}

Charts/glazed/values.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,45 @@ ingress:
7373
# hosts:
7474
# - chart-example.local
7575

76+
# -- Expose the service via gateway-api HTTPRoute
77+
# Requires Gateway API resources and suitable controller installed within the cluster
78+
# (see: https://gateway-api.sigs.k8s.io/guides/)
79+
httpRoute:
80+
# HTTPRoute enabled.
81+
enabled: false
82+
# HTTPRoute annotations.
83+
annotations: {}
84+
# Which Gateways this Route is attached to.
85+
parentRefs:
86+
- name: gateway
87+
sectionName: http
88+
# namespace: default
89+
# Hostnames matching HTTP header.
90+
hostnames:
91+
- chart-example.local
92+
# List of rules and filters applied.
93+
rules:
94+
- matches:
95+
- path:
96+
type: PathPrefix
97+
value: /headers
98+
# filters:
99+
# - type: RequestHeaderModifier
100+
# requestHeaderModifier:
101+
# set:
102+
# - name: My-Overwrite-Header
103+
# value: this-is-the-only-value
104+
# remove:
105+
# - User-Agent
106+
# - matches:
107+
# - path:
108+
# type: PathPrefix
109+
# value: /echo
110+
# headers:
111+
# - name: version
112+
# value: v2
113+
114+
76115
resources: {}
77116
# We usually recommend not to specify default resources and to leave this as a conscious
78117
# choice for the user. This also increases chances charts run on environments with little

0 commit comments

Comments
 (0)