Skip to content

Commit

Permalink
Fix kserve annotation constants (kserve#2491)
Browse files Browse the repository at this point in the history
* Fix kserve annotation constants

ref https://knative.dev/docs/serving/autoscaling/scale-bounds/

Signed-off-by: ddelange <[email protected]>

* Update tests with new annotations

Signed-off-by: ddelange <[email protected]>
  • Loading branch information
ddelange authored Nov 13, 2022
1 parent 61e28f7 commit 70a1c2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ var (
AutoscalerClass = KServeAPIGroupName + "/autoscalerClass"
AutoscalerMetrics = KServeAPIGroupName + "/metrics"
TargetUtilizationPercentage = KServeAPIGroupName + "/targetUtilizationPercentage"
MinScaleAnnotationKey = KnativeAutoscalingAPIGroupName + "/minScale"
MaxScaleAnnotationKey = KnativeAutoscalingAPIGroupName + "/maxScale"
MinScaleAnnotationKey = KnativeAutoscalingAPIGroupName + "/min-scale"
MaxScaleAnnotationKey = KnativeAutoscalingAPIGroupName + "/max-scale"
RollOutDurationAnnotationKey = KnativeServingAPIGroupName + "/rollout-duration"
EnableMetricAggregation = KServeAPIGroupName + "/enable-metric-aggregation"
SetPrometheusAnnotation = KServeAPIGroupName + "/enable-prometheus-scraping"
Expand Down
16 changes: 8 additions & 8 deletions pkg/controller/v1beta1/inferenceservice/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ var _ = Describe("v1beta1 inference service controller", func() {
},
Annotations: map[string]string{
constants.StorageInitializerSourceUriInternalAnnotationKey: *isvc.Spec.Predictor.Model.StorageURI,
"autoscaling.knative.dev/maxScale": "3",
"autoscaling.knative.dev/minScale": "1",
"autoscaling.knative.dev/max-scale": "3",
"autoscaling.knative.dev/min-scale": "1",
"autoscaling.knative.dev/class": "kpa.autoscaling.knative.dev",
"key1": "val1FromSR",
},
Expand Down Expand Up @@ -468,8 +468,8 @@ var _ = Describe("v1beta1 inference service controller", func() {
},
Annotations: map[string]string{
"autoscaling.knative.dev/class": "kpa.autoscaling.knative.dev",
"autoscaling.knative.dev/maxScale": "3",
"autoscaling.knative.dev/minScale": "1",
"autoscaling.knative.dev/max-scale": "3",
"autoscaling.knative.dev/min-scale": "1",
},
},
Spec: knservingv1.RevisionSpec{
Expand Down Expand Up @@ -688,8 +688,8 @@ var _ = Describe("v1beta1 inference service controller", func() {
},
Annotations: map[string]string{
"autoscaling.knative.dev/class": "kpa.autoscaling.knative.dev",
"autoscaling.knative.dev/maxScale": "3",
"autoscaling.knative.dev/minScale": "1",
"autoscaling.knative.dev/max-scale": "3",
"autoscaling.knative.dev/min-scale": "1",
"internal.serving.kserve.io/storage-initializer-sourceuri": "s3://test/mnist/explainer",
},
},
Expand Down Expand Up @@ -1261,8 +1261,8 @@ var _ = Describe("v1beta1 inference service controller", func() {
Annotations: map[string]string{
constants.StorageInitializerSourceUriInternalAnnotationKey: "s3://test/mnist/export",
"autoscaling.knative.dev/class": "kpa.autoscaling.knative.dev",
"autoscaling.knative.dev/maxScale": "3",
"autoscaling.knative.dev/minScale": "1",
"autoscaling.knative.dev/max-scale": "3",
"autoscaling.knative.dev/min-scale": "1",
"key1": "val1FromSR",
"key2": "val2FromISVC",
},
Expand Down

0 comments on commit 70a1c2c

Please sign in to comment.