apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
  name: {{ include "kserve.fullname" . }}
  annotations:
    queue.sidecar.serving.knative.dev/resourcePercentage: "10"
  labels:
    {{- include "kserve.labels" . | nindent 4 }}
spec:
  predictor:
    runtimeClassName: {{ .Values.inferenceService.runtimeClassName }}
    model:
      modelFormat:
        name: {{ .Values.inferenceService.model.modelFormat.name }}
      {{- with .Values.inferenceService.model.args }}
      args:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      storageUri: {{ .Values.inferenceService.model.storageUri }}
      {{- if .Values.inferenceService.model.image }}
      image: {{ .Values.inferenceService.model.image }}
      {{- end }}
      resources:
        {{- toYaml .Values.inferenceService.resources | nindent 8 }}
    minReplicas: {{ .Values.inferenceService.minReplicas }}
    maxReplicas: {{ .Values.inferenceService.maxReplicas }}