Skip to content

Commit 9ab6de6

Browse files
committed
Bump to v1beta2 in test extension
Signed-off-by: Stefan Büringer [email protected]
1 parent 10f92fa commit 9ab6de6

File tree

1 file changed

+1
-14
lines changed
  • test/extension/handlers/topologymutation

1 file changed

+1
-14
lines changed

test/extension/handlers/topologymutation/handler.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232
"k8s.io/apimachinery/pkg/runtime/serializer"
3333
bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
3434
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
35-
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
3635
runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
3736
"sigs.k8s.io/cluster-api/exp/runtime/topologymutation"
3837
ctrl "sigs.k8s.io/controller-runtime"
@@ -390,18 +389,6 @@ func (h *ExtensionHandlers) DiscoverVariables(ctx context.Context, req *runtimeh
390389
log := ctrl.LoggerFrom(ctx)
391390
log.Info("DiscoverVariables called")
392391

393-
vars := []clusterv1beta1.ClusterClassVariable{}
394-
395-
for _, in := range clusterclass.GetClusterClassVariables(req.Settings["testMode"] == "govmomi") {
396-
out := clusterv1beta1.ClusterClassVariable{}
397-
if err := clusterv1beta1.Convert_v1beta2_ClusterClassVariable_To_v1beta1_ClusterClassVariable(&in, &out, nil); err != nil {
398-
resp.Status = runtimehooksv1.ResponseStatusFailure
399-
resp.Message = fmt.Sprintf("Failed to Convert ClusterClass variable %q to v1beta1", in.Name)
400-
return
401-
}
402-
vars = append(vars, out)
403-
}
404-
405392
resp.Status = runtimehooksv1.ResponseStatusSuccess
406-
resp.Variables = vars
393+
resp.Variables = clusterclass.GetClusterClassVariables(req.Settings["testMode"] == "govmomi")
407394
}

0 commit comments

Comments
 (0)