-
Notifications
You must be signed in to change notification settings - Fork 23
[feat]: Implement Traefik ingress support in Plane-EE Helm chart #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e2653d7
c526cee
f4ab03c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| {{- if and .Values.ingress.enabled (eq .Values.ingress.ingressClass "traefik") .Values.license.licenseDomain }} | ||
|
|
||
| apiVersion: traefik.io/v1alpha1 | ||
| kind: IngressRoute | ||
| metadata: | ||
| name: {{ .Release.Name }}-ingress | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| entryPoints: | ||
| - websecure | ||
|
|
||
| routes: | ||
|
|
||
| # IMPORTANT: specific paths FIRST | ||
|
|
||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/spaces/`) | ||
| kind: Rule | ||
| services: | ||
| - name: {{ .Release.Name }}-space | ||
| port: 3000 | ||
|
|
||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/god-mode/`) | ||
| kind: Rule | ||
| services: | ||
| - name: {{ .Release.Name }}-admin | ||
| port: 3000 | ||
|
|
||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/api/`) | ||
| kind: Rule | ||
| services: | ||
| - name: {{ .Release.Name }}-api | ||
| port: 8000 | ||
|
|
||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/auth/`) | ||
| kind: Rule | ||
| services: | ||
| - name: {{ .Release.Name }}-api | ||
| port: 8000 | ||
|
|
||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/graphql/`) | ||
| kind: Rule | ||
| services: | ||
| - name: {{ .Release.Name }}-api | ||
| port: 8000 | ||
|
|
||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/marketplace/`) | ||
| kind: Rule | ||
| services: | ||
| - name: {{ .Release.Name }}-api | ||
| port: 8000 | ||
|
|
||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/live/`) | ||
| kind: Rule | ||
| services: | ||
| - name: {{ .Release.Name }}-live | ||
| port: 3000 | ||
|
|
||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/silo/`) | ||
| kind: Rule | ||
| services: | ||
| - name: {{ .Release.Name }}-silo | ||
| port: 3000 | ||
|
|
||
| {{- if and .Values.services.minio.local_setup .Values.env.docstore_bucket }} | ||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/{{ .Values.env.docstore_bucket }}`) | ||
| kind: Rule | ||
| services: | ||
| - name: {{ .Release.Name }}-minio | ||
| port: 9000 | ||
| {{- end }} | ||
|
|
||
| # LAST: catch all | ||
| - match: Host(`{{ .Values.license.licenseDomain }}`) && PathPrefix(`/`) | ||
| kind: Rule | ||
| middlewares: | ||
| - name: {{ .Release.Name }}-body-limit | ||
| services: | ||
| - name: {{ .Release.Name }}-web | ||
| port: 3000 | ||
|
|
||
| tls: | ||
| secretName: {{ default (printf "%s-ssl-cert" .Release.Name) .Values.ssl.tls_secret_name }} | ||
|
Comment on lines
+81
to
+82
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No HTTP-to-HTTPS redirect or cert-manager integration. Two things to be aware of:
Consider documenting these gaps in the chart's README or 🤖 Prompt for AI Agents |
||
|
|
||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| {{- if and .Values.ingress.enabled (eq .Values.ingress.ingressClass "traefik") }} | ||
| apiVersion: traefik.io/v1alpha1 | ||
| kind: Middleware | ||
| metadata: | ||
| name: {{ .Release.Name }}-body-limit | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| buffering: | ||
| maxRequestBodyBytes: 5242880 | ||
|
|
||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| {{- $traefik := .Values.ingress.traefik | default dict }} | ||
| {{- if and .Values.ingress.enabled (eq .Values.ingress.ingressClass "traefik") ($traefik.createSecretReadRBAC) }} | ||
| # Role: allows reading secrets in this namespace (for TLS certs used by IngressRoute). | ||
| # RoleBinding: grants the Traefik controller's service account that permission. | ||
| # Required so Traefik can load the TLS certificate referenced in the IngressRoute. | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| name: {{ .Release.Name }}-traefik-secret-reader | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: plane-enterprise | ||
| app.kubernetes.io/component: traefik-rbac | ||
| app.kubernetes.io/managed-by: helm | ||
| rules: | ||
| - apiGroups: [""] | ||
| resources: ["secrets"] | ||
| verbs: ["get", "list", "watch"] | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: {{ .Release.Name }}-traefik-secret-reader | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: plane-enterprise | ||
| app.kubernetes.io/component: traefik-rbac | ||
| app.kubernetes.io/managed-by: helm | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ $traefik.serviceAccountName | default "traefik" }} | ||
| namespace: {{ $traefik.serviceAccountNamespace | default "traefik" }} | ||
| roleRef: | ||
| kind: Role | ||
| name: {{ .Release.Name }}-traefik-secret-reader | ||
| apiGroup: rbac.authorization.k8s.io | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -27,6 +27,7 @@ ingress: | |||||
| rabbitmqHost: '' | ||||||
| ingressClass: 'nginx' | ||||||
| ingress_annotations: { "nginx.ingress.kubernetes.io/proxy-body-size": "5m" } | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Default
Possible fix- ingress_annotations: { "nginx.ingress.kubernetes.io/proxy-body-size": "5m" }
+ ingress_annotations: {}Users who select 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| # ingressClass: 'traefik' | ||||||
|
|
||||||
| ssl: | ||||||
| tls_secret_name: '' # If you have a custom TLS secret name | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Body-limit middleware applied only to the catch-all, not to API/upload routes.
In the nginx Ingress the
proxy-body-size: 5mannotation applies globally to all paths. Here thebody-limitmiddleware is only on the/catch-all, leaving/api/,/auth/, etc. without a request-body cap. If the intent is to enforce a 5 MB upload limit consistently, the middleware should be attached to all routes (or at least the API route that handles uploads).If selective application is intentional, a brief comment explaining the rationale would help future maintainers.
🤖 Prompt for AI Agents