fix: update k0s and k0s scripts

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2024-01-29 15:58:56 -05:00
1 parent 5d29ec7f12
commit 5fa8b9685a
4 files changed
+10 -10

No files matched your search

@@ -25,15 +25,15 @@ spec:
hooks:
apply:
before:
- bash apply-system.sh "#{ item.name }#"
- bash ~/apply-system.sh "#{ item.name }#"
#% if item.controller %#
- bash apply-kube-vip.sh
- bash ~/apply-kube-vip.sh
#% endif %#
reset:
before:
- bash reset-cilium.sh
- bash ~/reset-cilium.sh
after:
- bash reset-system.sh
- bash ~/reset-system.sh
#% endfor %#
k0s:
# renovate: datasource=github-releases depName=k0sproject/k0s
@@ -8,11 +8,11 @@ set -o noglob
mkdir -p /var/lib/k0s/manifests/kube-vip
# Create kube-vip rbac
cat >/var/lib/k0s/manifests/kube-vip/kube-vip-rbac.yaml <<EOF
cat <<EOF > /var/lib/k0s/manifests/kube-vip/rbac.yaml
#% include 'partials/kube-vip-rbac.partial.yaml.j2' %#
EOF
# Create kube-vip daemonset
cat >/var/lib/k0s/manifests/kube-vip/kube-vip-ds.yaml <<EOF
cat <<EOF > /var/lib/k0s/manifests/kube-vip/ds.yaml
#% include 'partials/kube-vip-ds.partial.yaml.j2' %#
EOF
@@ -34,7 +34,7 @@ apt-get install -y --no-install-recommends \
# Update DNS
chattr -i /etc/resolv.conf
rm -f /etc/resolv.conf
cat >/etc/resolv.conf <<EOF
cat <<EOF > /etc/resolv.conf
search #{ cluster.nodes.search_domain|default('.', true) }#
#% for item in cluster.nodes.dns_servers %#
nameserver #{ item }#
@@ -51,7 +51,7 @@ done
systemctl restart systemd-modules-load.service
# Sysctls
cat >/etc/sysctl.d/99-kubernetes.conf <<EOF
cat <<EOF > /etc/sysctl.d/99-kubernetes.conf
fs.inotify.max_queued_events = 65536
fs.inotify.max_user_watches = 524288
fs.inotify.max_user_instances = 8192
@@ -68,7 +68,7 @@ fi
# Create containerd config
mkdir -p /etc/k0s/containerd.d
cat >/etc/k0s/containerd.d/default.toml <<EOF
cat <<EOF > /etc/k0s/containerd.d/default.toml
[plugins."io.containerd.grpc.v1.cri"]
enable_unprivileged_ports = true
enable_unprivileged_icmp = true
@@ -11,4 +11,4 @@ rm -rf /etc/k0s/containerd.d
rm -rf /var/openebs/local
# Reboot
(sleep 10 && systemctl reboot)&
(sleep 30 && systemctl reboot)&