mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-24 16:01:09 +02:00
flannel: use rkt to launch flannel on amd64
This commit is contained in:
parent
3b63446bbb
commit
c8f0523455
38
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/files/flanneld-rkt.service
vendored
Normal file
38
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/files/flanneld-rkt.service
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Network fabric for containers
|
||||||
|
Documentation=https://github.com/coreos/flannel
|
||||||
|
After=etcd.service etcd2.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
Environment="TMPDIR=/var/tmp/"
|
||||||
|
Environment="FLANNEL_VER={{flannel_ver}}"
|
||||||
|
Environment="FLANNEL_IMG=quay.io/coreos/flannel"
|
||||||
|
Environment="ETCD_SSL_DIR=/etc/ssl/etcd"
|
||||||
|
EnvironmentFile=-/run/flannel/options.env
|
||||||
|
LimitNOFILE=40000
|
||||||
|
LimitNPROC=1048576
|
||||||
|
ExecStartPre=/sbin/modprobe ip_tables
|
||||||
|
ExecStartPre=/usr/bin/mkdir -p /run/flannel
|
||||||
|
ExecStartPre=/usr/bin/mkdir -p ${ETCD_SSL_DIR}
|
||||||
|
|
||||||
|
ExecStart=/usr/bin/rkt run --net=host \
|
||||||
|
--stage1-path=/usr/lib/rkt/stage1-images/stage1-fly.aci \
|
||||||
|
--insecure-options=image \
|
||||||
|
--set-env=NOTIFY_SOCKET=/run/systemd/notify \
|
||||||
|
--inherit-env=true \
|
||||||
|
--volume runsystemd,kind=host,source=/run/systemd,readOnly=false \
|
||||||
|
--volume runflannel,kind=host,source=/run/flannel,readOnly=false \
|
||||||
|
--volume ssl,kind=host,source=${ETCD_SSL_DIR},readOnly=true \
|
||||||
|
--mount volume=runsystemd,target=/run/systemd \
|
||||||
|
--mount volume=runflannel,target=/run/flannel \
|
||||||
|
--mount volume=ssl,target=${ETCD_SSL_DIR} \
|
||||||
|
${FLANNEL_IMG}:${FLANNEL_VER} \
|
||||||
|
-- --ip-masq=true
|
||||||
|
|
||||||
|
ExecStopPost=/usr/bin/rkt gc --mark-only
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -1 +0,0 @@
|
|||||||
flannel-9999.ebuild
|
|
31
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/flannel-0.5.5-r2.ebuild
vendored
Normal file
31
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/flannel-0.5.5-r2.ebuild
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Copyright (c) 2014 CoreOS, Inc.. All rights reserved.
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=4
|
||||||
|
|
||||||
|
if [[ "${PV}" == 9999 ]]; then
|
||||||
|
KEYWORDS="~amd64 ~arm64"
|
||||||
|
else
|
||||||
|
KEYWORDS="amd64 arm64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
inherit systemd
|
||||||
|
|
||||||
|
DESCRIPTION="flannel"
|
||||||
|
HOMEPAGE="https://github.com/coreos/flannel"
|
||||||
|
SRC_URI=""
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
RDEPEND="app-admin/sdnotify-proxy"
|
||||||
|
S="$WORKDIR"
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
sed "s/{{flannel_ver}}/${PV}/" "${FILESDIR}"/flanneld.service >"${T}"/flanneld.service
|
||||||
|
systemd_dounit "${T}"/flanneld.service
|
||||||
|
|
||||||
|
insinto /usr/lib/systemd/network
|
||||||
|
doins "${FILESDIR}"/50-flannel.network
|
||||||
|
}
|
1
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/flannel-0.5.5-r3.ebuild
vendored
Symbolic link
1
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/flannel-0.5.5-r3.ebuild
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
flannel-9999.ebuild
|
@ -4,9 +4,9 @@
|
|||||||
EAPI=4
|
EAPI=4
|
||||||
|
|
||||||
if [[ "${PV}" == 9999 ]]; then
|
if [[ "${PV}" == 9999 ]]; then
|
||||||
KEYWORDS="~amd64 ~arm64"
|
KEYWORDS="~amd64"
|
||||||
else
|
else
|
||||||
KEYWORDS="amd64 arm64"
|
KEYWORDS="amd64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
inherit systemd
|
inherit systemd
|
||||||
@ -19,11 +19,11 @@ LICENSE="Apache-2.0"
|
|||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE=""
|
IUSE=""
|
||||||
|
|
||||||
RDEPEND="app-admin/sdnotify-proxy"
|
RDEPEND="app-emulation/rkt"
|
||||||
S="$WORKDIR"
|
S="$WORKDIR"
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
sed "s/{{flannel_ver}}/${PV}/" "${FILESDIR}"/flanneld.service >"${T}"/flanneld.service
|
sed "s/{{flannel_ver}}/${PV}/" "${FILESDIR}"/flanneld-rkt.service >"${T}"/flanneld.service
|
||||||
systemd_dounit "${T}"/flanneld.service
|
systemd_dounit "${T}"/flanneld.service
|
||||||
|
|
||||||
insinto /usr/lib/systemd/network
|
insinto /usr/lib/systemd/network
|
||||||
|
Loading…
x
Reference in New Issue
Block a user