From d6476db64d0cff6c97ee5987b761091db1bc5f7f Mon Sep 17 00:00:00 2001 From: forehalo Date: Tue, 27 May 2025 10:53:38 +0000 Subject: [PATCH] chore: use PodMonitoring in charts instead (#12571) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary by CodeRabbit - **Refactor** - Updated monitoring configuration to use a different resource type with simplified naming and label selectors for Kubernetes manifests. - **Chores** - Removed Google Cloud Platform–specific monitoring configuration files from multiple components. --- .../affine/charts/graphql/templates/monitoring.yaml | 12 ------------ .../affine/charts/renderer/templates/monitoring.yaml | 12 ------------ .../affine/charts/sync/templates/monitoring.yaml | 12 ------------ .../{charts/doc => }/templates/monitoring.yaml | 7 ++++--- 4 files changed, 4 insertions(+), 39 deletions(-) delete mode 100644 .github/helm/affine/charts/graphql/templates/monitoring.yaml delete mode 100644 .github/helm/affine/charts/renderer/templates/monitoring.yaml delete mode 100644 .github/helm/affine/charts/sync/templates/monitoring.yaml rename .github/helm/affine/{charts/doc => }/templates/monitoring.yaml (58%) diff --git a/.github/helm/affine/charts/graphql/templates/monitoring.yaml b/.github/helm/affine/charts/graphql/templates/monitoring.yaml deleted file mode 100644 index dac89475f6..0000000000 --- a/.github/helm/affine/charts/graphql/templates/monitoring.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if eq .Values.global.deployment.platform "gcp" -}} -apiVersion: monitoring.googleapis.com/v1 -kind: ClusterPodMonitoring -metadata: - name: "{{ include "graphql.fullname" . }}" -spec: - selector: - {{- include "graphql.selectorLabels" . | nindent 4 }} - endpoints: - - port: 9464 - interval: 30s -{{- end }} diff --git a/.github/helm/affine/charts/renderer/templates/monitoring.yaml b/.github/helm/affine/charts/renderer/templates/monitoring.yaml deleted file mode 100644 index b10c75d69a..0000000000 --- a/.github/helm/affine/charts/renderer/templates/monitoring.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if eq .Values.global.deployment.platform "gcp" -}} -apiVersion: monitoring.googleapis.com/v1 -kind: ClusterPodMonitoring -metadata: - name: "{{ include "renderer.fullname" . }}" -spec: - selector: - {{- include "renderer.selectorLabels" . | nindent 4 }} - endpoints: - - port: 9464 - interval: 30s -{{- end }} diff --git a/.github/helm/affine/charts/sync/templates/monitoring.yaml b/.github/helm/affine/charts/sync/templates/monitoring.yaml deleted file mode 100644 index 86944a88bd..0000000000 --- a/.github/helm/affine/charts/sync/templates/monitoring.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if eq .Values.global.deployment.platform "gcp" -}} -apiVersion: monitoring.googleapis.com/v1 -kind: ClusterPodMonitoring -metadata: - name: "{{ include "sync.fullname" . }}" -spec: - selector: - {{- include "sync.selectorLabels" . | nindent 4 }} - endpoints: - - port: 9464 - interval: 30s -{{- end }} diff --git a/.github/helm/affine/charts/doc/templates/monitoring.yaml b/.github/helm/affine/templates/monitoring.yaml similarity index 58% rename from .github/helm/affine/charts/doc/templates/monitoring.yaml rename to .github/helm/affine/templates/monitoring.yaml index 16ab8f0fc2..661661f67f 100644 --- a/.github/helm/affine/charts/doc/templates/monitoring.yaml +++ b/.github/helm/affine/templates/monitoring.yaml @@ -1,11 +1,12 @@ {{- if eq .Values.global.deployment.platform "gcp" -}} apiVersion: monitoring.googleapis.com/v1 -kind: ClusterPodMonitoring +kind: PodMonitoring metadata: - name: "{{ include "doc.fullname" . }}" + name: "{{ .Release.Name }}-monitoring" spec: selector: - {{- include "doc.selectorLabels" . | nindent 4 }} + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name }} endpoints: - port: 9464 interval: 30s