Skip to content

Commit

Permalink
Fix checks for webhook in initMode
Browse files Browse the repository at this point in the history
Signed-off-by: Zemtsov Vladimir <[email protected]>
  • Loading branch information
zvlb committed Sep 24, 2022
1 parent f8044a5 commit c9e7b07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Added

### Release v0.0.3
- Fix: Fix checks for webhook in initMode

### Release v0.0.2

Expand Down
4 changes: 2 additions & 2 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c9e7b07

Please sign in to comment.