-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Labels
area/APIgood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/feature
Description
After #2711 is implemented, as the Eventing TLS feature track describes we should add a new method on the resolver as follow:
AddressableFromDestination(ctx Context, dest Destination, parent interface{}) (*Addressable, error)The implementation should be similar to URIFromDestination
https://github.com/knative/pkg/blob/main/resolver/addressable_resolver.go#L75-L76C10
but with the following additional algorithm/logic:
- If status.addresses of the resolved destination is set (has at least 1 element)
- if dest.ref.address is not specified:
- Select the first (in order) address from all addresses
- If no address is found use status.address of the resolved destination
- else
- Select the first (in order) address from all addresses with name == dest.ref.address
- If no address is found return an error explaining that the address with name <address_value> cannot be found/resolved
- if dest.ref.address is not specified:
- else return
status.addressof the resolved destination
Since the new AddressableFromDestination is a superset of URIFromDestination, the URIFromDestination should make use of the AddressableFromDestination method but return the resolved URI
Additional Info
/good-first-issue
/kind feature
/area API
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/APIgood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/feature