From 9d5a6d13218b5a60d8a9091d5d5d11bb52c8d61a Mon Sep 17 00:00:00 2001 From: Lewis Buckley Date: Wed, 19 Jul 2023 15:03:15 +0100 Subject: [PATCH] Document the rolling option for traefik reboots --- README.md | 10 ++++++++++ lib/mrsk/cli/traefik.rb | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 034e0a77..3b0ce634 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/lib/mrsk/cli/traefik.rb b/lib/mrsk/cli/traefik.rb index 42d610d3..b96b59d6 100644 --- a/lib/mrsk/cli/traefik.rb +++ b/lib/mrsk/cli/traefik.rb @@ -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