UNCLASSIFIED - NO CUI

The upgrade job doesn't handle semvers with trailing git metadata

Motivation

When thanos is deployed by Big Bang and the helm release is configured with a Revision reconcile strategy as opposed to the default ChartVersion strategy, flux will append the version in helm.sh/chart with git metadata:

  labels:
    helm.sh/chart: thanos-17.3.3-bb.1_6042613bc445

This runs afoul of helm's built in semver comparison function, causing failures during upgrade:

Warning  UpgradeFailed  12s  helm-controller  Helm upgrade failed for release thanos/thanos with chart thanos@17.3.3-bb.1+72afe1173a6d: templat
e: thanos/templates/bigbang/upgrade/serviceAccount.yaml:1:7: executing "thanos/templates/bigbang/upgrade/serviceAccount.yaml" at <include "thanos
.shouldDeployUpgradeResources" .>: error calling include: template: thanos/templates/bigbang/upgrade/_helpers.tpl:8:11: executing "thanos.shouldD
eployUpgradeResources" at <semverCompare (print "<" $upgradeVersion) $currentVersion>: error calling semverCompare: invalid semantic version

Acceptance Criteria

  • The upgrade job enablement helper must strip any characters from the version that would break helm's built-in semverCompare function.
  • The upgrade job must function correctly when thanos is installed with an HR employing the Revision reconciliation strategy