Compare commits
10 commits
1571b87e48
...
1f0bc10880
Author | SHA1 | Date | |
---|---|---|---|
1f0bc10880 | |||
aec710f73a | |||
5d6174fe8e | |||
24b32def1e | |||
307597eae6 | |||
f4a57e6fda | |||
0e93b8a750 | |||
933f615d53 | |||
a31d7ae2eb | |||
f7c1e1175a |
6
Makefile
6
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
10
VERSIONS
10
VERSIONS
|
@ -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
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
config globals 'globals'
|
||||
option root '/data/k3s'
|
||||
option opts '--no-deploy'
|
|
@ -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
5
files/usr/bin/k3s-wrapper
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
k3s "$@" 2>&1 | logger -t k3s &
|
||||
PID="$!"
|
||||
|
||||
trap "kill $PID; wait $PID"
|
Loading…
Reference in a new issue