Service specification documentation is now in Github for each release:
https://github.com/nds-org/ndslabs-specs/
The following refers only to version 1 of the NDS Labs service spec.
Overview
This page describes version 1 of the NDS Labs service specification. Example specifications can be found in the ndslabs-specs Github repository.
Service
Field | Type | Description |
---|---|---|
key | string | Unique identifier for the service (alpha-numeric only, lowercase) |
label | string | Label used for display |
description | string | Description used for display |
image | string | Docker image path |
ports | Port[] | List of ports exposed by this service (see below) |
config | Config[] | List of configuration options (see below) |
volumeMounts | VolumeMount[] | Defines volume requirements for the service. Currently only one mount is supported per service. |
depends | ServiceDepencency[] | List of dependencies (see below) |
display | string |
|
access | string |
|
readinessProbe | ReadyProbe | Probe used to determine when a service is ready to receive traffic |
args | string[] | Optional arguments to be passed to the container |
command | string[] | Optional commands to be passed to the container. |
resourceLimits | ResourceLimit[] | Required CPU and memory requirements for application. |
Port
Field | Type | Description |
---|---|---|
port | int | Port |
protocol | string | Protocol – must be one of "http" or "tcp". Determines whether a link is displayed on the NDSLabs UI |
Config
Field | Type | Description |
---|---|---|
name | string | Name of environment variables passed to container |
value | string | Default value of environment variable |
label | string | Label used for display in the NDSLabs UI |
isPassword | bool | Whether the field is a password for display in NDSLabs UI |
canOverride | bool | Whether the value can be overridden |
VolumeMount
Field | Type | Description |
---|---|---|
mountPath | string | Mount path |
name | string | Name, currently must match the service key |
ReadyProbe
Field | Type | Description |
---|---|---|
type | string | Probe type: must be one of "http" or "tcp" |
path | string | Probe path for HTTP probes |
port | int | Probe port |
initialDelay | int | How long to wait before starting probe |
timeout | int | How long to wait before timing out |
ServiceDependency
Field | Type | Description |
---|---|---|
key | string | Unique identifier of a child service |
required | bool | Whether the service is required or optional |
shareConfig | bool | If true, configuration of the child service is injected into the parent container. This prevents needing to collect the same information twice. |
ResourceLimit
Individual NDS Labs projects are configured with specific memory and CPU limits. Because of this, all services must declare memory and CPU requirements to enable scheduling and resource constraint enforcement. These values relate directly to Kubernetes limit ranges and resource requests.
Field | Type | Description |
---|---|---|
cpuMax | String | Maximum expected CPU utilization in millicores (1 core = 1000m) |
cpuDefault | String | Initial CPU utilization in millicores (1 core = 1000m) |
memMax | String | Maximum memory in SI (G, M, K) or power-of-two (Gi, Mi, Ki) |
memDefault | String | Initial memory in SI (G, M, K) or power-of-two (Gi, Mi, Ki) |