Skip to content

Commit

Permalink
minor changes to allow patching of harvester-release.yaml for ARM bui…
Browse files Browse the repository at this point in the history
…lds. This change is needed to ensure correct kubevirt version is included in the harvester-release.yaml. This is essential to ensure the upgrade manifests script can succesfully reconcile the kubevirt version with expected version as part of the upgrade process
  • Loading branch information
ibrokethecloud committed Jan 17, 2025
1 parent 6982d88 commit fb089e8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
24 changes: 24 additions & 0 deletions scripts/package-harvester-os
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fi

mkdir -p ${ARTIFACTS_DIR}


source ${SCRIPTS_DIR}/version
source ${SCRIPTS_DIR}/version-rke2
source ${SCRIPTS_DIR}/version-rancher
Expand All @@ -23,6 +24,29 @@ source ${SCRIPTS_DIR}/version-monitoring
source ${SCRIPTS_DIR}/version-logging
source ${SCRIPTS_DIR}/lib/iso

# Revert harvester chart version patch to clean dirty git status
reset_charts() {
pushd ${TOP_DIR}/../harvester
git checkout -- ./deploy/charts
popd
}

source ${SCRIPTS_DIR}/hack/patch-harvester-chart
harvester_chart_path=${TOP_DIR}/../harvester/deploy/charts/harvester
## for arm based builds we need to patch harvester chart
## we need to temporarily copy the values.yaml for arm builds
## to ensure correct kubevirt version is used
## in the function until mutli-arch image builds are available in registry.suse.com for kubevirt sles15
if [ ${ARCH} == "arm64" ]
then
patch_harvester_chart ${harvester_chart_path}
fi

# ARM builds need this version before resetting the chart
HARVESTER_KUBEVIRT_VERSION=$(yq e '.kubevirt-operator.containers.operator.image.tag' ${harvester_chart_path}/values.yaml)
reset_charts


BASE_OS_IMAGE="rancher/harvester-os:sle-micro-head"
HARVESTER_OS_IMAGE=rancher/harvester-os:$VERSION

Expand Down
1 change: 0 additions & 1 deletion scripts/version-harvester
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
HARVESTER_VERSION=$(cd $1; source ./scripts/version &> /dev/null; echo $VERSION)
HARVESTER_APP_VERSION=$(cd $1; source ./scripts/version &> /dev/null; echo $APP_VERSION)
HARVESTER_CHART_VERSION=$(cd $1; source ./scripts/version &> /dev/null; echo $CHART_VERSION)
HARVESTER_KUBEVIRT_VERSION=$(yq e '.kubevirt-operator.containers.operator.image.tag' $1/deploy/charts/harvester/values.yaml)
HARVESTER_MIN_UPGRADABLE_VERSION=$(cd $1; source ./scripts/version &> /dev/null; echo $MIN_UPGRADABLE_VERSION)

0 comments on commit fb089e8

Please sign in to comment.