Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/image-ami-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ jobs:
AWS_PROFILE: ditto-prod-primary
K8S_VERSION: ${{ github.event.inputs.k8s_version }}
TARGET_OS: flatcar
TARGET_ARCH: ${{ matrix.arch }}
run: |
./images/capi/update_k8s_version.sh && \
if [ "${{ matrix.arch }}" = "amd64" ]; then
Expand Down
10 changes: 8 additions & 2 deletions images/capi/update_k8s_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
set -euo pipefail

CLOUD="${CLOUD:-aws}"
K8S_VERSION="${K8S_VERSION:-1.31.4}"
K8S_VERSION="${K8S_VERSION:-1.31.13}"
TARGET_OS="${TARGET_OS:-ubuntu-2404}"
TARGET_ARCH="${TARGET_ARCH:-amd64}"

# Extract kubernetes series from version (e.g., "1.30.10" -> "v1.30")
K8S_SERIES="v$(echo "$K8S_VERSION" | cut -d. -f1,2)"
Expand All @@ -31,7 +32,12 @@ echo " crictl_version: $CRICTL_VERSION"
case "$CLOUD" in
aws)
# AWS-specific block to update AWS packer file
AWS_FILE=$(find ./images/capi/packer/ami -name "${TARGET_OS}.json" | head -n 1)
if [ "$TARGET_ARCH" = "arm64" ] && [ "$TARGET_OS" = "flatcar" ]; then
# special case for flatcar arm64
AWS_FILE=$(find ./images/capi/packer/ami -name "${TARGET_OS}-arm64.json" | head -n 1)
else
AWS_FILE=$(find ./images/capi/packer/ami -name "${TARGET_OS}.json" | head -n 1)
fi

if [ -z "$AWS_FILE" ]; then
echo "Error: ${TARGET_OS}.json file could not be found."
Expand Down