Document the rolling option for traefik reboots

This commit is contained in:
Lewis Buckley
2023-07-19 15:03:15 +01:00
parent ecfd258093
commit 9d5a6d1321
2 changed files with 11 additions and 1 deletions

View File

@@ -633,6 +633,16 @@ traefik:
entrypoints.otherentrypoint.address: ':9000'
```
### Rebooting Traefik
If you make changes to Traefik args or labels, you'll need to reboot with:
`mrsk traefik reboot`
In production, reboot the Traefik containers one by one with a slower but safer approach, using a rolling reboot:
`mrsk traefik reboot --rolling`
### Configuring build args for new images
Build arguments that aren't secret can also be configured:

View File

@@ -9,8 +9,8 @@ class Mrsk::Cli::Traefik < Mrsk::Cli::Base
end
end
method_option :rolling, type: :boolean, default: false, desc: "Reboot traefik on hosts in sequence, rather than in parallel"
desc "reboot", "Reboot Traefik on servers (stop container, remove container, start new container)"
option :rolling, type: :boolean, default: false, desc: "Reboot traefik on hosts in sequence, rather than in parallel"
def reboot
mutating do
on(MRSK.traefik_hosts, in: options[:rolling] ? :sequence : :parallel) do