Skip to content

Commit 039bd77

Browse files
authored
Add more specific settings for HTTPRoute (#203)
* Adding Helm chart * Update maintainer * Updating filesystem settings to prevent issues * CREATE_CLIENTS is now true by default * Add name override options * Validation for postges * Fix plain connection string in pod env * Simplifying secret management * Fix port quoting * Init container to run sql file * Fix port type * Fix secret management * Working now * Fixing Postgres connection issue * Upgrade postgres init container * Auto add UUIDs when starting postgres * feat: Use standard value names for adding HTTPReoute * fix: Remove merge issues * chore: bump version
1 parent 7d772f4 commit 039bd77

3 files changed

Lines changed: 67 additions & 5 deletions

File tree

helm/taskchampion-sync-server/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: taskchampion-sync-server
33
description: A Helm chart for deploying TaskChampion Sync Server on Kubernetes
44
type: application
5-
version: 0.1.0
5+
version: 0.1.1
66
appVersion: "0.7.0"
77
keywords:
88
- taskchampion

helm/taskchampion-sync-server/templates/httproute.yaml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,53 @@ metadata:
55
name: {{ include "taskchampion-sync-server.fullname" . }}
66
labels:
77
{{- include "taskchampion-sync-server.labels" . | nindent 4 }}
8+
{{- with .Values.httpRoute.annotations }}
9+
annotations:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
812
spec:
913
parentRefs:
14+
{{- if .Values.httpRoute.parentRefs }}
15+
{{- range .Values.httpRoute.parentRefs }}
16+
- name: {{ .name }}
17+
{{- if .namespace }}
18+
namespace: {{ .namespace }}
19+
{{- end }}
20+
{{- if .sectionName }}
21+
sectionName: {{ .sectionName }}
22+
{{- end }}
23+
{{- end }}
24+
{{- else if .Values.httpRoute.gateway }}
1025
- name: {{ .Values.httpRoute.gateway }}
11-
{{- if .Values.httpRoute.host }}
26+
{{- end }}
27+
{{- $hostnames := .Values.httpRoute.hostnames }}
28+
{{- if and (not $hostnames) .Values.httpRoute.host }}
29+
{{- $hostnames = list .Values.httpRoute.host }}
30+
{{- end }}
31+
{{- if $hostnames }}
1232
hostnames:
13-
- {{ .Values.httpRoute.host }}
33+
{{- range $hostnames }}
34+
- {{ . | quote }}
35+
{{- end }}
1436
{{- end }}
1537
rules:
38+
{{- if .Values.httpRoute.rules }}
39+
{{- range .Values.httpRoute.rules }}
40+
- matches:
41+
- path:
42+
type: {{ .path.type | default "PathPrefix" }}
43+
value: {{ .path.value | default "/" }}
44+
backendRefs:
45+
- name: {{ include "taskchampion-sync-server.fullname" $ }}
46+
port: {{ .backendPort | default 8080 }}
47+
{{- end }}
48+
{{- else }}
1649
- matches:
1750
- path:
1851
type: PathPrefix
19-
value: {{ .Values.httpRoute.path }}
52+
value: {{ .Values.httpRoute.path | default "/" }}
2053
backendRefs:
2154
- name: {{ include "taskchampion-sync-server.fullname" . }}
22-
port: {{ .Values.httpRoute.port }}
55+
port: {{ .Values.httpRoute.port | default 8080 }}
56+
{{- end }}
2357
{{- end }}

helm/taskchampion-sync-server/values.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,36 @@ ingress:
3838
# HTTPRoute configuration (Kubernetes Gateway API)
3939
httpRoute:
4040
enabled: false
41+
annotations: {}
42+
43+
# List of parent gateway references.
44+
# name is required; namespace and sectionName are optional.
45+
parentRefs: []
46+
# parentRefs:
47+
# - name: my-gateway
48+
# namespace: gateway-system # optional — cross-namespace gateway reference
49+
# sectionName: https # optional — targets a specific listener on the gateway
50+
51+
# List of hostnames the route applies to.
52+
hostnames: []
53+
# hostnames:
54+
# - tasks.example.com
55+
# - tasks.internal.example.com
56+
57+
# List of routing rules. Each rule matches a path and forwards to this chart's Service.
58+
# When empty, falls back to the deprecated path/port fields below.
59+
rules: []
60+
# rules:
61+
# - path:
62+
# type: PathPrefix # PathPrefix or Exact
63+
# value: /
64+
# backendPort: 8080
65+
66+
# Deprecated: use parentRefs instead
4167
gateway: ""
68+
# Deprecated: use hostnames instead
4269
host: ""
70+
# Deprecated: use rules instead
4371
path: "/"
4472
port: 8080
4573

0 commit comments

Comments
 (0)