commit 1d25478783a9c6953f35d3afd69281aaaf2bcdbbdd811c3d2da0abc266917476 Author: Richard Brown Date: Fri Jul 16 13:23:05 2021 +0000 Accepting request 906672 from home:RBrownSUSE OBS-URL: https://build.opensuse.org/request/show/906672 OBS-URL: https://build.opensuse.org/package/show/devel:kubic/k3s-install?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..55ce578 --- /dev/null +++ b/_service @@ -0,0 +1,19 @@ + + + https://github.com/k3s-io/k3s.git + git + v1.21.2+k3s1 + @PARENT_TAG@ + enable + v(.*) + + + + + *.tar + gz + + + k3s + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..9b16c54 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/k3s-io/k3s.git + 5a67e8dc473f8945e8e181f6f0b0dbbc387f6fca \ No newline at end of file diff --git a/inform-user-of-current-k3s-SELinux-support.patch b/inform-user-of-current-k3s-SELinux-support.patch new file mode 100644 index 0000000..518a7c5 --- /dev/null +++ b/inform-user-of-current-k3s-SELinux-support.patch @@ -0,0 +1,38 @@ +From c7aaa079c0669aa550a525e0c848c8cfc9e114cc Mon Sep 17 00:00:00 2001 +From: Richard Brown +Date: Wed, 17 Mar 2021 16:18:51 +0100 +Subject: [PATCH] install.sh: Inform user of current k3s+SELinux support status + for SUSE/openSUSE systems + +Signed-off-by: Richard Brown +--- + install.sh | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/install.sh b/install.sh +index 00101ae0e7..b356fcc646 100755 +--- a/install.sh ++++ b/install.sh +@@ -455,10 +455,18 @@ setup_selinux() { + rpm_site="rpm-testing.rancher.io" + fi + +- policy_hint="please install: ++ . /etc/os-release ++ if [ "${ID_LIKE:-}" = suse ] ; then ++ policy_hint='k3s with SELinux is currently not supported on SUSE/openSUSE systems. ++ please disable SELinux before installing k3s ++' ++ else ++ policy_hint="please install: + yum install -y container-selinux selinux-policy-base + yum install -y https://${rpm_site}/k3s/${rpm_channel}/common/centos/7/noarch/k3s-selinux-0.2-1.el7_8.noarch.rpm + " ++ fi ++ + policy_error=fatal + if [ "$INSTALL_K3S_SELINUX_WARN" = true ] || grep -q 'ID=flatcar' /etc/os-release; then + policy_error=warn +-- +2.32.0 + diff --git a/k3s-1.21.2+k3s1.tar.gz b/k3s-1.21.2+k3s1.tar.gz new file mode 100644 index 0000000..fccc11b --- /dev/null +++ b/k3s-1.21.2+k3s1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf9b46912afe4ee49e7000536fb7bb150bf9cf19e565311362d2eb01cbe23c3d +size 26393395 diff --git a/k3s-install.changes b/k3s-install.changes new file mode 100644 index 0000000..fab16c4 --- /dev/null +++ b/k3s-install.changes @@ -0,0 +1,20 @@ +------------------------------------------------------------------- +Fri Jul 16 10:57:22 UTC 2021 - rbrown@suse.com + +- Update to version 1.21.2+k3s1: + * Update to v1.21.2 (#3479) + * Renamed client-cloud-controller crt and key (#3472) + * Send systemd notifications for both server and agent (#3430) (#3460) + * Changed iptables version check for fail if version is between 1.8.0 and 1.8.3 and using nf_tables mode (#3454) + * Add kubernetes.default.svc to serving certs + * Fix RBAC cloud-controller-manager name 3308 (#3388) (#3408) + * Add a path for wireguard's privatekey + * Update flannel version + * move object channel defer close to goroutine + * add retention default and wire in s3 prune + * add etcd snapshot save subcommand + +------------------------------------------------------------------- +Fri Jul 16 10:55:07 UTC 2021 - Richard Brown + +- Initial Package diff --git a/k3s-install.spec b/k3s-install.spec new file mode 100644 index 0000000..091b135 --- /dev/null +++ b/k3s-install.spec @@ -0,0 +1,70 @@ +# +# spec file for package k3s-install +# +# Copyright (c) 2021 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +Name: k3s-install +Version: 1.21.2+k3s1 +Release: 0 +Summary: Installer for k3s optimised for openSUSE MicroOS +License: Apache-2.0 +Group: System/Management +URL: https://k3s.io +Source0: https://github.com/k3s-io/k3s/archive/v%{version}.tar.gz#/k3s-%{version}.tar.gz +# PATCH-FIX-UPSTREAM inform-user-of-current-k3s-SELinux-support.patch gh#k3s-io/k3s/#3088 +Patch1: inform-user-of-current-k3s-SELinux-support.patch +Requires: cni-plugins +Requires: conntrack-tools +Requires: containerd +Requires: iptables +Requires: runc +Conflicts: kubectl +Conflicts: cri-tools +Conflicts: kubernetes-client +Conflicts: kubernetes-client-provider + +%description +Based on the official upstream k3s install.sh, this k3s-install +package provides a curated, MicroOS-optimised, securely delivered +alternative to running a script directly from the internet. + +k3s is a container orchestration system for automating application +deployment, scaling, and management. It is a Kubernetes-compliant +distribution that differs from the original Kubernetes (colloquially +"k8s") in that: + + * Legacy, alpha, or non-default features are removed. + * Most in-tree plugins (cloud providers and storage plugins) were + removed, since they can be replaced with out-of-tree addons. + * sqlite3 is the default storage mechanism. + etcd3 is still available, but not the default. + * There is a new launcher that handles a lot of the complexity of + TLS and options. + +%prep +%autosetup -p1 -n k3s-%{version} + +%build + +%install +mkdir -p %{buildroot}%{_bindir} +install -p -m 755 install.sh %{buildroot}%{_bindir}/k3s-install + +%files +%license LICENSE +%doc README.md +%{_bindir}/k3s-install + +%changelog