From 98e92275f35e0a88464777b677ff640dbf4638b1 Mon Sep 17 00:00:00 2001 From: jsirianni Date: Thu, 15 Feb 2024 13:53:40 -0500 Subject: [PATCH] use bindplane prometheus image and remove configmap --- charts/bindplane/templates/bindplane.yaml | 18 +------------ .../templates/prometheus_config.yaml | 27 ------------------- 2 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 charts/bindplane/templates/prometheus_config.yaml diff --git a/charts/bindplane/templates/bindplane.yaml b/charts/bindplane/templates/bindplane.yaml index 47c8a08c..bf0763a5 100644 --- a/charts/bindplane/templates/bindplane.yaml +++ b/charts/bindplane/templates/bindplane.yaml @@ -368,7 +368,7 @@ spec: {{- if eq (include "bindplane.deployment_type" .) "StatefulSet" }} {{- if and (.Values.prometheus.enable) (.Values.prometheus.enableSideCar) }} - name: prometheus - image: prom/prometheus:v2.47.2 + image: ghcr.io/observiq/bindplane-prometheus:{{ include "bindplane.tag" . }} ports: - containerPort: 9090 name: http @@ -392,15 +392,6 @@ spec: capabilities: drop: ["ALL"] volumeMounts: - - name: {{ include "bindplane.fullname" . }}-prometheus-config - mountPath: /etc/prometheus/prometheus.yml - subPath: prometheus.yml - - name: {{ include "bindplane.fullname" . }}-prometheus-config - mountPath: /etc/prometheus/rules.yml - subPath: rules.yml - - name: {{ include "bindplane.fullname" . }}-prometheus-config - mountPath: /etc/prometheus/web.yml - subPath: web.yml - name: {{ include "bindplane.fullname" . }}-prometheus-data mountPath: /var/lib/prometheus/tsdb {{- end }} @@ -439,13 +430,6 @@ spec: secretName: {{ .Values.prometheus.tls.secret.name }} {{- end }} {{- end }} - {{- if eq (include "bindplane.deployment_type" .) "StatefulSet" }} - {{- if and (.Values.prometheus.enable) (.Values.prometheus.enableSideCar) }} - - name: {{ include "bindplane.fullname" . }}-prometheus-config - configMap: - name: {{ include "bindplane.fullname" . }}-prometheus-config - {{- end }} - {{- end }} {{- if eq (include "bindplane.deployment_type" .) "StatefulSet" }} volumeClaimTemplates: {{- if eq .Values.backend.type "bbolt" }} diff --git a/charts/bindplane/templates/prometheus_config.yaml b/charts/bindplane/templates/prometheus_config.yaml deleted file mode 100644 index 9372959c..00000000 --- a/charts/bindplane/templates/prometheus_config.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if eq (include "bindplane.deployment_type" .) "StatefulSet" }} -{{- if and (.Values.prometheus.enable) (.Values.prometheus.enableSideCar) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "bindplane.fullname" . }}-prometheus-config - labels: - app.kubernetes.io/name: {{ include "bindplane.name" . }} - app.kubernetes.io/stack: bindplane - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} -data: - prometheus.yml: | - scrape_configs: [] - rule_files: [/etc/prometheus/rules.yml] - rules.yml: | - groups: - - name: configuration-rollups - interval: 1m - rules: - - record: bindplane_agent_measurements:rollup:rate:1m - expr: sum without (agent) (rate(bindplane_agent_measurements{}[1m9s999ms] offset 10s)) - web.yml: | - # web.yml is empty but must be present for Prometheus to start -{{- end }} -{{- end }} -