Skip to content

Commit 705bd7d

Browse files
Merge pull request #7 from henrywhitaker3/feat/add-http-route
2 parents 1d7a3fc + 91afb36 commit 705bd7d

File tree

3 files changed

+56
-7
lines changed

3 files changed

+56
-7
lines changed

chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 1.3.19
16+
version: 1.3.20
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.

chart/templates/http_route.yaml

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 "generic.fullname" . -}}
3+
{{- $svcPort := .Values.service.port -}}
4+
---
5+
# yaml-language-server: $schema=https://github.com/datreeio/CRDs-catalog/raw/refs/heads/main/gateway.networking.k8s.io/httproute_v1.json
6+
apiVersion: gateway.networking.k8s.io/v1
7+
kind: HTTPRoute
8+
metadata:
9+
name: {{ $fullName }}
10+
labels:
11+
{{- include "generic.labels" . | nindent 4 }}
12+
{{- with .Values.httpRoute.labels }}
13+
{{- . | toYaml | nindent 4 }}
14+
{{- end }}
15+
{{- with .Values.httpRoute.annotations }}
16+
annotations:
17+
{{- toYaml . | nindent 4 }}
18+
{{- end }}
19+
spec:
20+
{{- with .Values.httpRoute.hostnames }}
21+
hostnames:
22+
{{- . | toYaml | nindent 4 }}
23+
{{- end }}
24+
{{- with .Values.httpRoute.parentRefs }}
25+
parentRefs:
26+
{{- . | toYaml | nindent 4 }}
27+
{{- end }}
28+
rules:
29+
{{- range .Values.httpRoute.rules }}
30+
- backendRefs:
31+
- name: "{{ $fullName }}"
32+
port: {{ .port | default $svcPort }}
33+
matches:
34+
{{- with .matches }}
35+
{{- . | toYaml | nindent 6 }}
36+
{{- end }}
37+
{{- end }}
38+
{{- end }}

chart/values.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
# Default values for generic.
2-
# This is a YAML-formatted file.
3-
# Declare variables to be passed into your templates.
4-
51
nameOverride: ""
62
fullnameOverride: ""
73

8-
# Override the chart version
94
versionOverride: ""
10-
# Override the app version
115
appVersionOverride: ""
126

137
replicaCount: 1
@@ -113,6 +107,23 @@ ingress:
113107
hosts:
114108
- chart-example.local
115109

110+
httpRoute:
111+
enabled: false
112+
113+
labels: {}
114+
annotations: {}
115+
116+
hostnames: []
117+
118+
parentRefs: []
119+
120+
rules:
121+
- port: http
122+
matches:
123+
- path:
124+
type: Prefix
125+
value: /
126+
116127
resources: {}
117128
# We usually recommend not to specify default resources and to leave this as a conscious
118129
# choice for the user. This also increases chances charts run on environments with little

0 commit comments

Comments
 (0)