Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
eepm
Commits
3bffd437
Commit
3bffd437
authored
May 09, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: add k3s
parent
35d5a4c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
0 deletions
+118
-0
k3s.sh
pack.d/k3s.sh
+15
-0
k3s.sh
play.d/k3s.sh
+38
-0
k3s.sh
repack.d/k3s.sh
+65
-0
No files found.
pack.d/k3s.sh
0 → 100755
View file @
3bffd437
#!/bin/sh
TAR
=
"
$1
"
RETURNTARNAME
=
"
$2
"
VERSION
=
"
$3
"
.
$(
dirname
$0
)
/common.sh
PKGNAME
=
$PRODUCT
-
$VERSION
install
-D
$TAR
usr/bin/
$PRODUCT
||
fatal
ln
-s
$PRODUCT
usr/bin/kubectl
erc pack
$PKGNAME
.tar usr/bin/
$PRODUCT
usr/bin/kubectl
return_tar
$PKGNAME
.tar
play.d/k3s.sh
0 → 100755
View file @
3bffd437
#!/bin/sh
PKGNAME
=
k3s
SUPPORTEDARCHES
=
"x86_64 aarch64 armhf"
VERSION
=
"
$2
"
DESCRIPTION
=
"K3s - Lightweight Kubernetes from the official site"
URL
=
"https://k3s.io"
.
$(
dirname
$0
)
/common.sh
arch
=
"
$(
epm print info
-a
)
"
case
"
$arch
"
in
x86_64
)
file
=
"k3s"
;;
armhf
)
file
=
"k3s-armhf"
;;
aarch64
)
file
=
"k3s-arm64"
;;
*
)
fatal
"
$arch
arch is not supported"
;;
esac
# TODO: support for install any version
#if [ "$VERSION" = "*" ] ; then
#fi
PKGURL
=
"
$(
eget
--list
--latest
https://github.com/k3s-io/k3s/releases
"
$file
"
)
"
#direct url:
#https://github.com/k3s-io/k3s/releases/download/v1.27.1-rc3%2Bk3s1/k3s
VERSION
=
"
$(
echo
"
$PKGURL
"
|
sed
-e
's|.*download/v||'
-e
's|%2Bk3s1.*||'
-e
's|-.*||'
)
"
epm pack
--install
$PKGNAME
"
$PKGURL
"
$VERSION
repack.d/k3s.sh
0 → 100755
View file @
3bffd437
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
.
$(
dirname
$0
)
/common.sh
subst
"s|^Group:.*|Group: File tools|"
$SPEC
subst
"s|^License:.*
$|
License: Apache-2.0|"
$SPEC
subst
"s|^URL:.*|URL: https://k3s.io|"
$SPEC
subst
"s|^Summary:.*|Summary: K3s - Lightweight Kubernetes|"
$SPEC
subst
'1iAutoReq:no'
$SPEC
subst
'1iAutoProv:no'
$SPEC
#subst '1iConflicts: go-ipfs' $SPEC
#subst '1iProvides: go-ipfs' $SPEC
# Check https://get.k3s.io/
mkdir
-p
usr/lib/systemd/system/
cat
>
usr/lib/systemd/system/k3s.service
<<
EOF
[Unit]
Description=Lightweight Kubernetes
Documentation=https://k3s.io
Wants=network-online.target
After=network-online.target
[Install]
WantedBy=multi-user.target
[Service]
Type=notify
EnvironmentFile=-/etc/default/%N
EnvironmentFile=-/etc/sysconfig/%N
EnvironmentFile=-/etc/systemd/system/k3s.service.env
KillMode=process
Delegate=yes
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=1048576
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=0
Restart=always
RestartSec=5s
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/bin/k3s server
EOF
pack_file /usr/lib/systemd/system/k3s.service
mkdir
-p
etc/systemd/system/
cat
>
etc/systemd/system/k3s.service.env
<<
EOF
# K3S_URL=
# K3S_TOKEN=
# K3S_CLUSTER_SECRET=
EOF
pack_file /etc/systemd/system/k3s.service.env
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment