Skip to content

Commit

Permalink
Convert to systemd-sysext
Browse files Browse the repository at this point in the history
  • Loading branch information
mback2k committed Feb 5, 2024
1 parent 181be4f commit 6ecdaf8
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 80 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/torcx.yml → .github/workflows/sysext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:

- uses: actions/upload-artifact@v2
with:
name: 'torcx-addons'
path: 'torcx.*'
name: 'sysext'
path: 'sysext.raw'

release:
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -26,15 +26,15 @@ jobs:
steps:
- uses: actions/download-artifact@v2
with:
name: 'torcx-addons'
name: 'sysext'

- id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false

Expand All @@ -43,15 +43,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_name: 'torcx.tgz'
asset_path: 'torcx.tgz'
asset_content_type: application/gzip

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_name: 'torcx.squashfs'
asset_path: 'torcx.squashfs'
asset_name: 'kubernetes-${{ github.ref_name }}.raw'
asset_path: 'sysext.raw'
asset_content_type: application/octet-stream
17 changes: 7 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build: torcx.tgz torcx.squashfs
build: sysext.raw


cni.tar.gz:
Expand All @@ -23,13 +23,10 @@ helm: helm.tar.gz
tar -xzf helm.tar.gz


torcx: cni kube-node helm
mkdir -p rootfs/bin
cp -ar kubernetes/node/bin/* rootfs/bin/
cp -a linux-amd64/helm rootfs/bin/
sysext: cni kube-node helm
mkdir -p rootfs/usr/bin
cp -ar kubernetes/node/bin/* rootfs/usr/bin/
cp -a linux-amd64/helm rootfs/usr/bin/

torcx.tgz: torcx
tar -C rootfs -czf torcx.tgz .

torcx.squashfs: torcx
mksquashfs rootfs torcx.squashfs
sysext.raw: sysext
mksquashfs rootfs sysext.raw -all-root
16 changes: 0 additions & 16 deletions rootfs/.torcx/manifest.json

This file was deleted.

19 changes: 0 additions & 19 deletions rootfs/lib/systemd/system/kube-proxy.service

This file was deleted.

12 changes: 0 additions & 12 deletions rootfs/lib/systemd/system/opt-cni.mount

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ID=flatcar
SYSEXT_LEVEL=1.0
ARCHITECTURE=x86-64
13 changes: 13 additions & 0 deletions rootfs/usr/lib/systemd/system/kube-proxy.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Kubernetes Kube-Proxy Server
After=network.target
Requires=network.target

[Service]
EnvironmentFile=-/etc/default/kubernetes
ExecStart=/usr/bin/kube-proxy --config=/etc/kubernetes/kube-proxy.yaml \
$KUBE_PROXY_OPTIONS
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
[Unit]
Requires=torcx.target
After=torcx.target
Description=Kubernetes Kubelet Server
After=containerd.service
Requires=containerd.service
RequiresMountsFor=/opt/cni

[Service]
EnvironmentFile=/run/metadata/torcx
EnvironmentFile=-/etc/default/kubernetes
ExecStart=/usr/bin/env ${TORCX_BINDIR}/kubelet --config=/etc/kubernetes/kubelet.yaml \
ExecStart=/usr/bin/kubelet --config=/etc/kubernetes/kubelet.yaml \
--container-runtime=remote \
--container-runtime-endpoint=unix:///run/docker/libcontainerd/docker-containerd.sock \
--kubeconfig=/etc/kubernetes/kubelet.kubeconfig \
$KUBELET_OPTIONS
Restart=always
RestartSec=5
KillMode=process

[Install]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Unit]
Upholds=kube-proxy.service
Upholds=kubelet.service

0 comments on commit 6ecdaf8

Please sign in to comment.