From 6cec5dd7dfc6e504d4fd7f3aaf9e8ebd58a5f3f0 Mon Sep 17 00:00:00 2001 From: Frederic Mereu Date: Sun, 17 Dec 2023 16:28:06 +0100 Subject: [PATCH] feat(ambassador): add support for provider specific annotations --- source/ambassador_host.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/ambassador_host.go b/source/ambassador_host.go index 634b22073..1e8c37776 100644 --- a/source/ambassador_host.go +++ b/source/ambassador_host.go @@ -166,13 +166,10 @@ func (sc *ambassadorHostSource) Endpoints(ctx context.Context) ([]*endpoint.Endp // endpointsFromHost extracts the endpoints from a Host object func (sc *ambassadorHostSource) endpointsFromHost(ctx context.Context, host *ambassador.Host, targets endpoint.Targets) ([]*endpoint.Endpoint, error) { var endpoints []*endpoint.Endpoint - - providerSpecific := endpoint.ProviderSpecific{} - setIdentifier := "" + annotations := host.Annotations resource := fmt.Sprintf("host/%s/%s", host.Namespace, host.Name) - - annotations := host.Annotations + providerSpecific, setIdentifier := getProviderSpecificAnnotations(annotations) ttl := getTTLFromAnnotations(annotations, resource) if host.Spec != nil {