mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 06:16:08 -04:00
helm: fix kubeadm bugs caused by CoreDNS installation (#3353)
* helm: rename CoreDNS configmap * upgrade-agent: ignore CoreDNS preflight errors * fixup! helm: rename CoreDNS configmap
This commit is contained in:
parent
e077eaf02c
commit
8ef5ea2efe
10 changed files with 77 additions and 10 deletions
|
@ -111,12 +111,18 @@ func (s *Server) ExecuteUpdate(ctx context.Context, updateRequest *upgradeproto.
|
|||
return nil, status.Errorf(codes.Internal, "unable to install the kubeadm binary: %s", err)
|
||||
}
|
||||
|
||||
upgradeCmd := exec.CommandContext(ctx, "kubeadm", "upgrade", "plan", updateRequest.WantedKubernetesVersion)
|
||||
// CoreDNS addon status is checked even though we did not install it.
|
||||
// TODO(burgerdev): Use kubeadm phases once supported: https://github.com/kubernetes/kubeadm/issues/1318.
|
||||
commonArgs := []string{"--ignore-preflight-errors", "CoreDNSMigration,CoreDNSUnsupportedPlugins", updateRequest.WantedKubernetesVersion}
|
||||
planArgs := append([]string{"upgrade", "plan"}, commonArgs...)
|
||||
applyArgs := append([]string{"upgrade", "apply", "--yes", "--patches", constants.KubeadmPatchDir}, commonArgs...)
|
||||
|
||||
upgradeCmd := exec.CommandContext(ctx, "kubeadm", planArgs...)
|
||||
if out, err := upgradeCmd.CombinedOutput(); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "unable to execute kubeadm upgrade plan %s: %s: %s", updateRequest.WantedKubernetesVersion, err, string(out))
|
||||
}
|
||||
|
||||
applyCmd := exec.CommandContext(ctx, "kubeadm", "upgrade", "apply", "--yes", "--patches", constants.KubeadmPatchDir, updateRequest.WantedKubernetesVersion)
|
||||
applyCmd := exec.CommandContext(ctx, "kubeadm", applyArgs...)
|
||||
if out, err := applyCmd.CombinedOutput(); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "unable to execute kubeadm upgrade apply: %s: %s", err, string(out))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue