Skip to content

Commit

Permalink
Unconditionally renew certificates when upgrading the cluster (#990)
Browse files Browse the repository at this point in the history
* Unconditionally renew certificates when upgrading the cluster

* Update test fixtures
  • Loading branch information
xmudrii authored Jul 17, 2020
1 parent de94e58 commit eee277a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/scripts/kubeadm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func TestKubeadmUpgradeLeader(t *testing.T) {
name: "v1beta2",
args: args{
workdir: "test-wd",
kubeadmCmd: "kubeadm upgrade node",
kubeadmCmd: "kubeadm upgrade node --certificate-renewal=true",
},
},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set -xeu pipefail
export "PATH=$PATH:/sbin:/usr/local/bin:/opt/bin"

sudo kubeadm upgrade node --config=test-wd/cfg/master_0.yaml
sudo kubeadm upgrade node --certificate-renewal=true --config=test-wd/cfg/master_0.yaml
2 changes: 1 addition & 1 deletion pkg/templates/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

const (
kubeadmUpgradeNodeCommand = "kubeadm upgrade node"
kubeadmUpgradeNodeCommand = "kubeadm upgrade node --certificate-renewal=true"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/templates/kubeadm/kubeadmv1beta2.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (*kubeadmv1beta2) ConfigWorker(s *state.State, instance kubeoneapi.HostConf
}

func (k *kubeadmv1beta2) UpgradeLeaderCommand() string {
return fmt.Sprintf("kubeadm upgrade apply -y %s", k.version)
return fmt.Sprintf("kubeadm upgrade apply -y --certificate-renewal=true %s", k.version)
}

func (*kubeadmv1beta2) UpgradeFollowerCommand() string {
Expand Down

0 comments on commit eee277a

Please sign in to comment.