Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: k0s-0.9.1
@ 2021-02-04 12:45 Gottox
  2021-02-04 12:47 ` [PR PATCH] [Updated] " Gottox
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Gottox @ 2021-02-04 12:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]

There is a new pull request by Gottox against master on the void-packages repository

https://github.com/Gottox/void-packages k0s-0.9.1
https://github.com/void-linux/void-packages/pull/28478

New package: k0s-0.9.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl (kubernetes is cross-broken)
  - [ ] armv7l (kubernetes is cross-broken)
  - [ ] armv6l-musl (kubernetes is cross-broken)
-->

A patch file from https://github.com/void-linux/void-packages/pull/28478.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-k0s-0.9.1-28478.patch --]
[-- Type: text/x-diff, Size: 4056 bytes --]

From d2fd7b1076d2affa5a2ad289fb5c265e755c8a0c Mon Sep 17 00:00:00 2001
From: Enno Boland <gottox@voidlinux.org>
Date: Thu, 4 Feb 2021 13:41:45 +0100
Subject: [PATCH] New package: k0s-0.9.1

---
 srcpkgs/k0s/INSTALL                  |  5 ++++
 srcpkgs/k0s/files/k0s-worker.default |  4 +++
 srcpkgs/k0s/files/k0s-worker/run     | 16 ++++++++++
 srcpkgs/k0s/files/k0s.default        |  2 ++
 srcpkgs/k0s/files/k0s/run            |  7 +++++
 srcpkgs/k0s/template                 | 44 ++++++++++++++++++++++++++++
 6 files changed, 78 insertions(+)
 create mode 100644 srcpkgs/k0s/INSTALL
 create mode 100644 srcpkgs/k0s/files/k0s-worker.default
 create mode 100755 srcpkgs/k0s/files/k0s-worker/run
 create mode 100644 srcpkgs/k0s/files/k0s.default
 create mode 100755 srcpkgs/k0s/files/k0s/run
 create mode 100644 srcpkgs/k0s/template

diff --git a/srcpkgs/k0s/INSTALL b/srcpkgs/k0s/INSTALL
new file mode 100644
index 00000000000..bbf002e847e
--- /dev/null
+++ b/srcpkgs/k0s/INSTALL
@@ -0,0 +1,5 @@
+case "${ACTION}" in
+post)
+	chmod 755 var/lib/k0s
+	;;
+esac
diff --git a/srcpkgs/k0s/files/k0s-worker.default b/srcpkgs/k0s/files/k0s-worker.default
new file mode 100644
index 00000000000..98722f4fa32
--- /dev/null
+++ b/srcpkgs/k0s/files/k0s-worker.default
@@ -0,0 +1,4 @@
+# CRI_SOCKET=remote:/run/containerd/containerd.sock
+# ENABLE_CLOUD_PROVIDER=true
+# PROFILE=default
+# TOKEN_FILE=/etc/k0s/worker.token
diff --git a/srcpkgs/k0s/files/k0s-worker/run b/srcpkgs/k0s/files/k0s-worker/run
new file mode 100755
index 00000000000..a61549f8779
--- /dev/null
+++ b/srcpkgs/k0s/files/k0s-worker/run
@@ -0,0 +1,16 @@
+#!/bin/sh
+. /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}
diff --git a/srcpkgs/k0s/files/k0s.default b/srcpkgs/k0s/files/k0s.default
new file mode 100644
index 00000000000..a5e01dbf7c4
--- /dev/null
+++ b/srcpkgs/k0s/files/k0s.default
@@ -0,0 +1,2 @@
+# ENABLE_WORKER=false
+# 
diff --git a/srcpkgs/k0s/files/k0s/run b/srcpkgs/k0s/files/k0s/run
new file mode 100755
index 00000000000..406d066b5d7
--- /dev/null
+++ b/srcpkgs/k0s/files/k0s/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+. /etc/default/k0s-worker
+
+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}"}
diff --git a/srcpkgs/k0s/template b/srcpkgs/k0s/template
new file mode 100644
index 00000000000..baae346a23c
--- /dev/null
+++ b/srcpkgs/k0s/template
@@ -0,0 +1,44 @@
+# Template file for 'k0s'
+pkgname=k0s
+version=0.9.1
+revision=1
+build_style=go
+go_import_path=github.com/k0sproject/k0s
+hostmakedepends="which golangci-lint"
+depends="kubernetes>1.20_1 containerd>=1.3.9_1"
+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=d67c48a61370610554d15fc61e23ac6b819f73c9dcb2c4d19fdde494e3d55dc9
+system_accounts="_k0s"
+_k0s_homedir="/var/lib/k0s"
+_k0s_shell="/bin/nologin"
+_k0s_descr="k0s server user"
+make_dirs="/var/lib/k0s 0750 _k0s _k0s"
+conf_files="/etc/k0s/k0s.conf"
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" k0s"
+fi
+
+pre_build() {
+	# Make sure files are generated correctly before actually building
+	make EMBEDDED_BINS_BUILDMODE=none generate-bindata
+}
+
+post_install() {
+	local K0S=$DESTDIR/usr/bin/k0s
+	if [ "$CROSS_BUILD" ]; then
+		K0S=k0s
+	fi
+	vsv k0s
+	vinstall ${FILESDIR}/k0s.default 644 /etc/default/ k0s
+
+	vsv k0s-worker
+	vinstall ${FILESDIR}/k0s-worker.default 644 /etc/default/ k0s-worker
+
+	vmkdir etc/k0s
+
+	$K0S default-config > $DESTDIR/etc/k0s/k0s.conf
+}

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-05-21 13:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 12:45 [PR PATCH] New package: k0s-0.9.1 Gottox
2021-02-04 12:47 ` [PR PATCH] [Updated] " Gottox
2021-02-04 12:49 ` Gottox
2021-02-04 12:51 ` Gottox
2021-02-04 12:53 ` [PR REVIEW] " ericonr
2021-02-04 12:53 ` ericonr
2021-02-04 12:53 ` ericonr
2021-02-04 12:56 ` Gottox
2021-02-04 12:56 ` Gottox
2021-02-04 12:56 ` Gottox
2021-02-04 12:57 ` Gottox
2021-02-04 12:58 ` [PR PATCH] [Updated] " Gottox
2021-02-04 12:59 ` [PR REVIEW] " Gottox
2021-02-04 14:02 ` [PR PATCH] [Updated] " Gottox
2021-02-04 14:03 ` [PR REVIEW] " Gottox
2021-02-04 14:06 ` [PR PATCH] [Updated] " Gottox
2021-02-04 14:10 ` Gottox
2021-02-04 14:25 ` Gottox
2021-02-04 15:37 ` Gottox
2021-02-04 15:54 ` Gottox
2021-02-04 16:12 ` Gottox
2021-02-04 16:47 ` Gottox
2021-05-21 13:50 ` [PR PATCH] [Closed]: " Gottox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).