Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit a9e56c1

Browse files
committed
Fixed check for github release asset
1 parent 4913952 commit a9e56c1

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

tools/k3s/Dockerfile.template

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,26 @@ ARG name
77
ARG version
88
COPY k3s.service ${prefix}${target}/etc/systemd/system/
99
RUN <<EOF
10-
check-github-release-asset "k3s-io/k3s" "${version}" "k3s"
10+
echo "### Setting architecture string for ${TARGETPLATFORM}"
11+
case "${arch}" in
12+
x86_64)
13+
export arch_suffix=""
14+
;;
15+
aarch64)
16+
export arch_suffix="-${alt_arch}"
17+
;;
18+
*)
19+
echo "ERROR: Unsupported architecture ${arch}."
20+
exit 1
21+
;;
22+
esac
23+
echo " Using ${arch_suffix}"
24+
25+
check-github-release-asset "k3s-io/k3s" "v${version}" "k3s${arch_suffix}
26+
27+
echo "### Downloading ${name} ${version}"
1128
curl --silent --location --fail --output "${prefix}${target}/bin/k3s" \
12-
"https://github.com/k3s-io/k3s/releases/download/v${version}/k3s"
29+
"https://github.com/k3s-io/k3s/releases/download/v${version}/k3s${arch_suffix}"
1330
chmod +x "${prefix}${target}/bin/k3s"
1431
"${prefix}${target}/bin/k3s" completion bash >"${prefix}${target}/share/bash-completion/completions/k3s"
1532
"${prefix}${target}/bin/k3s" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_k3s"

tools/k3s/manifest.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: k3s
22
version: "1.27.4+k3s1"
33
check: ${binary} --version | head -n 1 | cut -d' ' -f3 | tr -d v
4+
platforms:
5+
- linux/amd64
6+
- linux/arm64
47
tags:
58
- org/cncf
69
- type/cli

0 commit comments

Comments
 (0)