From c9e7b07a928d5ef0ddab5aa28e70faf6425a80f2 Mon Sep 17 00:00:00 2001 From: Zemtsov Vladimir Date: Sat, 24 Sep 2022 15:44:58 +0300 Subject: [PATCH] Fix checks for webhook in initMode Signed-off-by: Zemtsov Vladimir --- CHANGELOG.md | 2 ++ internal/app/app.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce74219..bbefa28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ### Added +### Release v0.0.3 +- Fix: Fix checks for webhook in initMode ### Release v0.0.2 diff --git a/internal/app/app.go b/internal/app/app.go index 74a4bf7..52aab8f 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -137,8 +137,8 @@ func checks(cfg *config.Config) error { return fmt.Errorf("%s", "Missing volume-dir or volume-dir-archive") } - if len(cfg.Webhook.Urls) < 1 { - return fmt.Errorf("%s", "Missing webhook-url") + if len(cfg.Webhook.Urls) < 1 && !*cfg.InitMode { + return fmt.Errorf("%s", "Missing webhook-url if initMode disable") } if *cfg.InitMode && (len(cfg.VolumeDirsArchive) < 1) {