Github messages for voidlinux
 help / color / mirror / Atom feed
From: Gottox <Gottox@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: k0s-0.9.1
Date: Thu, 04 Feb 2021 15:10:53 +0100	[thread overview]
Message-ID: <20210204141053.hw1NgN2QrA2ktp96AQrjji0f2hIJKpH51otUsxi4sLU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28478@inbox.vuxu.org>

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

There is an updated 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: 3764 bytes --]

From 98b87fc8006421f3c330dfb507ef6b943f828be3 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/files/k0s-worker.default |  4 +++
 srcpkgs/k0s/files/k0s-worker/run     | 16 +++++++++++
 srcpkgs/k0s/files/k0s.default        |  3 +++
 srcpkgs/k0s/files/k0s/run            |  7 +++++
 srcpkgs/k0s/template                 | 40 ++++++++++++++++++++++++++++
 5 files changed, 70 insertions(+)
 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/files/k0s-worker.default b/srcpkgs/k0s/files/k0s-worker.default
new file mode 100644
index 00000000000..ac5abbfb3f5
--- /dev/null
+++ b/srcpkgs/k0s/files/k0s-worker.default
@@ -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
diff --git a/srcpkgs/k0s/files/k0s-worker/run b/srcpkgs/k0s/files/k0s-worker/run
new file mode 100755
index 00000000000..f49359674f1
--- /dev/null
+++ b/srcpkgs/k0s/files/k0s-worker/run
@@ -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}
diff --git a/srcpkgs/k0s/files/k0s.default b/srcpkgs/k0s/files/k0s.default
new file mode 100644
index 00000000000..b3db337f048
--- /dev/null
+++ b/srcpkgs/k0s/files/k0s.default
@@ -0,0 +1,3 @@
+# K0S_ENABLE_WORKER=false
+# K0S_PROFILE=default
+# K0S_TOKEN_FILE=/etc/k0s/server.token
diff --git a/srcpkgs/k0s/files/k0s/run b/srcpkgs/k0s/files/k0s/run
new file mode 100755
index 00000000000..ba65b7c9206
--- /dev/null
+++ b/srcpkgs/k0s/files/k0s/run
@@ -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}"}
diff --git a/srcpkgs/k0s/template b/srcpkgs/k0s/template
new file mode 100644
index 00000000000..6f30a61b6b1
--- /dev/null
+++ b/srcpkgs/k0s/template
@@ -0,0 +1,40 @@
+# Template file for 'k0s'
+pkgname=k0s
+version=0.9.1
+revision=1
+build_style=go
+build_helper="qemu"
+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_descr="k0s server user"
+make_dirs="/var/lib/k0s 0755 _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() {
+	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
+
+	vtargetrun $DESTDIR/usr/bin/k0s default-config > $DESTDIR/etc/k0s/k0s.conf
+}

  parent reply	other threads:[~2021-02-04 14:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 12:45 [PR PATCH] " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210204141053.hw1NgN2QrA2ktp96AQrjji0f2hIJKpH51otUsxi4sLU@z \
    --to=gottox@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).