Skip to content

Commit

Permalink
return to initial list of metaopts
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-garrison committed Sep 20, 2024
1 parent 3390a6f commit a65f9b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions controllers/routingctrl/reconcile_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ func (r *Controller) exportService(ctx context.Context, target *unstructured.Uns

func (r *Controller) propagateHostsToWatchedCR(ctx context.Context, target *unstructured.Unstructured, publicHosts, externalHosts []string) error {
err := unstruct.PatchWithRetry(ctx, r.Client, target, func() error {
// Always remove the annotations first
annotations.Remove(annotations.RoutingAddressesExternal(""))(target)
annotations.Remove(annotations.RoutingAddressesPublic(""))(target)

var metaOptions []metadata.Option
// Remove all existing routing addresses
metaOptions := []metadata.Option{
annotations.Remove(annotations.RoutingAddressesExternal("")),
annotations.Remove(annotations.RoutingAddressesPublic("")),
}

if len(publicHosts) > 0 {
metaOptions = append(metaOptions, annotations.RoutingAddressesPublic(strings.Join(publicHosts, ";")))
Expand Down

0 comments on commit a65f9b0

Please sign in to comment.