BentoDeployment CRD#

BentoDeployment is a Kubernetes CRD defined by yatai-deployment component.

It is primarily used to describe bento deployments.

Specification#

Field

Type

Description

apiVersion

string

The version of the schema. Current version is serving.yatai.ai/v2alpha1

kind

string

The type of the resource. BentoDeployment

metadata

object

The metadata of the resource. Refer to the Kubernetes API documentation for the fields of the metadata field

spec.bento

string

The name of Bento CR. If this Bento CR not found. yatai-deployment will look for the BentoRequest CR by this name and wait for the BentoRequest CR to generate the Bento CR. required

spec.ingress

object

The ingress configuration.

spec.ingress.enabled

boolean

Whether the ingress is enabled.

spec.envs

array

The environment variables.

spec.envs[].name

string

The name of the environment variable.

spec.envs[].value

string

The value of the environment variable.

spec.autoscaling

object

The autoscaling configuration for the API server

spec.autoscaling.maxReplicas

int32

The maximum number of replicas.

spec.autoscaling.minReplicas

int32

The minimum number of replicas.

spec.autoscaling.metrics

object

The metrics definition

spec.resources.requests.cpu

string

The CPU request.

spec.resources.requests.memory

string

The memory request.

spec.runners

array

The list of runners resources configuration.

spec.runners[].name

string

The name of the runner.

spec.runners[].autoscaling.maxReplicats

int32

The maximum number of replicas.

spec.runners[].autoscaling.minReplicats

int32

The minimum number of replicas.

spec.runners[].resources

object

The resources of the runner.

spec.runners[].resources.limits.cpu

string

The CPU limit.

spec.runners[].resources.limits.memory

string

The memory limit.

spec.runners[].resources.requests.cpu

string

The CPU request.

spec.runners[].resources.requests.memory

string

The memory request.

spec.runners[].envs

array

The environment variables.

spec.runners[].envs[].name

string

The name of the environment variable.

spec.runners[].envs[].value

string

The value of the environment variable.

Example of a BentoDeployment#

apiVersion: serving.yatai.ai/v2alpha1
kind: BentoDeployment
metadata:
  name: my-bento-deployment
  namespace: my-namespace
spec:
  bento: iris-1
  ingress:
    enabled: true
  envs:
  - name: foo
    value: bar
  resources:
    limits:
        cpu: 2000m
        memory: "4Gi"
    requests:
        cpu: 1000m
        memory: "2Gi"
  autoscaling:
    maxReplicas: 5
    minReplicas: 1
    metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 60
  runners:
  - name: runner1
    resources:
      limits:
        cpu: 2000m
        memory: "4Gi"
      requests:
        cpu: 1000m
        memory: "2Gi"
    autoscaling:
      maxReplicas: 2
      minReplicas: 1
  - name: runner2
    resources:
      limits:
        cpu: 2000m
        memory: "4Gi"
      requests:
        cpu: 1000m
        memory: "2Gi"
    autoscaling:
      maxReplicas: 4
      minReplicas: 1