From b2cd98fc8c056f2663d9a67390be6df114284b8d Mon Sep 17 00:00:00 2001 From: Ponnia <151670616+Ponnia-M@users.noreply.github.com> Date: Thu, 22 Aug 2024 17:48:43 -0400 Subject: [PATCH] Remove vro prefix for rabbitmq image (#3375) * Automate enablement of prometheus plugin * remove vro prefix for rabbitmq * Update deployment.yaml * Update deployment.yaml * Update image-names.sh --- .../charts/rabbitmq/templates/deployment.yaml | 2 +- scripts/image-names.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/helm/platform/charts/rabbitmq/templates/deployment.yaml b/helm/platform/charts/rabbitmq/templates/deployment.yaml index ce2b328fde..4c610e9cb3 100644 --- a/helm/platform/charts/rabbitmq/templates/deployment.yaml +++ b/helm/platform/charts/rabbitmq/templates/deployment.yaml @@ -17,7 +17,7 @@ spec: {{- include "vro.imagePullSecrets" . | nindent 6 }} containers: - name: rabbitmq{{ include "vro.containerSuffix" . }} - image: {{ include "vro.imageRegistryPath" . }}vro-rabbitmq:{{ .Values.imageTag }} + image: {{ include "vro.imageRegistryPath" . }}rabbitmq:{{ .Values.imageTag }} env: - name: RABBITMQ_USERNAME {{- include "vro.valueFromSecret.rabbitmqUser" . | nindent 14 }} diff --git a/scripts/image-names.sh b/scripts/image-names.sh index ae1ae1d8f6..1b4ef3929b 100755 --- a/scripts/image-names.sh +++ b/scripts/image-names.sh @@ -15,9 +15,16 @@ bashVarPrefix() { echo "${1//-/}" } -# These names must match the images specified in Helm configs +# These names must match the images specified in Helm configs; with the exception of rabbitmq. +# Specifically, this condition ensures that our RabbitMQ image is named "rabbitmq" instead of "vro-rabbitmq", while +# all other images retain the "vro-" prefix. This adjustment will allow LHDI Datadog agent's autodiscovery feature to correctly +# match our rabbitmq container image name thereby resulting in the capturing of metrics. prodImageName() { - echo "vro-$1" + if [ "$1" == "rabbitmq" ]; then + echo "rabbitmq" + else + echo "vro-$1" + fi } # These names should match directory names.