maintenance(titan-24): start Docker through host systemd

This commit is contained in:
jenkins 2026-05-21 01:58:27 -03:00
parent b67120ef79
commit e0707b68c6
2 changed files with 7 additions and 2 deletions

View File

@ -6,6 +6,10 @@ host_sh() {
chroot /host /bin/sh -c "$*" chroot /host /bin/sh -c "$*"
} }
host_systemctl() {
chroot /host /usr/bin/nsenter -t 1 -m -u -i -n -p /bin/systemctl "$@"
}
install_docker() { install_docker() {
host_sh "apt-get update" host_sh "apt-get update"
host_sh "DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates curl gnupg" host_sh "DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates curl gnupg"
@ -30,8 +34,8 @@ configure_docker() {
} }
JSON JSON
fi fi
host_sh "systemctl daemon-reload" host_systemctl daemon-reload
host_sh "systemctl enable --now docker" host_systemctl enable --now docker
} }
if [ ! -x /host/usr/bin/docker ] || ! host_sh "docker version >/dev/null 2>&1"; then if [ ! -x /host/usr/bin/docker ] || ! host_sh "docker version >/dev/null 2>&1"; then

View File

@ -17,6 +17,7 @@ spec:
labels: labels:
app: titan-24-docker app: titan-24-docker
spec: spec:
hostPID: true
serviceAccountName: titan-24-docker serviceAccountName: titan-24-docker
nodeSelector: nodeSelector:
kubernetes.io/hostname: titan-24 kubernetes.io/hostname: titan-24