⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
helm chart add support for Gateway API
Thomas Lochet35f60fdeb2cc
diff --git a/charts/kaneo/README.md b/charts/kaneo/README.mdindex e4ce58f07..ee9edbe50 100644--- a/charts/kaneo/README.md+++ b/charts/kaneo/README.md@@ -4,7 +4,7 @@ This Helm chart deploys [Kaneo](https://kaneo.app) - open source project managem## Introduction-This chart bootstraps a Kaneo deployment on a Kubernetes cluster using the Helm package manager. It deploys both the API backend and Web frontend components, along with a PostgreSQL database, with optional ingress resources.+This chart bootstraps a Kaneo deployment on a Kubernetes cluster using the Helm package manager. It deploys both the API backend and Web frontend components, along with a PostgreSQL database, with optional ingress or Gateway API resources.## Prerequisites@@ -45,6 +45,21 @@ helm install kaneo ./charts/kaneo \--set "ingress.hosts[0].host=pm.yourcompany.com"```+### Production Setup with Gateway API++If your cluster already has Gateway API CRDs and a `Gateway` configured, you can expose Kaneo with an `HTTPRoute`:++```bash+helm install kaneo ./charts/kaneo \+ --namespace kaneo \+ --create-namespace \+ --set gateway.enabled=true \+ --set "gateway.parentRefs[0].name=main-gateway" \+ --set "gateway.parentRefs[0].namespace=gateway-system" \+ --set "gateway.parentRefs[0].sectionName=https" \+ --set "gateway.hostnames[0]=pm.yourcompany.com"+```+## Installing the ChartTo install the chart with the release name `my-kaneo`:@@ -149,6 +164,17 @@ helm uninstall my-kaneo| `ingress.hosts` | Ingress hosts configuration | See `values.yaml` || `ingress.tls` | Ingress TLS configuration | `[]` |+### Gateway API parameters++| Name | Description | Value |+| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------- |+| `gateway.enabled` | Enable Gateway API `HTTPRoute` creation | `false` |+| `gateway.annotations` | Annotations added to the `HTTPRoute` | `{}` |+| `gateway.labels` | Extra labels added to the `HTTPRoute` | `{}` |+| `gateway.parentRefs` | Parent Gateway listener references for attaching the `HTTPRoute` | `[]` |+| `gateway.hostnames` | Hostnames exposed by the `HTTPRoute` | `[]` |+| `gateway.rules` | Gateway API routing rules mapping paths to the chart services | See `values.yaml` |+## Configuration Examples### Minimal Configuration@@ -379,52 +405,26 @@ ingress:## Using Gateway API-As an alternative to Ingress, you can use the Kubernetes Gateway API for more advanced routing capabilities:+As an alternative to Ingress, the chart can create an `HTTPRoute` for the Kubernetes Gateway API:```yaml-# kaneo-gateway.yaml-apiVersion: gateway.networking.k8s.io/v1beta1-kind: HTTPRoute-metadata:- name: kaneo- namespace: kaneo-spec:+# values.yaml+gateway:+ enabled: trueparentRefs:- - name: main-gateway # Your gateway name- namespace: gateway-system # Your gateway namespace- sectionName: https+ - name: main-gateway+ namespace: gateway-system+ sectionName: httpshostnames:- - "kaneo.example.com"- rules:- # Frontend route (root path)- - matches:- - path:- type: PathPrefix- value: /- backendRefs:- - name: kaneo-web- port: 80- # API route (api path prefix)- - matches:- - path:- type: PathPrefix- value: /api- backendRefs:- - name: kaneo-api- port: 1337- filters:- - type: URLRewrite- urlRewrite:- path:- type: ReplacePrefixMatch- replacePrefixMatch: /+ - kaneo.example.com```-Apply the Gateway configuration:+By default the chart creates two Gateway API rules:-```bash-kubectl apply -f kaneo-gateway.yaml-```+1. `/api` goes to the API service and rewrites the prefix to `/`+2. `/` goes to the web service++If you need custom matching or multiple backend references, override `gateway.rules` directly. Each `backendRefs` entry follows the same pattern as ingress and uses the chart-specific `service` field (`api` or `web`), which is expanded to the release-specific Service name.## Securitydiff --git a/charts/kaneo/templates/NOTES.txt b/charts/kaneo/templates/NOTES.txtindex 3c9f2c8e6..354d668a8 100644--- a/charts/kaneo/templates/NOTES.txt+++ b/charts/kaneo/templates/NOTES.txt@@ -18,6 +18,19 @@ Note: This chart uses path patterns with regex capture groups for nginx:- /api/?(.*) -> for API requestsMake sure your ingress controller supports the configured annotations:nginx.ingress.kubernetes.io/rewrite-target: /$1+{{- else if .Values.gateway.enabled }}++An HTTPRoute has been created for Gateway API.+{{- if .Values.gateway.hostnames }}+Configured hostnames:+{{- range .Values.gateway.hostnames }}+ - {{ . }}+{{- end }}+{{- else }}+No hostnames were set on the HTTPRoute. Configure .Values.gateway.hostnames if your Gateway requires them.+{{- end }}++Attach the route by setting .Values.gateway.parentRefs to your Gateway listener references.{{- else }}To access the application, you need to set up port forwarding to both services:@@ -29,6 +42,7 @@ Then access the application at http://localhost:5173The web frontend will communicate with the API at http://localhost:1337Alternatively, you can expose the services using an Ingress by setting .Values.ingress.enabled=true+or Gateway API by setting .Values.gateway.enabled=true{{- end }}NOTES:@@ -64,4 +78,4 @@ NOTES:3. IMPORTANT: This chart uses a combined pod approach where both the API and Web containersrun in the same pod. This allows the web frontend to connect directly to the API via- localhost, simplifying the deployment and eliminating cross-origin issues.\ No newline at end of file+ localhost, simplifying the deployment and eliminating cross-origin issues.diff --git a/charts/kaneo/templates/httproute.yaml b/charts/kaneo/templates/httproute.yamlnew file mode 100644index 000000000..d6217c768--- /dev/null+++ b/charts/kaneo/templates/httproute.yaml@@ -0,0 +1,43 @@+{{- if .Values.gateway.enabled -}}+{{- $fullName := include "kaneo.fullname" . -}}+apiVersion: gateway.networking.k8s.io/v1+kind: HTTPRoute+metadata:+ name: {{ $fullName }}+ labels:+ {{- include "kaneo.labels" . | nindent 4 }}+ {{- with .Values.gateway.labels }}+ {{- toYaml . | nindent 4 }}+ {{- end }}+ {{- with .Values.gateway.annotations }}+ annotations:+ {{- toYaml . | nindent 4 }}+ {{- end }}+spec:+ {{- with .Values.gateway.parentRefs }}+ parentRefs:+ {{- toYaml . | nindent 4 }}+ {{- end }}+ {{- with .Values.gateway.hostnames }}+ hostnames:+ {{- range . }}+ - {{ . | quote }}+ {{- end }}+ {{- end }}+ rules:+ {{- range .Values.gateway.rules }}+ - {{- with .matches }}+ matches:+ {{- toYaml . | nindent 8 }}+ {{- end }}+ {{- with .filters }}+ filters:+ {{- toYaml . | nindent 8 }}+ {{- end }}+ backendRefs:+ {{- range .backendRefs }}+ - name: {{ printf "%s-%s" $fullName .service }}+ port: {{ .port }}+ {{- end }}+ {{- end }}+{{- end }}diff --git a/charts/kaneo/values.yaml b/charts/kaneo/values.yamlindex 14c8da50d..d25d523a8 100644--- a/charts/kaneo/values.yaml+++ b/charts/kaneo/values.yaml@@ -187,4 +187,33 @@ ingress:pathType: ImplementationSpecificservice: apiport: 1337- tls: []\ No newline at end of file+ tls: []++# Gateway API configuration+gateway:+ enabled: false+ annotations: {}+ labels: {}+ parentRefs: []+ hostnames: []+ rules:+ - matches:+ - path:+ type: PathPrefix+ value: /api+ filters:+ - type: URLRewrite+ urlRewrite:+ path:+ type: ReplacePrefixMatch+ replacePrefixMatch: /+ backendRefs:+ - service: api+ port: 1337+ - matches:+ - path:+ type: PathPrefix+ value: /+ backendRefs:+ - service: web+ port: 80