Skip to content

Commit

Permalink
Fix control plane upgrade test etcd and dns image upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon authored and k8s-infra-cherrypick-robot committed Jan 3, 2022
1 parent 6a429c8 commit c673a35
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions test/framework/controlplane_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,19 +306,13 @@ func UpgradeControlPlaneAndWaitForUpgrade(ctx context.Context, input UpgradeCont
input.ControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration = new(bootstrapv1.ClusterConfiguration)
}

input.ControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd = bootstrapv1.Etcd{
Local: &bootstrapv1.LocalEtcd{
ImageMeta: bootstrapv1.ImageMeta{
ImageTag: input.EtcdImageTag,
},
},
}
input.ControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
ImageMeta: bootstrapv1.ImageMeta{
ImageTag: input.DNSImageTag,
},
if input.ControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local == nil {
input.ControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = new(bootstrapv1.LocalEtcd)
}

input.ControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local.ImageMeta.ImageTag = input.EtcdImageTag
input.ControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageMeta.ImageTag = input.DNSImageTag

Expect(patchHelper.Patch(ctx, input.ControlPlane)).To(Succeed())

log.Logf("Waiting for control-plane machines to have the upgraded kubernetes version")
Expand Down

0 comments on commit c673a35

Please sign in to comment.