ref: pre v2.15 cleanup (#2871)

This commit is contained in:
Adrian Stobbe 2024-01-29 21:32:37 +01:00 committed by GitHub
parent 3799525103
commit 489e07677e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 35 additions and 215 deletions

View file

@ -131,20 +131,8 @@ func prepareUpdate(ctx context.Context, installer osInstaller, updateRequest *up
if err != nil {
return err
}
var cs components.Components
if len(updateRequest.KubeadmUrl) > 0 {
cs = append(cs, &components.Component{
Url: updateRequest.KubeadmUrl,
Hash: updateRequest.KubeadmHash,
InstallPath: constants.KubeadmPath,
Extract: false,
})
}
cs = append(cs, updateRequest.KubernetesComponents...)
// Download & install the Kubernetes components.
for _, c := range cs {
for _, c := range updateRequest.KubernetesComponents {
if err := installer.Install(ctx, c); err != nil {
return fmt.Errorf("installing Kubernetes component %q: %w", c.Url, err)
}