You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/03/12 02:23:28 UTC

[camel-k] branch master updated: chore(fix): minScale and maxScale should be always greater than 0

This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new c713352  chore(fix): minScale and maxScale should be always greater than 0
c713352 is described below

commit c713352072bf967ff74a96119b73413a76aae207
Author: nferraro <ni...@gmail.com>
AuthorDate: Tue Mar 12 01:35:53 2019 +0100

    chore(fix): minScale and maxScale should be always greater than 0
---
 pkg/trait/knative_service.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/trait/knative_service.go b/pkg/trait/knative_service.go
index afa9eea..7e0bd44 100644
--- a/pkg/trait/knative_service.go
+++ b/pkg/trait/knative_service.go
@@ -144,10 +144,10 @@ func (t *knativeServiceTrait) getServiceFor(e *Environment) (*serving.Service, e
 	if t.Target != nil {
 		annotations[knativeServingTargetAnnotation] = strconv.Itoa(*t.Target)
 	}
-	if t.MinScale != nil {
+	if t.MinScale != nil && *t.MinScale > 0 {
 		annotations[knativeServingMinScaleAnnotation] = strconv.Itoa(*t.MinScale)
 	}
-	if t.MaxScale != nil {
+	if t.MaxScale != nil && *t.MaxScale > 0 {
 		annotations[knativeServingMaxScaleAnnotation] = strconv.Itoa(*t.MaxScale)
 	}