Remove version pinned Prometheus operator
Overview
When upgrading the Prometheus Operator in https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/13973 we had to use a specific SHA since we required a fix that wasn't tagged yet.
This was done in gitlab-com/gl-infra/k8s-workloads/gitlab-helmfiles!499 (merged) specifying the image keyword
Proposal
-
Wait for https://github.com/prometheus-operator/prometheus-operator to release a new tag -
Check which tag provides https://github.com/prometheus-operator/prometheus-operator/commit/0a38647379a5e93f639bf8e634deabcc32e01fb6 by running git describe --contains "0a38647379a5e93f639bf8e634deabcc32e01fb6" -
When a new release is cut, use that tag instead of master@sha -
Update README to specify the correct CRD -
Update the CRDs to a specific tag as well kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$TAG/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$TAG/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$TAG/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$TAG/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$TAG/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$TAG/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$TAG/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$TAG/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
Edited by Steve Xuereb