Skip to content

Commit

Permalink
Merge pull request #2604 from chuckha/upgrade-after-field
Browse files Browse the repository at this point in the history
🐛 Enable upgradeAfter field to be modifiable
  • Loading branch information
k8s-ci-robot authored Mar 9, 2020
2 parents 5154da4 + 6a08677 commit 37fec77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func (in *KubeadmControlPlane) ValidateUpdate(old runtime.Object) error {
{spec, "infrastructureTemplate", "name"},
{spec, "replicas"},
{spec, "version"},
{spec, "upgradeAfter"},
}

allErrs := in.validateCommon()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) {
validUpdate.Spec.Version = "v1.16.6"
validUpdate.Spec.InfrastructureTemplate.Name = "orange"
validUpdate.Spec.Replicas = pointer.Int32Ptr(5)
now := metav1.NewTime(time.Now())
validUpdate.Spec.UpgradeAfter = &now

scaleToZero := before.DeepCopy()
scaleToZero.Spec.Replicas = pointer.Int32Ptr(0)
Expand Down

0 comments on commit 37fec77

Please sign in to comment.