Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include other labels in notification outside the com.df namespace? #46

Open
dazinator opened this issue Feb 10, 2022 · 1 comment
Open

Comments

@dazinator
Copy link

dazinator commented Feb 10, 2022

At the moment, information about a service inlcuidng it's labels, are sent as query string values in the notification:

created notification to https://messengerserver:443/api/Service/Notification?distribute=true&madeup=foo&notify=true&replicas=1&serviceName=dummy-nginx (13 try)

Above, the madeup=foo is being sent by this swarm listener because the service has a label:

com.df.madeup=foo

So by virtue of the service having a label prefixed with com.df. that label value gets included in the notification with the com.df stripped.

I'd love to re-use this listener agent to forward notifications regarding services with labels relating to other custom functionality, that dockerflow does not currently provide any solutions for. For example, i'd like to label my services with custom labels that use the prefix io.messaging. and I'd like the swarm listener to be able to include those label values, not just com.df. labels values, in the notification.

I can work around this at present by:

  1. Use docker flow swarm listner to notify me about a new service
  2. Call back into swarm / docker api to inspect this new service and grab the additional custom label data I need myself

However things would be much more efficient if this label data could somehow be included in the original notification.

I would have thought that setting DF_NOTIFY_LABEL=io.messaging.notify may have changed things so that the listener only included labels with io.messaging. as the prefix but that is not the intention of that environment variable.

Would you be open to any change to facilitate this behaviour?

@vfarcic
Copy link
Contributor

vfarcic commented Feb 10, 2022

This project does not have active maintainers anymore. Almost all Swarm users moved to Kubernetes, including maintainers of this project. If you'd like to create a PR I'd be more than happy to merge it or make you repo admin if you'd like to be involved more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants