Compare commits

...

10 commits

Author SHA1 Message Date
Johannes Ziemke 1f0bc10880 Add 1.27.4+k3s1 2023-09-04 14:56:43 +02:00
Johannes 'fish' Ziemke aec710f73a Add 1.21-1.24 2022-07-01 14:15:46 +02:00
Johannes 'fish' Ziemke 5d6174fe8e Update VERSIONS 2021-02-28 14:39:52 +01:00
Johannes 'fish' Ziemke 24b32def1e Add v1.20.2+k3s1 and logging wrapper 2021-02-01 18:20:34 +01:00
Johannes 'fish' Ziemke 307597eae6 Add 1.18.10+k3s1 2021-01-20 10:57:15 +01:00
Johannes 'fish' Ziemke f4a57e6fda Add and default to v1.17.4+k3s1 2020-04-06 12:01:30 +02:00
Johannes 'fish' Ziemke 0e93b8a750 Add and default to 0.9.1 2019-10-06 11:03:12 +02:00
Johannes 'fish' Ziemke 933f615d53
Update README.md
Service IPs seem to work now.
2019-05-10 13:13:15 +02:00
Johannes 'fish' Ziemke a31d7ae2eb Make grep quiet 2019-04-28 11:48:25 +02:00
Johannes 'fish' Ziemke f7c1e1175a Remove config
This overwrites user config.. Need to figure out how to properly handle
this.
2019-04-28 11:47:17 +02:00
6 changed files with 21 additions and 12 deletions

View file

@ -1,4 +1,4 @@
VERSION ?= 0.4.0
VERSION ?= $(shell head -1 VERSIONS)
PVERSION ?= 1
ARCH ?= x86_64
suffix := $(subst -x86_64,,-$(ARCH))
@ -12,7 +12,7 @@ Package: k3s
Version: ${VERSION}-${PVERSION}
Architecture: $(ARCH)
Maintainer: Johannes 'fish' Ziemke
Depends: iptables kmod-ipt-extra iptables-mod-extra kmod-br-netfilter ca-certificates
Depends: iptables iptables-mod-extra kmod-ipt-extra iptables-mod-extra kmod-br-netfilter ca-certificates
Description: The Docker Engine packages for OpenWrt
endef
export CONTROL
@ -40,7 +40,7 @@ $(DIR)/data: $(FILES)
mkdir -p "$@/usr/bin"
cp -r files/* "$@"
curl -sfLo "$@/usr/bin/k3s" \
https://github.com/rancher/k3s/releases/download/v$(VERSION)/k3s${suffix}
https://github.com/k3s-io/k3s/releases/download/v$(VERSION)/k3s${suffix}
chmod a+x "$@/usr/bin/k3s"
$(DIR)/pkg/data.tar.gz: $(DIR)/data

View file

@ -1,9 +1,6 @@
# k3s on OpenWrt
Makefile to generate OpenWrt .opkg packages from official k3s binaries.
## Known Issues
Service IPs aren't working for some reason :(
## Usage
This requires a custom kernel with support for various cgroup, namespaces, vxlan, cfs
scheduler etc. See here for my openwrt config: https://github.com/5pi-home/openwrt/blob/master/config

View file

@ -1,3 +1,13 @@
1.27.4+k3s1
1.24.2+k3s1
1.23.8+k3s1
1.22.11+k3s1
1.21.14+k3s1
1.20.4+k3s1
1.20.2+k3s1
1.18.10+k3s1
1.17.4+k3s1
0.9.1
0.4.0
0.3.0
0.2.0

View file

@ -1,3 +0,0 @@
config globals 'globals'
option root '/data/k3s'
option opts '--no-deploy'

View file

@ -4,13 +4,13 @@ START=60
STOP=20
PIDFILE=/var/run/k3s.pid
EXEC="/usr/bin/k3s"
EXEC="/usr/bin/k3s-wrapper"
ensure_cgroup_mount() {
# Unmount /sys/fs/cgroup if mounted as cgroup
grep ' /sys/fs/cgroup cgroup' /proc/self/mounts && umount /sys/fs/cgroup
grep -q ' /sys/fs/cgroup cgroup' /proc/self/mounts && umount /sys/fs/cgroup
grep ' /sys/fs/cgroup tmpfs' /proc/self/mounts \
grep -q ' /sys/fs/cgroup tmpfs' /proc/self/mounts \
|| mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do

5
files/usr/bin/k3s-wrapper Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
k3s "$@" 2>&1 | logger -t k3s &
PID="$!"
trap "kill $PID; wait $PID"