Skip to content

Commit

Permalink
Create the "resource" label for Ambassador Host
Browse files Browse the repository at this point in the history
  • Loading branch information
johngmyers committed Jul 4, 2023
1 parent a31c8ad commit 98fdef0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/ambassador_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ func (sc *ambassadorHostSource) endpointsFromHost(ctx context.Context, host *amb
providerSpecific := endpoint.ProviderSpecific{}
setIdentifier := ""

resource := fmt.Sprintf("host/%s/%s", host.Namespace, host.Name)

annotations := host.Annotations
ttl, err := getTTLFromAnnotations(annotations)
if err != nil {
Expand All @@ -176,7 +178,7 @@ func (sc *ambassadorHostSource) endpointsFromHost(ctx context.Context, host *amb
if host.Spec != nil {
hostname := host.Spec.Hostname
if hostname != "" {
endpoints = append(endpoints, endpointsForHostname(hostname, targets, ttl, providerSpecific, setIdentifier, "")...)
endpoints = append(endpoints, endpointsForHostname(hostname, targets, ttl, providerSpecific, setIdentifier, resource)...)
}
}

Expand Down

0 comments on commit 98fdef0

Please sign in to comment.