From 79267695288e2f226be16fff641ec2a17890eeac Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 6 Jan 2024 19:48:31 -0600 Subject: [PATCH] kubelet: Use install-packages service The packages for the Kubelet are now installed by the *install-packages* service, so they can be processed int he same transaction as other packages (e.g. collectd). --- install-kubelet.service | 19 ------------------- kubelet.yaml | 25 +++++++++++++++++++++---- 2 files changed, 21 insertions(+), 23 deletions(-) delete mode 100644 install-kubelet.service diff --git a/install-kubelet.service b/install-kubelet.service deleted file mode 100644 index 72e691a..0000000 --- a/install-kubelet.service +++ /dev/null @@ -1,19 +0,0 @@ -# vim: set ft=systemd : -[Unit] -Description=Install Kubernetes/Kubelet -After=network-online.target -Wants=network-online.target -Before=zincati.service -ConditionPathExists=!/usr/bin/kubectl - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/bin/rpm-ostree install --apply-live --allow-inactive \ - cri-o \ - iscsi-initiator-utils \ - kubernetes-node \ - kubernetes-kubeadm - -[Install] -WantedBy=multi-user.target diff --git a/kubelet.yaml b/kubelet.yaml index 189eaf0..acca52b 100644 --- a/kubelet.yaml +++ b/kubelet.yaml @@ -1,26 +1,43 @@ variant: fcos version: 1.4.0 +ignition: + config: + merge: + - local: packages.ign + storage: files: - - path: /etc/systemd/system/install-kubelet.service - contents: - local: install-kubelet.service + - path: /etc/ignition/packages.d/kubelet mode: 0644 + contents: + inline: | + cri-o + kubernetes-node + kubernetes-kubeadm + - path: /etc/modules-load.d/k8s.conf contents: inline: |+ br_netfilter + - path: /etc/sysctl.d/k8s.conf contents: inline: |+ net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.ipv4.ip_forward = 1 + links: - path: /etc/resolv.conf overwrite: true target: ../run/systemd/resolve/resolv.conf + + - path: /etc/systemd/system/after-install.target.wants/crio.service + target: /usr/lib/systemd/system/crio.service + systemd: units: - - name: install-kubelet.service + - name: crio.service + enabled: true + - name: kubelet.service enabled: true