Merge pull request #253 from fluxcd/bootstrap-required-components

Validate bootstrap required components
pull/258/head
Stefan Prodan 5 years ago committed by GitHub
commit cad64ba044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save