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

Completely remove kubelet-config component #4108

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion cmd/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ func (c *command) start(ctx context.Context) error {
return err
}
clusterComponents.Add(ctx, reconciler)
clusterComponents.Add(ctx, controller.NewKubeletConfig(c.K0sVars))
}

if !slices.Contains(c.DisableComponents, constant.SystemRbacComponentName) {
Expand Down
30 changes: 21 additions & 9 deletions inttest/ap-ha3x3/ha3x3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,11 @@ spec:
s.Require().NoError(err)
defer sshController.Disconnect()

if version, err := s.GetK0sVersion(s.ControllerNode(0)); s.NoError(err, "Failed to get the base k0s version") {
hasOldStack := version != s.k0sUpdateVersion && (strings.HasPrefix(version, "v1.27.") || strings.HasPrefix(version, "v1.28."))
var hasOldStack bool
if version, err := s.GetK0sVersion(s.ControllerNode(0)); s.NoError(err, "Failed to get the base k0s version, assuming no old stack!") {
hasOldStack = version != s.k0sUpdateVersion && strings.HasPrefix(version, "v1.29.")
s.T().Logf("Base k0s version: %q, has old stack: %v", version, hasOldStack)
s.checkKubeletConfigStackResources(ctx, sshController, hasOldStack)
s.checkKubeletConfigStackResources(ctx, sshController, strings.HasPrefix(version, "v1.28."))
}

sshWorker, err := s.SSH(ctx, s.WorkerNode(0))
Expand Down Expand Up @@ -201,12 +202,23 @@ spec:
}

for idx := 0; idx < s.ControllerCount; idx++ {
func() {
ssh, err := s.SSH(ctx, s.ControllerNode(idx))
s.Require().NoError(err)
defer ssh.Disconnect()
s.checkKubeletConfigComponentFolders(ctx, ssh)
}()
node := s.ControllerNode(idx)
if hasOldStack {
s.Run("kubelet-config_component_removal/"+node, func() {
ssh, err := s.SSH(ctx, node)
s.Require().NoError(err)
defer ssh.Disconnect()
s.checkKubeletConfigComponentFolders(ctx, ssh)
})
} else {
s.Run("kubelet-config_component_nonexistence/"+node, func() {
ssh, err := s.SSH(ctx, node)
s.Require().NoError(err)
defer ssh.Disconnect()
err = ssh.Exec(ctx, "[ ! -d /var/lib/k0s/manifests/kubelet ]", common.SSHStreams{})
s.NoError(err, "Failed to verify if kubelet manifest folder doesn't exist")
})
}
}

s.checkKubeletConfigStackResources(ctx, sshController, false)
Expand Down
93 changes: 0 additions & 93 deletions pkg/component/controller/kubeletconfig.go

This file was deleted.

93 changes: 0 additions & 93 deletions pkg/component/controller/kubeletconfig_test.go

This file was deleted.

Loading