Skip to content

Commit

Permalink
Sf Traefik 1.1 minor changes (#35)
Browse files Browse the repository at this point in the history
* comment unapproved registries

* comment out unapproved registry

* changes to Readme and example pinger app
  • Loading branch information
egaribay77 authored Apr 9, 2024
1 parent bc31c2d commit 755e387
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ServiceFabricTraefik 1.0.0
# ServiceFabricTraefik 1.1.0

The reverse proxy is an application, supplied out of band from the service fabric distribution, that customers deploy to their clusters and handles proxying traffic to backend services. The service, that potentially runs on every node in the cluster, takes care of handling endpoint resolution, automatic retry, and other connection failures on behalf of the clients. The reverse proxy can be configured to apply various policies as it handles requests from client services.

Expand Down Expand Up @@ -55,7 +55,7 @@ Connect-ServiceFabricCluster -ConnectionEndpoint @('sf-win-cluster.westus2.cloud
# Use this to remove a previous Traefik Application
#Remove-ServiceFabricApplication -ApplicationName fabric:/traefik -Force
#Unregister-ServiceFabricApplicationType -ApplicationTypeName TraefikType -ApplicationTypeVersion 1.0.0 -Force
#Unregister-ServiceFabricApplicationType -ApplicationTypeName TraefikType -ApplicationTypeVersion 1.1.0 -Force
#Copy and register and run the Traefik Application
Copy-ServiceFabricApplicationPackage -CompressPackage -ApplicationPackagePath $appPath # -ApplicationPackagePathInImageStore traefik
Expand All @@ -75,12 +75,12 @@ $p = @{
#ReverseProxy_PlacementConstraints="NodeType == NT2"
}
$p
New-ServiceFabricApplication -ApplicationName fabric:/traefik -ApplicationTypeName TraefikType -ApplicationTypeVersion 1.0.0 -ApplicationParameter $p
New-ServiceFabricApplication -ApplicationName fabric:/traefik -ApplicationTypeName TraefikType -ApplicationTypeVersion 1.1.0 -ApplicationParameter $p
#OR if updating existing version:
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/traefik -ApplicationTypeVersion 1.0.0 -Monitored -FailureAction rollback
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/traefik -ApplicationTypeVersion 1.1.0 -Monitored -FailureAction rollback
```

## Add the right labels to your services
Expand Down Expand Up @@ -162,7 +162,7 @@ Most of all the traefik http, tcp and tls [dynamic configurations](https://doc.

A sample test application, that is included in the release, can be deployed to test everything is working. After deployment, you should be able to reach it at:

https://your-cluster:8080/pinger0/PingerService/id
https://ClusterFQDN:8080/pinger0/PingerService/id

>Note that the service is going to be exposed on https since the service has a label for the route.tls option. You can explore that looking at the service manifest for this app.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<Extension Name="traefik">
<Labels xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
<Label Key="traefik.http.PingerEndpoint0">true</Label>
<Label Key="traefik.http.PingerEndpoint0.router.tls.options"></Label>
<!--<Label Key="traefik.http.PingerEndpoint0.router.rule">PathPrefix(`/pinger`)</Label> -->
<!--<Label Key="traefik.http.PingerEndpoint0.middlewares.1.stripPrefix.prefixes">/pinger</Label> -->
<Label Key="traefik.http.PingerEndpoint0.router.tls.options">foobar</Label>
<Label Key="traefik.http.PingerEndpoint0.service.loadbalancer.healthcheck.path">/</Label>
<Label Key="traefik.http.PingerEndpoint0.service.loadbalancer.healthcheck.interval">10s</Label>
<Label Key="traefik.http.PingerEndpoint0.service.loadbalancer.healthcheck.scheme">http</Label>
<!--<Label Key="traefik.http.PingerEndpoint0.service.loadbalancer.healthcheck.path">/</Label> -->
<!--<Label Key="traefik.http.PingerEndpoint0.service.loadbalancer.healthcheck.interval">10s</Label> -->
<!--<Label Key="traefik.http.PingerEndpoint0.service.loadbalancer.healthcheck.scheme">http</Label> -->

<Label Key="traefik.tcp.PingerEndpoint0">true</Label>
<Label Key="traefik.tcp.PingerEndpoint0.router.entryPoints">tcp1</Label>
<!-- <Label Key="traefik.tcp.PingerEndpoint0">true</Label> -->
<!-- <Label Key="traefik.tcp.PingerEndpoint0.router.entryPoints">tcp1</Label> -->
<!-- <Label Key="traefik.tcp.PingerEndpoint0.router.rule">HostSNI(`www.myservice.com`)</Label> -->
</Labels>
</Extension>
Expand Down
9 changes: 6 additions & 3 deletions src/serviceFabricDiscoveryService/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# syntax=docker/dockerfile:1

ARG ARCH
FROM golang:1.20 as builder
#UNCOMMENT
# FROM golang:1.20 as builder

WORKDIR /tmp/build

Expand All @@ -10,8 +11,10 @@ ENV CGO_ENABLED=0
COPY . .
RUN go build -o dist/serviceFabricDiscoveryService ./cmd

FROM gcr.io/distroless/static
#UNCOMMENT
# FROM gcr.io/distroless/static

COPY --from=builder /tmp/build/dist/serviceFabricDiscoveryService /
#UNCOMMENT
# COPY --from=builder /tmp/build/dist/serviceFabricDiscoveryService /

ENTRYPOINT ["/serviceFabricDiscoveryService"]

0 comments on commit 755e387

Please sign in to comment.