Skip to content

Commit 4d594aa

Browse files
committed
fix: handle empty autoscaling JSON path in helper function
1 parent 7eb27b2 commit 4d594aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/deployment/manifest/helper/helper.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ func SetScalingValues(templateMap map[string]interface{}, customScalingKey strin
7777
return merged, errors.New(fmt.Sprintf("no json path found for [%s]", customScalingKey))
7878
}
7979
autoscalingJsonPathKey := autoscalingJsonPath.(string)
80+
if len(autoscalingJsonPathKey) == 0 {
81+
return merged, nil
82+
}
8083
mergedRes, err := sjson.Set(string(merged), autoscalingJsonPathKey, value)
8184
if err != nil {
8285
return merged, err

0 commit comments

Comments
 (0)