Skip to content

Commit

Permalink
Merge pull request openstack-k8s-operators#285 from cschwede/fix-stor…
Browse files Browse the repository at this point in the history
…age-network

Use storagemgmt network by default if defined
  • Loading branch information
openshift-merge-bot[bot] authored Oct 16, 2024
2 parents 914fdd3 + 5a34107 commit 603ea71
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions controllers/swiftstorage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,15 @@ func (r *SwiftStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request
for _, swiftPod := range podList.Items {
dnsIP := ""
if len(instance.Spec.NetworkAttachments) > 0 {
dnsIP, err = getPodIPInNetwork(swiftPod, instance.Namespace, "storage")
dnsIP, err = getPodIPInNetwork(swiftPod, instance.Namespace, "storagemgmt")

if err != nil {
return ctrl.Result{}, err
previousErr := err
dnsIP, err = getPodIPInNetwork(swiftPod, instance.Namespace, "storage")
if err != nil {
err = errors.Join(previousErr, err)
return ctrl.Result{}, err
}
}
}

Expand Down

0 comments on commit 603ea71

Please sign in to comment.