Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #856 from rabi/remove_non_ipam
Browse files Browse the repository at this point in the history
Drop code path to deploy without IPAM and DNS
  • Loading branch information
openshift-merge-bot[bot] authored Apr 26, 2024
2 parents 63b571b + abf426b commit 1441cbc
Show file tree
Hide file tree
Showing 22 changed files with 688 additions and 623 deletions.
18 changes: 8 additions & 10 deletions controllers/openstackdataplanenodeset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,16 @@ func (r *OpenStackDataPlaneNodeSetReconciler) Reconcile(ctx context.Context, req
}

// Ensure DNSData Required for Nodes
dnsData := deployment.DataplaneDNSData{}
err = dnsData.EnsureDNSData(
dnsDetails, err := deployment.EnsureDNSData(
ctx, helper,
instance, allIPSets)
if err != nil || !dnsData.Ready {
if err != nil || !dnsDetails.IsReady {
return ctrl.Result{}, err
}

instance.Status.DNSClusterAddresses = dnsData.ClusterAddresses
instance.Status.CtlplaneSearchDomain = dnsData.CtlplaneSearchDomain
instance.Status.AllHostnames = dnsData.Hostnames
instance.Status.AllIPs = dnsData.AllIPs
instance.Status.DNSClusterAddresses = dnsDetails.ClusterAddresses
instance.Status.CtlplaneSearchDomain = dnsDetails.CtlplaneSearchDomain
instance.Status.AllHostnames = dnsDetails.Hostnames
instance.Status.AllIPs = dnsDetails.AllIPs

ansibleSSHPrivateKeySecret := instance.Spec.NodeTemplate.AnsibleSSHPrivateKeySecret

Expand Down Expand Up @@ -363,7 +361,7 @@ func (r *OpenStackDataPlaneNodeSetReconciler) Reconcile(ctx context.Context, req
instance.Status.Conditions.MarkUnknown(dataplanev1.NodeSetBareMetalProvisionReadyCondition,
condition.InitReason, condition.InitReason)
isReady, err := deployment.DeployBaremetalSet(ctx, helper, instance,
allIPSets, dnsData.ServerAddresses)
allIPSets, dnsDetails.ServerAddresses)
if err != nil || !isReady {
return ctrl.Result{}, err
}
Expand All @@ -383,7 +381,7 @@ func (r *OpenStackDataPlaneNodeSetReconciler) Reconcile(ctx context.Context, req
}
containerImages := dataplaneutil.GetContainerImages(version)
_, err = deployment.GenerateNodeSetInventory(ctx, helper, instance,
allIPSets, dnsData.ServerAddresses, containerImages)
allIPSets, dnsDetails.ServerAddresses, containerImages)
if err != nil {
errorMsg := fmt.Sprintf("Unable to generate inventory for %s", instance.Name)
util.LogErrorForObject(helper, err, errorMsg, instance)
Expand Down
1 change: 1 addition & 0 deletions kuttl-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ apiVersion: kuttl.dev/v1beta1
kind: TestSuite
commands:
- command: oc apply -n openstack -f https://raw.githubusercontent.com/openstack-k8s-operators/infra-operator/main/config/samples/network_v1beta1_netconfig.yaml
- command: oc apply -n openstack -f https://raw.githubusercontent.com/openstack-k8s-operators/infra-operator/main/config/samples/network_v1beta1_dnsmasq.yaml
reportFormat: JSON
reportName: kuttl-test-dataplane
namespace: openstack
Expand Down
Loading

0 comments on commit 1441cbc

Please sign in to comment.