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).
master
Dustin 2024-01-06 19:48:31 -06:00
parent bdeb44ae36
commit 7926769528
2 changed files with 21 additions and 23 deletions

View File

@ -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

View File

@ -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