basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
9.39k stars 359 forks source link

Apply --hosts and --roles filters to traefik hosts as well #785

Closed mdkent closed 2 months ago

mdkent commented 2 months ago

Given a config like

web_rw_ash:
  hosts:
    - foo-staging-default-jobs-101
    - foo-staging-default-jobs-102
web_sc_chi:
  hosts:
    - foo-staging-default-jobs-01
    - foo-staging-default-jobs-02

I observed this while trying to show deploy and show details on a single role:

$ bin/kamal details -d staging -r web_sc_chi -H
  INFO [f0be9496] Running docker ps --filter name=^traefik$ on foo-staging-default-jobs-101
  INFO [83cfb3ac] Running docker ps --filter name=^traefik$ on foo-staging-default-jobs-102
  INFO [18d0a41a] Running docker ps --filter name=^traefik$ on foo-staging-default-jobs-01
  INFO [029d4529] Running docker ps --filter name=^traefik$ on foo-staging-default-jobs-02
<snip>

this PR fixes it by filtering traefik hosts.