Search…
Configuration
1
- name: <string> # name of the API (required)
2
kind: AsyncAPI # must be "AsyncAPI" for async APIs (required)
3
pod: # pod configuration (required)
4
port: <int> # port to which requests will be sent (default: 8080; exported as $CORTEX_PORT)
5
max_concurrency: <int> # maximum number of requests that will be concurrently sent into the container (default: 1, max allowed: 100)
6
containers: # configurations for the containers to run (at least one constainer must be provided)
7
- name: <string> # name of the container (required)
8
image: <string> # docker image to use for the container (required)
9
command: <list[string]> # entrypoint (not executed within a shell); env vars can be used with e.g. $(CORTEX_PORT) (default: the docker image's ENTRYPOINT)
10
args: <list[string]> # arguments to the entrypoint; env vars can be used with e.g. $(CORTEX_PORT) (default: the docker image's CMD)
11
env: <map[string:string]> # dictionary of environment variables to set in the container (optional)
12
compute: # compute resource requests (default: see below)
13
cpu: <string|int|float> # CPU request for the container; one unit of CPU corresponds to one virtual CPU; fractional requests are allowed, and can be specified as a floating point number or via the "m" suffix (default: 200m)
14
gpu: <int> # GPU request for the container; one unit of GPU corresponds to one virtual GPU (default: 0)
15
inf: <int> # Inferentia request for the container; one unit of inf corresponds to one virtual Inferentia chip (default: 0)
16
mem: <string> # memory request for the container; one unit of memory is one byte and can be expressed as an integer or by using one of these suffixes: K, M, G, T (or their power-of two counterparts: Ki, Mi, Gi, Ti) (default: Null)
17
shm: <string> # size of shared memory (/dev/shm) for sharing data between multiple processes, e.g. 64Mi or 1Gi (default: Null)
18
readiness_probe: # periodic probe of container readiness; traffic will not be sent into the pod unless all containers' readiness probes are succeeding (optional)
19
http_get: # specifies an http endpoint which must respond with status code 200 (only one of http_get and tcp_socket may be specified)
20
port: <int|string> # the port to access on the container (required)
21
path: <string> # the path to access on the HTTP server (default: /)
22
tcp_socket: # specifies a port which must be ready to receive traffic (only one of http_get and tcp_socket may be specified)
23
port: <int|string> # the port to access on the container (required)
24
initial_delay_seconds: <int> # number of seconds after the container has started before the probe is initiated (default: 0)
25
timeout_seconds: <int> # number of seconds until the probe times out (default: 1)
26
period_seconds: <int> # how often (in seconds) to perform the probe (default: 10)
27
success_threshold: <int> # minimum consecutive successes for the probe to be considered successful after having failed (default: 1)
28
failure_threshold: <int> # minimum consecutive failures for the probe to be considered failed after having succeeded (default: 3)
29
liveness_probe: # periodic probe of container liveness; container will be restarted if the probe fails (optional)
30
http_get: # specifies an http endpoint which must respond with status code 200 (only one of http_get, tcp_socket, and exec may be specified)
31
port: <int|string> # the port to access on the container (required)
32
path: <string> # the path to access on the HTTP server (default: /)
33
tcp_socket: # specifies a port which must be ready to receive traffic (only one of http_get, tcp_socket, and exec may be specified)
34
port: <int|string> # the port to access on the container (required)
35
exec: # specifies a command to run which must exit with code 0 (only one of http_get, tcp_socket, and exec may be specified)
36
command: <list[string]> # the command to execute inside the container, which is exec'd (not run inside a shell); the working directory is root ('/') in the container's filesystem (required)
37
initial_delay_seconds: <int> # number of seconds after the container has started before the probe is initiated (default: 0)
38
timeout_seconds: <int> # number of seconds until the probe times out (default: 1)
39
period_seconds: <int> # how often (in seconds) to perform the probe (default: 10)
40
success_threshold: <int> # minimum consecutive successes for the probe to be considered successful after having failed (default: 1)
41
failure_threshold: <int> # minimum consecutive failures for the probe to be considered failed after having succeeded (default: 3)
42
pre_stop: # a pre-stop lifecycle hook for the container; will be executed before container termination (optional)
43
http_get: # specifies an http endpoint to send a request to (only one of http_get, tcp_socket, and exec may be specified)
44
port: <int|string> # the port to access on the container (required)
45
path: <string> # the path to access on the HTTP server (default: /)
46
exec: # specifies a command to run (only one of http_get, tcp_socket, and exec may be specified)
47
command: <list[string]> # the command to execute inside the container, which is exec'd (not run inside a shell); the working directory is root ('/') in the container's filesystem (required)
48
autoscaling: # autoscaling configuration (default: see below)
49
min_replicas: <int> # minimum number of replicas (default: 1; min value: 0)
50
max_replicas: <int> # maximum number of replicas (default: 100)
51
init_replicas: <int> # initial number of replicas (default: <min_replicas>)
52
target_in_flight: <float> # desired number of in-flight requests per replica (including requests actively being processed as well as queued), which the autoscaler tries to maintain (default: <max_concurrency>)
53
window: <duration> # duration over which to average the API's in-flight requests per replica (default: 60s)
54
downscale_stabilization_period: <duration> # the API will not scale below the highest recommendation made during this period (default: 5m)
55
upscale_stabilization_period: <duration> # the API will not scale above the lowest recommendation made during this period (default: 1m)
56
max_downscale_factor: <float> # maximum factor by which to scale down the API on a single scaling event (default: 0.75)
57
max_upscale_factor: <float> # maximum factor by which to scale up the API on a single scaling event (default: 1.5)
58
downscale_tolerance: <float> # any recommendation falling within this factor below the current number of replicas will not trigger a scale down event (default: 0.05)
59
upscale_tolerance: <float> # any recommendation falling within this factor above the current number of replicas will not trigger a scale-up event (default: 0.05)
60
node_groups: <list[string]> # a list of node groups on which this API can run (default: all node groups are eligible)
61
update_strategy: # deployment strategy to use when replacing existing replicas with new ones (default: see below)
62
max_surge: <string|int> # maximum number of replicas that can be scheduled above the desired number of replicas during an update; can be an absolute number, e.g. 5, or a percentage of desired replicas, e.g. 10% (default: 25%) (set to 0 to disable rolling updates)
63
max_unavailable: <string|int> # maximum number of replicas that can be unavailable during an update; can be an absolute number, e.g. 5, or a percentage of desired replicas, e.g. 10% (default: 25%)
64
networking: # networking configuration (default: see below)
65
endpoint: <string> # endpoint for the API (default: <api_name>)
Copied!
Last modified 5mo ago
Copy link