mirror of https://github.com/linkerd/linkerd2.git
## Motivation Closes #5016 Depends on linkerd/linkerd2-proxy-api#44 ## Solution A `profileTranslator` exists for each service and now has a new `fullyQualifiedName` field. This field is used to set the `FullyQualifiedName` field of `DestinationProfile`s each time an update is sent. In the case that no service profile exists for a service, a default `DestinationProfile` is created and we can use the field to set the correct name. In the case that a service profile does exist for a service, we still use this field to set the name to keep it consistent. ### Example Install linkerd on a cluster and run the destination server: ``` go run controller/cmd/main.go destination -kubeconfig ~/.kube/config ``` Get the IP of a service. Here, we'll get the ip for `linkerd-identity`: ``` > kubectl get -n linkerd svc/linkerd-identity NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE linkerd-identity ClusterIP 10.43.161.68 <none> 8080/TCP 4h25m ``` Get the profile of `linkerd-identity` from service name or IP and note the `FullyQualifiedName` field: ``` > go run controller/script/destination-client/main.go -method getProfile -path 10.43.161.68:8080 INFO[0000] fully_qualified_name:"linkerd-identity.linkerd.svc.cluster.local" .. ``` ``` > go run controller/script/destination-client/main.go -method getProfile -path linkerd-identity.linkerd.svc.cluster.local INFO[0000] fully_qualified_name:"linkerd-identity.linkerd.svc.cluster.local" .. ``` Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com> |
||
---|---|---|
.. | ||
watcher | ||
client.go | ||
endpoint_translator.go | ||
endpoint_translator_test.go | ||
fallback_profile_listener.go | ||
fallback_profile_listener_test.go | ||
profile_translator.go | ||
profile_translator_test.go | ||
server.go | ||
server_test.go | ||
traffic_split_adaptor.go | ||
traffic_split_adaptor_test.go |