Skip to content

Commit 78542a0

Browse files
authored
[FIX] Ensure PROM_OPERATOR_CRD_VERSION matches Prometheus Operator version (#794)
1 parent c63002b commit 78542a0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

component_versions.env

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ PUSHGATEWAY_CHART_VERSION=3.4.0
6464
PUSHGATEWAY_FULL_IMAGE="quay.io/prometheus/pushgateway:v1.11.1"
6565

6666
#Prometheus Operator CRD
67-
PROM_OPERATOR_CRD_VERSION=v0.81.0
67+
##NOTE: PROM_OPERATOR_CRD_VERSION is now automatically
68+
## set to match the Prometheus Operator version.
69+
## However, it can still be set explicitly if need be.
6870

6971
#Tempo
7072
TEMPO_CHART_REPO=grafana

monitoring/bin/deploy_monitoring_cluster.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ fi
7878

7979
#Generate yaml file with all container-related keys
8080
generateImageKeysFile "$PROMOP_FULL_IMAGE" "monitoring/prom-operator_container_image.template"
81+
if [ -z "$PROM_OPERATOR_CRD_VERSION" ]; then
82+
log_debug "Setting PROM_OPERATOR_CRD_VERSION based on version [$VERSION] extracted from PROMOP_FULL_IMAGE"
83+
PROM_OPERATOR_CRD_VERSION="$VERSION"
84+
else
85+
log_info "PROM_OPERATOR_CRD_VERSION has been explicitly set to [$PROM_OPERATOR_CRD_VERSION]"
86+
fi
8187
generateImageKeysFile "$ALERTMANAGER_FULL_IMAGE" "$imageKeysFile" "ALERTMANAGER_"
8288
generateImageKeysFile "$ADMWEBHOOK_FULL_IMAGE" "$imageKeysFile" "ADMWEBHOOK_"
8389
generateImageKeysFile "$KSM_FULL_IMAGE" "$imageKeysFile" "KSM_"

0 commit comments

Comments
 (0)