Use service labels and average value in docker Swarm mode #1255
Replies: 7 comments 2 replies
-
would be very usefull when using dhcp bridge networks the service discovery should "discover" the container bridge ip without passing url label 😅 |
Beta Was this translation helpful? Give feedback.
-
@shamoon Hi, i think this is the way to solve my problem. The new swarm check is very nice when i do the config via the services.yaml. It show the number of container as expected. But when trying to discover the config via labels it does not work. I tried this :
This kind of work, but it shows x entry in the dashboard and of course I only want one. And if i put the labels in the deploy section, it does not show at all... I know i'm not supposed to use the homepage.container label but it was to test things... |
Beta Was this translation helpful? Give feedback.
-
@shamoon, just realized something else, when using label and swarm mode, if a service is not running of the node with from the socket is exposed, homepage won't find it ! I tried that by forcing the placement like this :
I use socket proxy container so the socket is in fact available on all my swarm nodes |
Beta Was this translation helpful? Give feedback.
-
The answer is not very difficult Have a look at https://github.com/UnclePhil/xfeed/blob/master/src/GetFeed.js
And in the docker.yaml you know that you are on swarm
|
Beta Was this translation helpful? Give feedback.
-
I've seen it.... after i write my comment. Hope it will be merged.
Le mer. 7 juin 2023, 22:03, RoyK ***@***.***> a écrit :
… I've created a PR #1571 <#1571>
which implements this exact functionality for detecting the labels for a
docker swarm instance. Hopefully it will get merged soon.
—
Reply to this email directly, view it on GitHub
<#1255 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADTDEYQ67K6J7UW5VA56GDXKDNCHANCNFSM6AAAAAAYZ6FOGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
This discussion has been automatically closed due to lack of community interest. |
Beta Was this translation helpful? Give feedback.
-
This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
-
Description
When we are using Docker SwarmMode with possible multiple replica for each services, we need to be linked to the service in place of container instance.
In this case we need to define the label at the service level (service/deploy/labels) to obtain one effective link to the service and the widget data must use the average value of all replica in the service.
This is a little bit more complicated but more effective.
Other
No response
Beta Was this translation helpful? Give feedback.
All reactions