Skip to content

Commit 993559d

Browse files
committed
KCP: make rolloutBefore.certificatesExpiryDays mutable
Signed-off-by: Stefan Büringer [email protected]
1 parent d9ac3ec commit 993559d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ func (in *KubeadmControlPlane) ValidateUpdate(old runtime.Object) error {
168168
{spec, "replicas"},
169169
{spec, "version"},
170170
{spec, "rolloutAfter"},
171+
{spec, "rolloutBefore", "*"},
171172
{spec, "rolloutStrategy", "*"},
172173
}
173174

controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) {
404404
validUpdate.Spec.Replicas = pointer.Int32Ptr(5)
405405
now := metav1.NewTime(time.Now())
406406
validUpdate.Spec.RolloutAfter = &now
407+
validUpdate.Spec.RolloutBefore = &RolloutBefore{
408+
CertificatesExpiryDays: pointer.Int32(14),
409+
}
407410
validUpdate.Spec.KubeadmConfigSpec.Format = bootstrapv1.CloudConfig
408411

409412
scaleToZero := before.DeepCopy()

0 commit comments

Comments
 (0)