This provider plugin allows Traefik to query the Service Fabric management API to discover what services are currently running on a Service Fabric cluster. The provider then maps routing rules to these service instances. The provider will take into account the Health and Status of each of the services to ensure requests are only routed to healthy service instances.
The plugin needs to be configured in the Traefik static configuration before it can be used.
The plugin currently supports the following configuration settings:
http://dariotraefik1.southcentralus.cloudapp.azure.com:19080/
)entryPoints:web:address: :9999api:dashboard: truelog:level: DEBUGpilot:token: xxxxxexperimental:traefikServiceFabricPlugin:moduleName: github.com/dariopb/traefikServiceFabricPluginversion: v0.2.2providers:plugin:traefikServiceFabricPlugin:pollInterval: 4sclusterManagementURL: http://dariotraefik1.southcentralus.cloudapp.azure.com:19080/#certificate : ./cert.pem#certificateKey: ./cert.key
For a complete way to deploy and use the proxy in a Service Fabric cluster, please look here: https://github.com/dariopb/sf-reverseproxies-templates (those are samples only and should be modified according to your needs)
This is a sample SF enabled service showing the currently supported labels. If the sf name is fabric:/pinger/PingerService, the endpoint will be expose at that prefix: '/pinger/PingerService/'
...<ServiceTypes><StatelessServiceType ServiceTypeName="PingerServiceType" UseImplicitHost="true"><Extensions><Extension Name="traefik"><Labels xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema"><Label Key="traefik.http.enable">true</Label><Label Key="traefik.http.loadbalancer.passhostheader">true</Label><Label Key="traefik.http.loadbalancer.healthcheck.path">/</Label><Label Key="traefik.http.loadbalancer.healthcheck.interval">10s</Label><Label Key="traefik.http.loadbalancer.healthcheck.scheme">http</Label></Labels></Extension></Extensions></StatelessServiceType></ServiceTypes>...
Rule section
/dario
))]. This rule is added on top of the default path generation. If this is set, you have to define a middleware to remove the prefix for the service to receive the stripped path.Loadbalancer section
Middleware section
This software is released under the MIT License