Add k3s bundle

This commit is contained in:
Ettore Di Giacinto
2022-07-16 21:23:14 +00:00
committed by GitHub
parent 39bc33c326
commit 3265bd6927
2 changed files with 37 additions and 0 deletions

24
packages/k3s/build.yaml Normal file
View File

@@ -0,0 +1,24 @@
requires:
- name: "toolchain-go"
category: "development"
version: ">=0"
prelude:
{{$arch:=(default .Values.arch "amd64")}}
{{ if eq $arch "amd64" }}
- wget https://github.com/k3s-io/k3s/releases/download/v{{.Values.version}}+k3s{{.Values.k3s_version}}/k3s
{{ else }}
{{ if eq $arch "arm" }}
{{$arch:="arm64"}}
{{end}}
- wget https://github.com/k3s-io/k3s/releases/download/v{{.Values.version}}+k3s{{.Values.k3s_version}}/k3s-{{$arch}}
{{ end }}
- /bin/bash -c 'echo "{{ ( index .Values (print "checksum-" $arch) ) }} k3s" | sha256sum -c'
steps:
- |
mv {{.Values.name}} /usr/local/bin/
- chmod +x /usr/local/bin/{{.Values.name}}
includes:
- /usr/local/bin/{{.Values.name}}
# TODO: service files for openrc/systemd

View File

@@ -0,0 +1,13 @@
packages:
- name: k3s
category: bundle
checksum-amd64: "c3c816290461dc0e8e632e70ceb0f771382629860a851ae88545c816beb9797c"
version: "1.24.2"
k3s_version: "2"
labels:
github.repo: "k3s-io"
github.owner: "k3s"
uri:
- https://github.com/k3s-io/k3s
license: "APL-2"
description: " Lightweight Kubernetes "