From 9cae6c95b1933bcaf5cfb29ee952e24f8946a58d Mon Sep 17 00:00:00 2001 From: Caleb Bron Date: Wed, 18 Dec 2019 10:02:53 -0700 Subject: [PATCH] New template service gets standard weight --- modules/service/controllers/template/handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/service/controllers/template/handler.go b/modules/service/controllers/template/handler.go index 5a411d91f..e1826be7f 100644 --- a/modules/service/controllers/template/handler.go +++ b/modules/service/controllers/template/handler.go @@ -5,6 +5,7 @@ import ( "fmt" webhookv1controller "github.com/rancher/gitwatcher/pkg/generated/controllers/gitwatcher.cattle.io/v1" + "github.com/rancher/rio/cli/cmd/weight" riov1 "github.com/rancher/rio/pkg/apis/rio.cattle.io/v1" "github.com/rancher/rio/pkg/constants" riov1controller "github.com/rancher/rio/pkg/generated/controllers/rio.cattle.io/v1" @@ -74,7 +75,7 @@ func (h *handler) generate(service *riov1.Service, status riov1.ServiceStatus) ( if err := h.scaleDownRevisions(service.Namespace, app, name); err != nil { return nil, status, nil } - spec.Weight = &[]int{100}[0] + spec.Weight = &[]int{weight.PromoteWeight}[0] } if status.ShouldClean[name] || status.GeneratedServices[name] {