Skip to content

Commit

Permalink
Merge pull request #295 from cschwede/fix-networkready-zero-replicas
Browse files Browse the repository at this point in the history
Fix NetworkReadyCondition if using zero replicas
  • Loading branch information
openshift-merge-bot[bot] authored Nov 5, 2024
2 parents 6b7166f + 3a50b3e commit 810e13b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/swiftproxy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ func (r *SwiftProxyReconciler) Reconcile(ctx context.Context, req ctrl.Request)
}

instance.Status.NetworkAttachments = networkAttachmentStatus
if networkReady {
if networkReady || *instance.Spec.Replicas == 0 {
instance.Status.Conditions.MarkTrue(condition.NetworkAttachmentsReadyCondition, condition.NetworkAttachmentsReadyMessage)
} else {
err := fmt.Errorf("not all pods have interfaces with ips as configured in NetworkAttachments: %s", instance.Spec.NetworkAttachments)
Expand Down
2 changes: 1 addition & 1 deletion controllers/swiftstorage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func (r *SwiftStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request
}

instance.Status.NetworkAttachments = networkAttachmentStatus
if networkReady {
if networkReady || *instance.Spec.Replicas == 0 {
instance.Status.Conditions.MarkTrue(condition.NetworkAttachmentsReadyCondition, condition.NetworkAttachmentsReadyMessage)
} else {
err := fmt.Errorf("not all pods have interfaces with ips as configured in NetworkAttachments: %s", instance.Spec.NetworkAttachments)
Expand Down

0 comments on commit 810e13b

Please sign in to comment.