add k3s
This commit is contained in:
parent
2bf390b08f
commit
a20dde1db4
45
k3s-bin/PKGBUILD
Normal file
45
k3s-bin/PKGBUILD
Normal file
@ -0,0 +1,45 @@
|
||||
# Maintainer: duxet <duxetlg@gmail.com>
|
||||
pkgname=k3s-bin
|
||||
pkgver=1.21.3+k3s1
|
||||
pkgrel=1
|
||||
pkgdesc="Lightweight Kubernetes"
|
||||
url="https://k3s.io"
|
||||
license=('Apache')
|
||||
arch=('x86_64' 'armv7h' 'aarch64')
|
||||
conflicts=('k3s-git')
|
||||
|
||||
source=(
|
||||
"k3s.service"
|
||||
"k3s.service.env"
|
||||
)
|
||||
|
||||
source_x86_64=(
|
||||
"k3s-${pkgver}-x86_64::https://github.com/rancher/k3s/releases/download/v${pkgver}/k3s"
|
||||
)
|
||||
|
||||
source_armv7h=(
|
||||
"k3s-${pkgver}-armv7h::https://github.com/rancher/k3s/releases/download/v${pkgver}/k3s-armhf"
|
||||
)
|
||||
|
||||
source_aarch64=(
|
||||
"k3s-${pkgver}-aarch64::https://github.com/rancher/k3s/releases/download/v${pkgver}/k3s-arm64"
|
||||
)
|
||||
|
||||
sha256sums=('f4ae496b69b3dd376a28298df50297728a47761b041be522adf2537aa8a8c3d8'
|
||||
'667199fa6b811dde3aef3e626e2695a566ad64c9a03d19d0c94a1f104a7612d0')
|
||||
sha256sums_x86_64=('c257e119158feee992dc4397be00490103f0dde5af4b014e8d0f17f9db35ef00')
|
||||
sha256sums_armv7h=('344e0774d43cc22fe9ba46ec77a6bf6ea6f520afed24dda11636639e3ca87525')
|
||||
sha256sums_aarch64=('fc1a8ebcfb16bcaaa1cc3865e39bc384e3d61bbcecc530ce7b915eac6f25a19d')
|
||||
|
||||
|
||||
|
||||
|
||||
package() {
|
||||
install -Dm 755 $srcdir/k3s-${pkgver}-${CARCH} $pkgdir/usr/bin/k3s
|
||||
|
||||
install -dm 755 $pkgdir/usr/lib/systemd/system
|
||||
install -dm 755 $pkgdir/etc/systemd/system
|
||||
|
||||
install -m 644 $srcdir/k3s.service $pkgdir/usr/lib/systemd/system/k3s.service
|
||||
install -m 400 $srcdir/k3s.service.env $pkgdir/etc/systemd/system/k3s.service.env
|
||||
}
|
23
k3s-bin/k3s.service
Normal file
23
k3s-bin/k3s.service
Normal file
@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=Lightweight Kubernetes
|
||||
Documentation=https://k3s.io
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
EnvironmentFile=/etc/systemd/system/k3s.service.env
|
||||
ExecStartPre=-/sbin/modprobe br_netfilter
|
||||
ExecStartPre=-/sbin/modprobe overlay
|
||||
ExecStart=/usr/bin/k3s server
|
||||
KillMode=process
|
||||
Delegate=yes
|
||||
LimitNOFILE=infinity
|
||||
LimitNPROC=infinity
|
||||
LimitCORE=infinity
|
||||
TasksMax=infinity
|
||||
TimeoutStartSec=0
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
3
k3s-bin/k3s.service.env
Normal file
3
k3s-bin/k3s.service.env
Normal file
@ -0,0 +1,3 @@
|
||||
# K3S_URL=
|
||||
# K3S_TOKEN=
|
||||
# K3S_CLUSTER_SECRET=
|
Loading…
Reference in New Issue
Block a user