forked from void-linux/void-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# K0S_CRI_SOCKET=remote:/run/containerd/containerd.sock | ||
# K0S_ENABLE_CLOUD_PROVIDER=true | ||
# K0S_PROFILE=default | ||
# K0S_TOKEN_FILE=/etc/k0s/worker.token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh -e | ||
. /etc/default/k0s-worker | ||
case ${K0S_CRI_SOCKET} in | ||
remote:*) | ||
sv check containerd | ||
;; | ||
docker:*) | ||
sv check docker | ||
;; | ||
esac | ||
|
||
exec k0s -c "/etc/k0s/k0s.conf" worker \ | ||
${K0S_CRI_SOCKET:+--cri-socket="$K0S_CRI_SOCKET"} \ | ||
${K0S_ENABLE_CLOUD_PROVIDER:+--enable-cloud-provider} \ | ||
${K0S_PROFILE:+--profile="$K0S_PROFILE"} \ | ||
--token-file=${K0S_TOKEN_FILE:-/etc/k0s/worker.token} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# K0S_ENABLE_WORKER=false | ||
# K0S_PROFILE=default | ||
# K0S_TOKEN_FILE=/etc/k0s/server.token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh -e | ||
. /etc/default/k0s | ||
|
||
exec chpst -u _k0s:_k0s k0s -c "/etc/k0s/k0s.conf" server \ | ||
${K0S_ENABLE_WORKER:+--enable-worker} \ | ||
${K0S_PROFILE:+--profile="${K0S_PROFILE}"} \ | ||
${K0S_TOKEN_FILE:+--token-file="${K0S_TOKEN_FILE}"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Template file for 'k0s' | ||
pkgname=k0s | ||
version=1.22.2.0 | ||
revision=1 | ||
_version=${version%.*}+k0s.${version##*.} | ||
wrksrc="${pkgname}-${_version//+/-}" | ||
build_style=go | ||
go_import_path=github.com/k0sproject/k0s | ||
hostmakedepends="which golangci-lint" | ||
depends="kubernetes containerd konnectivity-server etcd" | ||
short_desc="Zero Friction Kubernetes" | ||
maintainer="Enno Boland <gottox@voidlinux.org>" | ||
license="Apache-2.0" | ||
homepage="https://k0sproject.io/" | ||
distfiles="https://github.com/k0sproject/$pkgname/archive/v${_version}.tar.gz" | ||
checksum=42d4f52a5eddd19128648c2c5510217882e0ef0a880181a2a140bc46ed61728d | ||
system_accounts="_k0s" | ||
make_dirs="/var/lib/k0s 0755 _k0s _k0s" | ||
_k0s_homedir="/var/lib/k0s" | ||
_k0s_descr="k0s server user" | ||
conf_files=" | ||
/etc/default/*" | ||
if [ "$CROSS_BUILD" ]; then | ||
hostmakedepends+=" k0s" | ||
fi | ||
|
||
pre_build() { | ||
# Make sure files are generated correctly before actually building | ||
make EMBEDDED_BINS_BUILDMODE=none \ | ||
static/gen_manifests.go \ | ||
pkg/assets/zz_generated_offsets_linux.go | ||
} | ||
|
||
post_install() { | ||
vsv k0s | ||
vinstall ${FILESDIR}/k0s.default 644 /etc/default/ k0s | ||
|
||
vsv k0s-worker | ||
vinstall ${FILESDIR}/k0s-worker.default 644 /etc/default/ k0s-worker | ||
} |