diff --git a/controllers/cloudstackisolatednetwork_controller.go b/controllers/cloudstackisolatednetwork_controller.go index ecd433b8..c4d8342c 100644 --- a/controllers/cloudstackisolatednetwork_controller.go +++ b/controllers/cloudstackisolatednetwork_controller.go @@ -84,6 +84,12 @@ func (r *CloudStackIsoNetReconciliationRunner) Reconcile() (retRes ctrl.Result, if r.FailureDomain.Spec.Zone.ID == "" { return r.RequeueWithMessage("Zone ID not resolved yet.") } + ports := []int{int(r.CSCluster.Spec.ControlPlaneEndpoint.Port)} + if len(r.CSCluster.Spec.APIServerLoadBalancer.AdditionalPorts) > 0 { + ports = append(ports, r.CSCluster.Spec.APIServerLoadBalancer.AdditionalPorts...) + } + r.Log.V(2).Info("ports list", "ports", ports) + if err := r.CSUser.GetOrCreateIsolatedNetwork(r.FailureDomain, r.ReconciliationSubject, r.CSCluster); err != nil { return ctrl.Result{}, err }