containous / traefik-extra-service-fabric

Traefik extra: Service Fabric Provider
Apache License 2.0
12 stars 14 forks source link

Traefik URL - How to set the ApplicationName and ServiceName #54

Open githubkelv opened 5 years ago

githubkelv commented 5 years ago

Got Traefik working on Azure Service Fabric cloud host. However the url to access my api is as follows: mycloud.southeastasia.cloudapp.azure.com/api/values

Shouldn't it be (Following the built in reverse proxy by microsoft) mycloud.southeastasia.cloudapp.azure.com/AppName/ServiceName/api/values

How can I configure it so that Traefik includes the AppName and ServiceName in the url ?

mgrishkov commented 4 years ago

It seems to me, that there must be some kind of default frontend ruel as it done on service fabric on windows

http(s)://<Cluster FQDN | internal IP>:Port/<ServiceInstanceName>/<Suffix path>?PartitionKey=<key>&PartitionKind=<partitionkind>&ListenerName=<listenerName>&TargetReplicaSelector=<targetReplicaSelector>&Timeout=<timeout_in_seconds>

But I cannot to find any information about it. And all that we can do is to define rules for each services in ServiceManifest.xml like:

<Extensions>
    <Extension Name="Traefik">
        <Labels xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
            <Label Key="traefik.frontend.rule.0001">PathPrefixStrip: /TestApp/Api</Label>
            ...
        </Labels>
    </Extension>
</Extensions>