Skip to content

Commit c9d3ef3

Browse files
committed
error on missing required config
1 parent ac65854 commit c9d3ef3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cmd/kots/cli/template.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,10 @@ func pullAndRender(appSlug string, licensePath string, configPath string, localP
268268
upstream := pull.RewriteUpstream(appSlug)
269269
_, err = pull.Pull(upstream, pullOptions)
270270

271-
if err != nil && err != pull.ErrConfigNeeded {
271+
if err != nil {
272+
if err == pull.ErrConfigNeeded {
273+
return errors.New("missing required config values to render templates")
274+
}
272275
return errors.Wrap(err, "failed to pull upstream")
273276
}
274277

pkg/kotsadmconfig/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func NeedsConfiguration(appSlug string, sequence int64, isAirgap bool, kotsKinds
8484
}
8585
for _, item := range group.Items {
8686
if IsRequiredItem(item) && IsUnsetItem(item) {
87+
log.Info("config item %q is required but not set", item.Name)
8788
return true, nil
8889
}
8990
}

0 commit comments

Comments
 (0)