Skip to content

Commit

Permalink
Show warning message if spec alters poolsize while env version < 3 (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
life1347 authored May 31, 2019
1 parent a0e9a39 commit 1d26653
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/fission-cli/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Binary file removed pkg/fission/fission
Binary file not shown.

0 comments on commit 1d26653

Please sign in to comment.