-
Notifications
You must be signed in to change notification settings - Fork 23
[wip]: add labels for prometheus monitoring #199
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
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,89 @@ | ||
| {{- if and .Values.ingress.enabled (eq .Values.ingress.ingressClass "traefik-external") .Values.license.licenseDomain }} | ||
|
|
||
| apiVersion: traefik.io/v1alpha1 | ||
| kind: IngressRoute | ||
| metadata: | ||
| name: {{ .Release.Name }}-ingress | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: plane-ingress | ||
| app.kubernetes.io/component: ingress | ||
| app.kubernetes.io/part-of: plane-enterprise | ||
| app.kubernetes.io/managed-by: helm | ||
| 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 }} | ||
|
|
||
| {{- 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-external") }} | ||
| 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 |
|---|---|---|
|
|
@@ -5,8 +5,16 @@ kind: Service | |
| metadata: | ||
| namespace: {{ .Release.Namespace }} | ||
| name: {{ .Release.Name }}-pgdb | ||
| {{- if and .Values.monitoring .Values.monitoring.enabled }} | ||
| annotations: | ||
| {{- include "plane.prometheusAnnotations" (dict "port" (.Values.services.postgres.servicePort | toString) "root" .) | nindent 4 }} | ||
| {{- end }} | ||
|
Comment on lines
+8
to
+11
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. Prometheus scrape annotations on PostgreSQL will fail — vanilla Postgres doesn't expose The standard Either:
🤖 Prompt for AI Agents |
||
| labels: | ||
| app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-pgdb | ||
| app.kubernetes.io/name: plane-postgres | ||
| app.kubernetes.io/component: postgres | ||
| app.kubernetes.io/part-of: plane-enterprise | ||
| app.kubernetes.io/managed-by: helm | ||
| spec: | ||
| type: ClusterIP | ||
| {{- if not .Values.services.postgres.assign_cluster_ip }} | ||
|
|
@@ -35,6 +43,11 @@ spec: | |
| metadata: | ||
| labels: | ||
| app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-pgdb | ||
| app.kubernetes.io/name: plane-postgres | ||
| app.kubernetes.io/component: postgres | ||
| app.kubernetes.io/part-of: plane-enterprise | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| app.kubernetes.io/version: {{ .Values.planeVersion }} | ||
| spec: | ||
| containers: | ||
| - image: {{ .Values.services.postgres.image }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,8 +5,16 @@ kind: Service | |
| metadata: | ||
| namespace: {{ .Release.Namespace }} | ||
| name: {{ .Release.Name }}-redis | ||
| {{- if and .Values.monitoring .Values.monitoring.enabled }} | ||
| annotations: | ||
| {{- include "plane.prometheusAnnotations" (dict "port" (.Values.services.redis.servicePort | toString) "root" .) | nindent 4 }} | ||
| {{- end }} | ||
| labels: | ||
| app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-redis | ||
| app.kubernetes.io/name: plane-redis | ||
| app.kubernetes.io/component: redis | ||
| app.kubernetes.io/part-of: plane-enterprise | ||
| app.kubernetes.io/managed-by: helm | ||
| spec: | ||
| type: ClusterIP | ||
| {{- if not .Values.services.redis.assign_cluster_ip }} | ||
|
|
@@ -38,6 +46,11 @@ spec: | |
| metadata: | ||
| labels: | ||
| app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-redis | ||
| app.kubernetes.io/name: plane-redis | ||
| app.kubernetes.io/component: redis | ||
| app.kubernetes.io/part-of: plane-enterprise | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| app.kubernetes.io/version: {{ .Values.planeVersion }} | ||
|
Comment on lines
+49
to
+53
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. Quote If Proposed fix- app.kubernetes.io/version: {{ .Values.planeVersion }}
+ app.kubernetes.io/version: {{ .Values.planeVersion | quote }}Apply the same change in every workload template where this label appears. 🤖 Prompt for AI Agents |
||
| spec: | ||
| containers: | ||
| - image: {{ .Values.services.redis.image }} | ||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: makeplane/helm-charts
Length of output: 245
🏁 Script executed:
Repository: makeplane/helm-charts
Length of output: 1440
🏁 Script executed:
Repository: makeplane/helm-charts
Length of output: 210
🌐 Web query:
Traefik v1alpha1 API group traefik.io vs traefik.containo.us version history💡 Result:
API group history (Kubernetes CRDs) —
traefik.containo.usvstraefik.ioTraefik v2.0 → v2.9: Traefik’s CRDs used the API group
traefik.containo.us(e.g.,traefik.containo.us/v1alpha1). This is shown in the original Traefik v2 CRD examples/docs. [1] [2]Traefik v2.10: Traefik introduced the new CRD API group
traefik.ioand deprecatedtraefik.containo.us(with the stated intention to remove it in v3). In v2.10, the CRD provider still supports bothtraefik.io/v1alpha1andtraefik.containo.us/v1alpha1during the transition. [3] [4]Traefik v3.x: The
traefik.containo.usAPI group is removed; you must usetraefik.io(e.g.,traefik.io/v1alpha1). [5]Practical takeaway:
If you’re on v2.10.x, you can run with both installed while you migrate manifests, but v3 requires
traefik.io/*only. [4] [5]Sources
[1] https://traefik.io/blog/back-to-traefik-2-0-2f9aa17be305/
[2] https://doc.traefik.io/traefik/v2.4/reference/dynamic-configuration/kubernetes-crd/
[3] https://traefik.io/blog/announcing-traefik-proxy-2-10
[4] https://doc.traefik.io/traefik/v3.3/migration/v2/
[5] https://doc.traefik.io/traefik/master/migration/v2-to-v3-details/
Document the minimum Traefik version requirement.
The chart uses
traefik.io/v1alpha1, which requires Traefik v2.10+ or v3. Older versions (v2.0–v2.9) usetraefik.containo.us/v1alpha1and are incompatible. Add a documented minimum version constraint to the Helm chart (Chart.yaml or README) to prevent silent failures on unsupported Traefik installations.🤖 Prompt for AI Agents