Skip to content

Commit

Permalink
Helm: add triggering-actor to container metadata (#1938)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoomlam authored Aug 21, 2023
1 parent b549aea commit 5bb3a5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/update-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ jobs:
echo "::group::Prepping for Helm chart: ${{inputs.helm_chart}}"
export K8S_INFO=true
export WAIT_TIMEOUT=10m
export TRIGGERING_ACTOR="${{github.triggering_actor}}"
# Load default values for *_VER environment variables, which pin image versions
source scripts/image_vars.src
Expand Down
1 change: 1 addition & 0 deletions helm/_shared/named_templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# Don't add annotations that change frequently (like global.commitSha) as it will cause the pod to be updated
vro/environment: {{ .Values.global.environment }}
vro/image-repo: {{ .Values.global.images.repo }}
vro/triggering-actor: {{ .Values.global.triggeringActor }}
# annotations is a map[string] to string values; print and quote it in case it's a number
vro/image-tag: {{ include "vro.imageTag" . | print | quote }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions helm/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fi
RELEASE_NAME="vro-$HELM_CHART"
NAMESPACE=va-abd-rrd-${TARGET_ENV}
: ${GITHUB_SHA:=$(git rev-parse HEAD)}
: ${TRIGGERING_ACTOR:=$USER}

#echo -e "TARGET_ENV=$TARGET_ENV \t HELM_CHART=HELM_CHART \t IMAGE_TAG=$IMAGE_TAG"
#echo -e "RELEASE_NAME=$RELEASE_NAME \t NAMESPACE=$NAMESPACE \t GITHUB_SHA=$GITHUB_SHA"
Expand Down Expand Up @@ -110,6 +111,7 @@ helm upgrade "$RELEASE_NAME" "helm/$HELM_CHART" -n "${NAMESPACE}" \
--install --reset-values \
--set-string "global.imageTag=${IMAGE_TAG}" \
--set-string "global.commitSha=${GITHUB_SHA}" \
--set-string "global.triggeringActor=${TRIGGERING_ACTOR}" \
${HELM_ARGS}
set +x

Expand Down

0 comments on commit 5bb3a5b

Please sign in to comment.