Show warning message if spec alters poolsize while env version < 3 (#1193)

This commit is contained in:
Ta-Ching Chen
2019-05-31 17:49:56 +08:00
committed by GitHub
parent a0e9a39511
commit 1d266537b0
2 changed files with 5 additions and 0 deletions
+5
View File
@@ -398,6 +398,11 @@ func (fr *FissionResources) validate() error {
if (e.Spec.Runtime.Container != nil) && (e.Spec.Runtime.PodSpec != nil) {
log.Warn("You have provided both - container spec and pod spec and while merging the pod spec will take precedence.")
}
// Unlike CLI can change the environment version silently,
// we have to warn the user to modify spec file when this takes place.
if e.Spec.Version < 3 && e.Spec.Poolsize != 0 {
log.Warn("Poolsize can only be configured when environment version equals to 3, default poolsize 3 will be used for creating environment pool.")
}
}
for _, f := range fr.functions {
Binary file not shown.