Skip to content

Commit

Permalink
feat(main): add owner to endpoint (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuisongliu authored Jan 14, 2022
1 parent fb8ed90 commit b6a252d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func (c *Reconciler) syncEndpoint(ctx context.Context, cep *v1beta1.ClusterEndpo
ep.SetNamespace(cep.Namespace)
_, err := controllerutil.CreateOrUpdate(ctx, c.Client, ep, func() error {
ep.Labels = map[string]string{}
if err := controllerutil.SetControllerReference(cep, ep, c.scheme); err != nil {
return err
}
healthyHosts := make([]healthyHostAndPort, 0)
e := make([]error, 0)
for _, h := range cep.Spec.Hosts {
Expand Down

0 comments on commit b6a252d

Please sign in to comment.