Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions charts/truvami-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,42 @@

A Helm chart for Kubernetes

## Gateway API Support

This chart supports both traditional Kubernetes Ingress and the modern [Gateway API](https://gateway-api.sigs.k8s.io/) for routing traffic to the application.

### Using Gateway API (Recommended)

To use Gateway API instead of Ingress, configure the `httpRoute` section in your values:

```yaml
httpRoute:
enabled: true
parentRefs:
- name: my-gateway
sectionName: http
hostnames:
- api.example.com
rules:
- matches:
- path:
type: PathPrefix
value: /
```

### Migration from Ingress to Gateway API

If you're currently using Ingress, you can migrate to Gateway API by:

1. Ensure Gateway API CRDs are installed in your cluster
2. Create a Gateway resource (if not already present)
3. Enable `httpRoute.enabled: true` in your values
4. Configure `httpRoute.parentRefs` to reference your Gateway
5. Set `httpRoute.hostnames` and `httpRoute.rules` to match your current Ingress configuration
6. Disable Ingress by setting `ingress.enabled: false`

**Note:** Ingress and HTTPRoute are mutually exclusive. Only enable one at a time.

## Values

| Key | Type | Default | Description |
Expand Down Expand Up @@ -42,6 +78,13 @@ A Helm chart for Kubernetes
| database.secretKey | string | `"uri"` | |
| database.secretName | string | `"truvami-stack-app"` | |
| fullnameOverride | string | `""` | |
| httpRoute.annotations | object | `{}` | |
| httpRoute.enabled | bool | `false` | |
| httpRoute.hostnames[0] | string | `"chart-example.local"` | |
| httpRoute.parentRefs[0].name | string | `"gateway"` | |
| httpRoute.parentRefs[0].sectionName | string | `"http"` | |
| httpRoute.rules[0].matches[0].path.type | string | `"PathPrefix"` | |
| httpRoute.rules[0].matches[0].path.value | string | `"/"` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"ghcr.io/truvami/api"` | |
| image.tag | string | `""` | |
Expand Down
54 changes: 54 additions & 0 deletions charts/truvami-api/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

## Gateway API Support

This chart supports both traditional Kubernetes Ingress and the modern [Gateway API](https://gateway-api.sigs.k8s.io/) for routing traffic to the application.

### Using Gateway API (Recommended)

To use Gateway API instead of Ingress, configure the `httpRoute` section in your values:

```yaml
httpRoute:
enabled: true
parentRefs:
- name: my-gateway
sectionName: http
hostnames:
- api.example.com
rules:
- matches:
- path:
type: PathPrefix
value: /
```

### Migration from Ingress to Gateway API

If you're currently using Ingress, you can migrate to Gateway API by:

1. Ensure Gateway API CRDs are installed in your cluster
2. Create a Gateway resource (if not already present)
3. Enable `httpRoute.enabled: true` in your values
4. Configure `httpRoute.parentRefs` to reference your Gateway
5. Set `httpRoute.hostnames` and `httpRoute.rules` to match your current Ingress configuration
6. Disable Ingress by setting `ingress.enabled: false`

**Note:** Ingress and HTTPRoute are mutually exclusive. Only enable one at a time.

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
38 changes: 38 additions & 0 deletions charts/truvami-api/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{- if .Values.httpRoute.enabled -}}
{{- $fullName := include "truvami-api.fullname" . -}}
{{- $svcPort := .Values.api.server.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
labels:
{{- include "truvami-api.labels" . | nindent 4 }}
{{- with .Values.httpRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- with .Values.httpRoute.parentRefs }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- range .Values.httpRoute.rules }}
{{- with .matches }}
- matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
Comment on lines +25 to +32
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template creates invalid HTTPRoute YAML when a rule has no matches defined. The '- matches:' line will be rendered without any content under it, resulting in malformed YAML. Add validation or restructure to only output the matches key when the list is non-empty.

Suggested change
{{- with .matches }}
- matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- with .matches }}
matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}

Copilot uses AI. Check for mistakes.
backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
weight: 1
{{- end }}
{{- end }}
28 changes: 28 additions & 0 deletions charts/truvami-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,34 @@ ingress:
# hosts:
# - chart-example.local

httpRoute:
# HTTPRoute enabled.
enabled: false
# HTTPRoute annotations.
annotations: {}
# Which Gateways this Route is attached to.
parentRefs:
- name: gateway
sectionName: http
# namespace: default
# Hostnames matching HTTP header.
hostnames:
- chart-example.local
# 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

resources:
limits:
cpu: 100m
Expand Down
43 changes: 43 additions & 0 deletions charts/truvami-bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,42 @@

A Helm chart for Kubernetes

## Gateway API Support

This chart supports both traditional Kubernetes Ingress and the modern [Gateway API](https://gateway-api.sigs.k8s.io/) for routing traffic to the application.

### Using Gateway API (Recommended)

To use Gateway API instead of Ingress, configure the `httpRoute` section in your values:

```yaml
httpRoute:
enabled: true
parentRefs:
- name: my-gateway
sectionName: http
hostnames:
- bridge.example.com
rules:
- matches:
- path:
type: PathPrefix
value: /
```

### Migration from Ingress to Gateway API

If you're currently using Ingress, you can migrate to Gateway API by:

1. Ensure Gateway API CRDs are installed in your cluster
2. Create a Gateway resource (if not already present)
3. Enable `httpRoute.enabled: true` in your values
4. Configure `httpRoute.parentRefs` to reference your Gateway
5. Set `httpRoute.hostnames` and `httpRoute.rules` to match your current Ingress configuration
6. Disable Ingress by setting `ingress.enabled: false`

**Note:** Ingress and HTTPRoute are mutually exclusive. Only enable one at a time.

## Values

| Key | Type | Default | Description |
Expand Down Expand Up @@ -34,6 +70,13 @@ A Helm chart for Kubernetes
| bridge.otel.endpoint | string | `"tempo.grafana-tempo.svc.cluster.local:4318"` | |
| bridge.topic | string | `"truvami"` | |
| fullnameOverride | string | `""` | |
| httpRoute.annotations | object | `{}` | |
| httpRoute.enabled | bool | `false` | |
| httpRoute.hostnames[0] | string | `"chart-example.local"` | |
| httpRoute.parentRefs[0].name | string | `"gateway"` | |
| httpRoute.parentRefs[0].sectionName | string | `"http"` | |
| httpRoute.rules[0].matches[0].path.type | string | `"PathPrefix"` | |
| httpRoute.rules[0].matches[0].path.value | string | `"/"` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"ghcr.io/truvami/bridge"` | |
| image.tag | string | `""` | |
Expand Down
54 changes: 54 additions & 0 deletions charts/truvami-bridge/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

## Gateway API Support

This chart supports both traditional Kubernetes Ingress and the modern [Gateway API](https://gateway-api.sigs.k8s.io/) for routing traffic to the application.

### Using Gateway API (Recommended)

To use Gateway API instead of Ingress, configure the `httpRoute` section in your values:

```yaml
httpRoute:
enabled: true
parentRefs:
- name: my-gateway
sectionName: http
hostnames:
- bridge.example.com
rules:
- matches:
- path:
type: PathPrefix
value: /
```

### Migration from Ingress to Gateway API

If you're currently using Ingress, you can migrate to Gateway API by:

1. Ensure Gateway API CRDs are installed in your cluster
2. Create a Gateway resource (if not already present)
3. Enable `httpRoute.enabled: true` in your values
4. Configure `httpRoute.parentRefs` to reference your Gateway
5. Set `httpRoute.hostnames` and `httpRoute.rules` to match your current Ingress configuration
6. Disable Ingress by setting `ingress.enabled: false`

**Note:** Ingress and HTTPRoute are mutually exclusive. Only enable one at a time.

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
38 changes: 38 additions & 0 deletions charts/truvami-bridge/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{- if .Values.httpRoute.enabled -}}
{{- $fullName := include "truvami-bridge.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
labels:
{{- include "truvami-bridge.labels" . | nindent 4 }}
{{- with .Values.httpRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- with .Values.httpRoute.parentRefs }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- range .Values.httpRoute.rules }}
{{- with .matches }}
- matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
Comment on lines +25 to +32
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template creates invalid HTTPRoute YAML when a rule has no matches defined. The '- matches:' line will be rendered without any content under it, resulting in malformed YAML. Add validation or restructure to only output the matches key when the list is non-empty.

Suggested change
{{- with .matches }}
- matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- with .matches }}
matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}

Copilot uses AI. Check for mistakes.
backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
weight: 1
{{- end }}
{{- end }}
28 changes: 28 additions & 0 deletions charts/truvami-bridge/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,34 @@ ingress:
# hosts:
# - chart-example.local

httpRoute:
# HTTPRoute enabled.
enabled: false
# HTTPRoute annotations.
annotations: {}
# Which Gateways this Route is attached to.
parentRefs:
- name: gateway
sectionName: http
# namespace: default
# Hostnames matching HTTP header.
hostnames:
- chart-example.local
# 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

# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
Expand Down
Loading