Skip to content

Commit

Permalink
fix: allow kubelet to be started via the API
Browse files Browse the repository at this point in the history
In addition to restart action, allow also start action.

If the service fails to start, it transitions to `Failed` state and it
should be actually started to bring it back to running state.

Fixes #4665

Also GC'ed now unused condition (it had been used before kubelet started
being controlled via COSI).

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
(cherry picked from commit ab42886)
  • Loading branch information
smira committed Dec 13, 2021
1 parent e69eaca commit 02796f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 147 deletions.
5 changes: 5 additions & 0 deletions internal/app/machined/pkg/system/services/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ func (k *Kubelet) APIRestartAllowed(runtime.Runtime) bool {
return true
}

// APIStartAllowed implements APIStartableService.
func (k *Kubelet) APIStartAllowed(runtime.Runtime) bool {
return true
}

func kubeletSeccomp(seccomp *specs.LinuxSeccomp) {
// for cephfs mounts
seccomp.Syscalls = append(seccomp.Syscalls,
Expand Down
59 changes: 0 additions & 59 deletions pkg/machinery/resources/k8s/condition.go

This file was deleted.

88 changes: 0 additions & 88 deletions pkg/machinery/resources/k8s/condition_test.go

This file was deleted.

0 comments on commit 02796f8

Please sign in to comment.