diff --git a/packaging/flavorgen/flavors/generators.go b/packaging/flavorgen/flavors/generators.go index 3b8b654982..a6cd606729 100644 --- a/packaging/flavorgen/flavors/generators.go +++ b/packaging/flavorgen/flavors/generators.go @@ -370,7 +370,6 @@ func defaultVirtualMachineCloneSpec() infrav1.VirtualMachineCloneSpec { MemoryMiB: env.DefaultMemoryMiB, Template: env.VSphereTemplateVar, Server: env.VSphereServerVar, - Thumbprint: env.VSphereThumbprint, ResourcePool: env.VSphereResourcePoolVar, Datastore: env.VSphereDatastoreVar, StoragePolicyName: env.VSphereStoragePolicyVar, @@ -433,7 +432,6 @@ func nodeIPAMVirtualMachineCloneSpec() infrav1.VirtualMachineCloneSpec { MemoryMiB: env.DefaultMemoryMiB, Template: env.VSphereTemplateVar, Server: env.VSphereServerVar, - Thumbprint: env.VSphereThumbprint, ResourcePool: env.VSphereResourcePoolVar, Datastore: env.VSphereDatastoreVar, StoragePolicyName: env.VSphereStoragePolicyVar, diff --git a/pkg/clustermodule/service.go b/pkg/clustermodule/service.go index 6a7d62fa12..9ccfb768b5 100644 --- a/pkg/clustermodule/service.go +++ b/pkg/clustermodule/service.go @@ -62,7 +62,7 @@ func (s *service) Create(ctx context.Context, clusterCtx *capvcontext.ClusterCon if err != nil { return "", errors.Wrapf(err, "error fetching machine template for object %s/%s", wrapper.GetNamespace(), wrapper.GetName()) } - if server := template.Spec.Template.Spec.Server; server != clusterCtx.VSphereCluster.Spec.Server { + if server := template.Spec.Template.Spec.Server; server != "" && server != clusterCtx.VSphereCluster.Spec.Server { log.V(4).Info("Skipping module creation for object since template uses a different server", "server", server) return "", nil } diff --git a/templates/cluster-template-external-loadbalancer.yaml b/templates/cluster-template-external-loadbalancer.yaml index 233162e22e..0da7583926 100644 --- a/templates/cluster-template-external-loadbalancer.yaml +++ b/templates/cluster-template-external-loadbalancer.yaml @@ -59,7 +59,6 @@ spec: server: '${VSPHERE_SERVER}' storagePolicyName: '${VSPHERE_STORAGE_POLICY}' template: '${VSPHERE_TEMPLATE}' - thumbprint: '${VSPHERE_TLS_THUMBPRINT}' --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: VSphereMachineTemplate @@ -86,7 +85,6 @@ spec: server: '${VSPHERE_SERVER}' storagePolicyName: '${VSPHERE_STORAGE_POLICY}' template: '${VSPHERE_TEMPLATE}' - thumbprint: '${VSPHERE_TLS_THUMBPRINT}' --- apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: KubeadmControlPlane diff --git a/templates/cluster-template-ignition.yaml b/templates/cluster-template-ignition.yaml index 53549a2557..6b09213f15 100644 --- a/templates/cluster-template-ignition.yaml +++ b/templates/cluster-template-ignition.yaml @@ -59,7 +59,6 @@ spec: server: '${VSPHERE_SERVER}' storagePolicyName: '${VSPHERE_STORAGE_POLICY}' template: '${VSPHERE_TEMPLATE}' - thumbprint: '${VSPHERE_TLS_THUMBPRINT}' --- apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: KubeadmControlPlane diff --git a/templates/cluster-template-node-ipam.yaml b/templates/cluster-template-node-ipam.yaml index 2fc7b2bf18..e562935811 100644 --- a/templates/cluster-template-node-ipam.yaml +++ b/templates/cluster-template-node-ipam.yaml @@ -64,7 +64,6 @@ spec: server: '${VSPHERE_SERVER}' storagePolicyName: '${VSPHERE_STORAGE_POLICY}' template: '${VSPHERE_TEMPLATE}' - thumbprint: '${VSPHERE_TLS_THUMBPRINT}' --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: VSphereMachineTemplate @@ -96,7 +95,6 @@ spec: server: '${VSPHERE_SERVER}' storagePolicyName: '${VSPHERE_STORAGE_POLICY}' template: '${VSPHERE_TEMPLATE}' - thumbprint: '${VSPHERE_TLS_THUMBPRINT}' --- apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: KubeadmControlPlane diff --git a/templates/cluster-template.yaml b/templates/cluster-template.yaml index 96c86a0472..d0a03258cc 100644 --- a/templates/cluster-template.yaml +++ b/templates/cluster-template.yaml @@ -59,7 +59,6 @@ spec: server: '${VSPHERE_SERVER}' storagePolicyName: '${VSPHERE_STORAGE_POLICY}' template: '${VSPHERE_TEMPLATE}' - thumbprint: '${VSPHERE_TLS_THUMBPRINT}' --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: VSphereMachineTemplate @@ -86,7 +85,6 @@ spec: server: '${VSPHERE_SERVER}' storagePolicyName: '${VSPHERE_STORAGE_POLICY}' template: '${VSPHERE_TEMPLATE}' - thumbprint: '${VSPHERE_TLS_THUMBPRINT}' --- apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: KubeadmControlPlane diff --git a/templates/clusterclass-template.yaml b/templates/clusterclass-template.yaml index f3ee540607..dbacfc0e07 100644 --- a/templates/clusterclass-template.yaml +++ b/templates/clusterclass-template.yaml @@ -285,7 +285,6 @@ spec: server: '${VSPHERE_SERVER}' storagePolicyName: '${VSPHERE_STORAGE_POLICY}' template: '${VSPHERE_TEMPLATE}' - thumbprint: '${VSPHERE_TLS_THUMBPRINT}' --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: VSphereMachineTemplate @@ -312,7 +311,6 @@ spec: server: '${VSPHERE_SERVER}' storagePolicyName: '${VSPHERE_STORAGE_POLICY}' template: '${VSPHERE_TEMPLATE}' - thumbprint: '${VSPHERE_TLS_THUMBPRINT}' --- apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: KubeadmControlPlaneTemplate