diff --git a/api/v1alpha1/promotion_types.go b/api/v1alpha1/promotion_types.go index 2ca7fd998..dfc71363f 100644 --- a/api/v1alpha1/promotion_types.go +++ b/api/v1alpha1/promotion_types.go @@ -112,13 +112,6 @@ func (p *PromotionStatus) WithPhase(phase PromotionPhase) *PromotionStatus { return status } -// WithFreight returns a copy of PromotionStatus with the given freight -func (p *PromotionStatus) WithFreight(freight *FreightReference) *PromotionStatus { - status := p.DeepCopy() - status.Freight = freight - return status -} - // +kubebuilder:object:root=true // PromotionList contains a list of Promotion diff --git a/internal/controller/promotions/promotions.go b/internal/controller/promotions/promotions.go index f8c5b9e1e..9f7312848 100644 --- a/internal/controller/promotions/promotions.go +++ b/internal/controller/promotions/promotions.go @@ -457,7 +457,7 @@ func (r *reconciler) promote( if err != nil { return nil, err } - newStatus = newStatus.WithFreight(&nextFreight) + newStatus.Freight = &nextFreight logger.Debugf("promotion %s", newStatus.Phase)