mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-08 08:47:27 +00:00
Validate bootstrap required components
This commit is contained in:
parent
a66ac1594b
commit
9b0c44162a
1 changed files with 7 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ var (
|
|||
bootstrapBranch string
|
||||
bootstrapWatchAllNamespaces bool
|
||||
bootstrapLogLevel string
|
||||
bootstrapRequiredComponents = []string{"source-controller", "kustomize-controller"}
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -90,6 +91,12 @@ func bootstrapValidate() error {
|
|||
return fmt.Errorf("log level %s is not supported, can be %v", bootstrapLogLevel, supportedLogLevels)
|
||||
}
|
||||
|
||||
for _, component := range bootstrapRequiredComponents {
|
||||
if !utils.containsItemString(bootstrapComponents, component) {
|
||||
return fmt.Errorf("component %s is required", component)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue