-
Notifications
You must be signed in to change notification settings - Fork 49
Description
I'm experimenting with using docker flow swarm listener as a means to notify my own endpoint with information about new services that join the swarm.
The reason for this, is because I would like to auto provision a secret for new services, that will be used for service to service authentication (it's an oauth client secret for the client credentials
oauth flow that I'd be planning to use between the services.
From experimentation I can see that when I create a service in the swarm with docker service create
the listener sends a request like this:
Date received: 23:04:56
POST /api/echo?distribute=true&madeup=foo&replicas=1&serviceName=dummy-nginx HTTP/1.1
Accept-Encoding: gzip
Host: dummy-endpoint:80
User-Agent: Go-http-client/1.1
Content-Length: 0
I would be really nice if the format of these requests were documented as a stable api, so that this swarm listener could be more easily used in combination with other services in its own right, not just monitor
- without having to set up a proxy or dummy http endpoint to work out what will be sent and when.