Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load images before starting the kubelet service #14613

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions upup/pkg/fi/nodeup/nodetasks/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ const (
// TODO: Generally only repo packages write to /usr/lib/systemd/system on _rhel_family
// But we use it in two ways: we update the docker manifest, and we install our own
// package (protokube, kubelet). Maybe we should have the idea of a "system" package.
centosSystemdSystemPath = "/usr/lib/systemd/system"

flatcarSystemdSystemPath = "/etc/systemd/system"

centosSystemdSystemPath = "/usr/lib/systemd/system"
flatcarSystemdSystemPath = "/etc/systemd/system"
containerosSystemdSystemPath = "/etc/systemd/system"

containerdService = "containerd.service"
dockerService = "docker.service"
kubeletService = "kubelet.service"
protokubeService = "protokube.service"
)

Expand Down Expand Up @@ -75,8 +74,12 @@ func (p *Service) GetDependencies(tasks map[string]fi.Task) []fi.Task {
switch v := v.(type) {
case *Package, *UpdatePackages, *UserTask, *GroupTask, *Chattr, *BindMount, *Archive, *Prefix, *UpdateEtcHostsTask:
deps = append(deps, v)
case *Service, *LoadImageTask, *PullImageTask, *IssueCert, *BootstrapClientTask, *KubeConfig:
case *Service, *PullImageTask, *IssueCert, *BootstrapClientTask, *KubeConfig:
// ignore
case *LoadImageTask:
if p.Name == kubeletService {
deps = append(deps, v)
}
case *File:
if len(v.BeforeServices) > 0 {
for _, s := range v.BeforeServices {
Expand Down