-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat(prometheus): Switch to upstream prometheus as the default Prometheus image #166
feat(prometheus): Switch to upstream prometheus as the default Prometheus image #166
Conversation
{{- define "prometheus.tag" -}} | ||
{{- printf "%s" (default (printf "%s" .Chart.AppVersion) .Values.prometheus.image.tag) }} | ||
{{- end -}} |
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.
We used this helper to set the Prometheus image based on the Chartfile's application version (BindPlane's version). This is no longer nessisary because the values file has a default value for prometheus.image.tag
.
@@ -1,5 +1,35 @@ | |||
{{- if not .Values.prometheus.remote }} | |||
{{- if not .Values.prometheus.enableSideCar }} | |||
apiVersion: v1 |
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.
These configurations match our specification, which can be found here or within the BindPlane repository under package/prometheus
.
@@ -50,7 +80,16 @@ spec: | |||
{{- end }} | |||
containers: | |||
- name: prometheus | |||
image: {{ .Values.prometheus.image.name }}:{{ include "prometheus.tag" . }} | |||
image: {{ .Values.prometheus.image.name }}:{{ .Values.prometheus.image.tag }} | |||
args: |
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.
These arguments match the args defined here.
Description of Changes
Some users have strict security requirements that require auditing of unapproved images, such as
ghcr.io/observiq/bindplane-prometheus
. This is a source of friction whenprom/prometheus
is already approved for use.This PR replaces
bindplane-prometheus
withprom/prometheus
. The end result is identical, as thebindplane-prometheus
image is just a wrapper aroundprom/prometheus
, with our configurations baked in.The following changes were required
This change will be transparent to the user. The latest and past few BindPlane releases used Prometheus v2.54.1, which is now the default
prometheus.image.tag
value. The configuration and entrypoint command remain unchanged.Testing
When the image is deployed, it has the following files in /etc/prometheus.
If you compare this to bindplane-prometheus, it is similar.
The file permissions are different, but that is okay. In this case,
0644
owned by root is sufficient for the Prometheus process to read the config files. We had more control over this before when we built our own images. We have less flexibility here when mounting config files into containers using volume mounts.Default / StatefulSet
I tested by deploying the "default" configuration.
After configuring a node agent, measurements begin flowing in.
High Availability w/ Upgrade and Downgrade
I tested HA with NATS + Postgres just to be certain.
I can switch back and forth between Charts
bindplane/bindplane
(latest release) and./charts/bindplane
(this branch) without issue. Simulating upgrades and downgrades.Topology, Agents page, and agent health all look good.
Please check that the PR fulfills these requirements