Skip to content

Commit

Permalink
feat(prometheus): Use bindplane-prometheus container image (#87)
Browse files Browse the repository at this point in the history
* use bindplane prometheus image and remove configmap

* remove args, they are set in the container image already. updaste volume mount to use /prometheus, the correct path for the bindplane-prometheus image

* pin sidecar test version
  • Loading branch information
jsirianni committed Feb 19, 2024
1 parent d9d8bc7 commit cf61465
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 54 deletions.
29 changes: 2 additions & 27 deletions charts/bindplane/templates/bindplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -368,19 +368,10 @@ 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
args:
- --config.file=/etc/prometheus/prometheus.yml
- --web.config.file=/etc/prometheus/web.yml
- --storage.tsdb.retention.time=2d
- --web.enable-remote-write-receiver
- --web.listen-address={{ .Values.prometheus.host }}:{{ .Values.prometheus.port }}
- --storage.tsdb.path=/var/lib/prometheus/tsdb
- --web.console.templates=/etc/prometheus/consoles
- --web.console.libraries=/etc/prometheus/console_libraries
{{- with .Values.prometheus.sidecar.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand All @@ -392,17 +383,8 @@ 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
mountPath: /prometheus
{{- end }}
{{- end }}
terminationGracePeriodSeconds: 60
Expand Down Expand Up @@ -439,13 +421,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" }}
Expand Down
27 changes: 0 additions & 27 deletions charts/bindplane/templates/prometheus_config.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions test/cases/prometheus_sidecar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ config:
prometheus:
enable: true
enableSideCar: true

# TODO(jsirianni): Can be removed after 1.45 release.
image:
tag: 1.43.0

0 comments on commit cf61465

Please sign in to comment.