Skip to content

Commit

Permalink
Merge pull request #113 from qinguoyi/master
Browse files Browse the repository at this point in the history
add set controller reference err log
  • Loading branch information
chrislusf authored Aug 2, 2024
2 parents 32927c9 + 8fa781f commit e75acf8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/controller/controller_filer_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
)

func (r *SeaweedReconciler) createAllIngress(m *seaweedv1.Seaweed) *networkingv1.Ingress {
log := r.Log.WithValues("sw-create-ingress", m.Name)
labels := labelsForIngress(m.Name)
pathType := networkingv1.PathTypePrefix

Expand Down Expand Up @@ -95,6 +96,8 @@ func (r *SeaweedReconciler) createAllIngress(m *seaweedv1.Seaweed) *networkingv1
}

// Set master instance as the owner and controller
ctrl.SetControllerReference(m, dep, r.Scheme)
if err := ctrl.SetControllerReference(m, dep, r.Scheme); err != nil {
log.Error(err, "set controller reference for Ingress failed")
}
return dep
}

0 comments on commit e75acf8

Please sign in to comment.