Revert toml template for k3s (#735)

Issue should be fixed in undelying OS now

Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
Itxaka 2024-03-06 22:50:32 +01:00 committed by GitHub
parent 98e3ee700f
commit d9da73bd5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 66 deletions

View File

@ -32,18 +32,9 @@ steps:
- rm -rf installer.sh
- chmod +x /usr/bin/k3s
- upx -1 /usr/bin/k3s
- TAG=$INSTALL_K3S_VERSION ./fetch-template.sh
- mkdir -p /usr/share/config/kairos/k3s/
- mv config.toml.tmpl /usr/share/config/kairos/k3s/containerd-config.toml.tmpl
includes:
- ^/usr/bin/k3s
- ^/usr$
- ^/usr/share$
- ^/usr/share/config$
- ^/usr/share/config/kairos$
- ^/usr/share/config/kairos/k3s$
- ^/usr/share/config/kairos/k3s/containerd-config.toml.tmpl$
{{ if eq .Values.name "k3s-openrc" }}
- ^/etc/init.d/$
- ^/etc/init.d/k3s.*

View File

@ -1,7 +1,7 @@
packages:
- name: k3s-openrc
category: k8s
version: "1.29.0+2"
version: "1.29.0+4"
k3s_version: "2"
labels:
github.owner: "k3s-io"
@ -14,7 +14,7 @@ packages:
- name: k3s-openrc
category: k8s
version: "1.28.5+2"
version: "1.28.5+4"
k3s_version: "2"
labels:
github.owner: "k3s-io"
@ -27,7 +27,7 @@ packages:
- name: k3s-openrc
category: k8s
version: "1.27.9+2"
version: "1.27.9+4"
k3s_version: "2"
labels:
github.owner: "k3s-io"
@ -40,7 +40,7 @@ packages:
- name: k3s-systemd
category: k8s
version: "1.29.0+3"
version: "1.29.0+4"
k3s_version: "2"
labels:
github.owner: "k3s-io"
@ -53,7 +53,7 @@ packages:
- name: k3s-systemd
category: k8s
version: "1.28.5+3"
version: "1.28.5+4"
k3s_version: "2"
labels:
github.owner: "k3s-io"
@ -66,7 +66,7 @@ packages:
- name: k3s-systemd
category: k8s
version: "1.27.9+3"
version: "1.27.9+4"
k3s_version: "2"
labels:
github.owner: "k3s-io"

View File

@ -1,43 +0,0 @@
#!/bin/bash
set -e
if [[ -z $TAG ]]; then
echo "TAG should be set"
exit 1
fi
cleanup() {
echo "Cleaning up..."
rm -rf "$tmp_dir"
}
trap cleanup EXIT
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
TMPDIR=$(mktemp -d)
cd $TMPDIR
echo $TMPDIR
git clone --depth 1 --branch $TAG https://github.com/k3s-io/k3s.git
cd $TMPDIR/k3s
cat << EOF > main.go
package main
import (
"fmt"
"github.com/k3s-io/k3s/pkg/agent/templates"
)
func main() {
fmt.Printf(templates.ContainerdConfigTemplate)
}
EOF
go run . > $SCRIPT_DIR/config.toml.tmpl
sed -i '/runc.options/a\
NoPivotRoot = true
' $SCRIPT_DIR/config.toml.tmpl

View File

@ -1,4 +1,4 @@
packages:
- name: "kairos-overlay-files"
category: "static"
version: "1.1.29"
version: "1.1.30"

View File

@ -1,7 +0,0 @@
name: "k3s configuration"
stages:
boot:
- if: '[ ! -f "/run/cos/recovery_mode" ] && [ ! -e "/run/cos/uki_install_mode" ] && [[ $(source /etc/os-release; echo "$KAIROS_VARIANT") == "standard" ]]'
commands:
- mkdir -p /var/lib/rancher/k3s/agent/etc/containerd
- cp /usr/share/config/kairos/k3s/containerd-config.toml.tmpl /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl