Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/kserve/templates/inferenceservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
predictor:
{{- include "setAffinityFunction" . | nindent 4 }}
{{- if eq (include "kserve.isCustomMetrics" .) "false" }}
{{- if .Values.minReplicas }}
{{- if ge (int .Values.minReplicas) 0 }}
minReplicas: {{ .Values.minReplicas }}
{{- end }}
{{- if .Values.maxReplicas }}
Expand Down Expand Up @@ -347,7 +347,7 @@ spec:
apiVersion: apps/v1
kind: Deployment
name: {{ .Release.Name }}-predictor
{{- if .Values.minReplicas }}
{{- if ge (int .Values.minReplicas) 0 }}
minReplicas: {{ .Values.minReplicas }}
{{- end }}
{{- if .Values.maxReplicas }}
Expand Down
2 changes: 1 addition & 1 deletion charts/kserve/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1
replicaCount: 1
2 changes: 1 addition & 1 deletion pkg/argsbuilder/update_serving_kserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (s *UpdateKServeArgsBuilder) AddCommandFlags(command *cobra.Command) {
command.Flags().StringVar(&s.args.ProtocolVersion, "protocol-version", "", "the protocol version to use by the predictor (i.e. v1 or v2 or grpc-v1 or grpc-v2)")

// ComponentExtension defines the deployment configuration for a given InferenceService component
command.Flags().IntVar(&s.args.MinReplicas, "min-replicas", 1, "minimum number of replicas, defaults to 1 but can be set to 0 to enable scale-to-zero")
command.Flags().IntVar(&s.args.MinReplicas, "min-replicas", -1, "minimum number of replicas, defaults to 1 but can be set to 0 to enable scale-to-zero. use -1 to keep existing value on update")
command.Flags().IntVar(&s.args.MaxReplicas, "max-replicas", 0, "maximum number of replicas for autoscaling")
command.Flags().IntVar(&s.args.ScaleTarget, "scale-target", 0, "specifies the integer target value of the metric type the Autoscaler watches for")
command.Flags().StringVar(&s.args.ScaleMetric, "scale-metric", "", "the scaling metric type watched by autoscaler. possible values are concurrency, rps, cpu, memory. concurrency, rps are supported via KPA")
Expand Down