containrrr / shepherd

Docker swarm service for automatically updating your services whenever their image is refreshed
https://hub.docker.com/r/mazzolino/shepherd
MIT License
503 stars 87 forks source link

Blacklisted services are not excluded when service names don't exactly match #50

Closed jannisbecker closed 3 years ago

jannisbecker commented 3 years ago

Given a list of services deployed in a docker swarm using docker stack deploy -c compose.yml zeiterfassung where zeiterfassung is the name of the created stack. This will result in shepherds script line docker service ls --quiet --filter "${FILTER_SERVICES}" --format '{{.Name}}' to give the following results:

zeiterfassung_api-mock zeiterfassung_backend zeiterfassung_frontend zeiterfassung_shepherd zeiterfassung_traefik zeiterfassung_ubw-mock

If I write my blacklisted services like described in the README, i.e. BLACKLIST_SERVICES: "shepherd traefik", then these won't be blacklisted, since the names in the blacklist don't exactly match the service names. In my opinion however, the blacklisted names should not need to include the stack name, since that can be different across swarms. Could we perhaps wildcard match the blacklisted services by default?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.