From f7179f479cfe710e92530bcd5389129c4a2ed2bf Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 1 Feb 2023 15:47:03 +0000 Subject: [PATCH] fix(api-server): no correct conversion runner autoscaling --- api-server/services/kube_bento_deployment.go | 6 +++--- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api-server/services/kube_bento_deployment.go b/api-server/services/kube_bento_deployment.go index 4495c72a..6f277d2b 100644 --- a/api-server/services/kube_bento_deployment.go +++ b/api-server/services/kube_bento_deployment.go @@ -141,10 +141,10 @@ func (s *kubeBentoDeploymentService) transformToBentoDeploymentV1alpha3(ctx cont } for name, runner := range deploymentTarget.Config.Runners { if runner.BentoDeploymentOverrides != nil { - for _, runner_ := range kubeBentoDeployment.Spec.Runners { + for idx, runner_ := range kubeBentoDeployment.Spec.Runners { if runner_.Name == name { - runner_.ExtraPodMetadata = servingv1alpha3.TransformToOldExtraPodMetadata(runner.BentoDeploymentOverrides.ExtraPodMetadata) - runner_.ExtraPodSpec = servingv1alpha3.TransformToOldExtraPodSpec(runner.BentoDeploymentOverrides.ExtraPodSpec) + kubeBentoDeployment.Spec.Runners[idx].ExtraPodMetadata = servingv1alpha3.TransformToOldExtraPodMetadata(runner.BentoDeploymentOverrides.ExtraPodMetadata) + kubeBentoDeployment.Spec.Runners[idx].ExtraPodSpec = servingv1alpha3.TransformToOldExtraPodSpec(runner.BentoDeploymentOverrides.ExtraPodSpec) } } } diff --git a/go.mod b/go.mod index d4c9cbde..5a085f50 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46 github.com/bentoml/grafana-operator v1.4.1-0.20210927064226-14795530b647 github.com/bentoml/yatai-common v0.0.0-20230110044251-1eb442339c38 - github.com/bentoml/yatai-deployment v1.1.3-0.20230112071122-da07c94d3191 + github.com/bentoml/yatai-deployment v1.1.5-0.20230201154516-7b262187ae90 github.com/bentoml/yatai-image-builder v1.1.1-0.20230108162700-337f26f7f704 github.com/bentoml/yatai-schemas v0.0.0-20230111172411-f8278b8bdb8d github.com/bits-and-blooms/bloom/v3 v3.3.1 diff --git a/go.sum b/go.sum index 57cde7fa..97e87c2a 100644 --- a/go.sum +++ b/go.sum @@ -112,8 +112,8 @@ github.com/bentoml/grafana-operator v1.4.1-0.20210927064226-14795530b647 h1:fKWm github.com/bentoml/grafana-operator v1.4.1-0.20210927064226-14795530b647/go.mod h1:w8sk7HbPMnOlZislz8Ch3pRw15FNMY6o1Q+53fepnhc= github.com/bentoml/yatai-common v0.0.0-20230110044251-1eb442339c38 h1:PqfM42gfwBeytS92pV9t8u8POf8czn/4WlmQ/RFGuuY= github.com/bentoml/yatai-common v0.0.0-20230110044251-1eb442339c38/go.mod h1:pox0XYk/bVUwKkadn0XwWHEbJmxSEeN3+HwGA4a8uOQ= -github.com/bentoml/yatai-deployment v1.1.3-0.20230112071122-da07c94d3191 h1:T2om6q0vi3j+4Z3yngft3mNO/mUQ+6z1woYtZ50Kmy0= -github.com/bentoml/yatai-deployment v1.1.3-0.20230112071122-da07c94d3191/go.mod h1:j73glvFeo11oP5I5J7lOxyY5gApS199qFxA1NzplX+Y= +github.com/bentoml/yatai-deployment v1.1.5-0.20230201154516-7b262187ae90 h1:WDtUYXHd1oZ1KdzAy1aBGkwFCxEeuBtKD7lAHyah7vw= +github.com/bentoml/yatai-deployment v1.1.5-0.20230201154516-7b262187ae90/go.mod h1:j73glvFeo11oP5I5J7lOxyY5gApS199qFxA1NzplX+Y= github.com/bentoml/yatai-image-builder v1.1.1-0.20230108162700-337f26f7f704 h1:/NHKiFOZQej5tntp0xlqRThe4f6uS0XHn1HGii2A8fQ= github.com/bentoml/yatai-image-builder v1.1.1-0.20230108162700-337f26f7f704/go.mod h1:yICYIIyCkBVo6xCFSkU1gUOFYzomRAekiCYvEyd6R00= github.com/bentoml/yatai-schemas v0.0.0-20230111172411-f8278b8bdb8d h1:6X4fEjno3ZScH5wFNk0+cIKMHBWU7T0aeLrlecXPOpg=