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

FieldTypeDescription
keystringUnique identifier for the service (alpha-numeric only, lowercase)
labelstringLabel used for display
descriptionstringDescription used for display
imagestringDocker image path
ports

Port[]

List of ports exposed by this service (see below)
configConfig[]List of configuration options (see below)
volumeMountsVolumeMount[]Defines volume requirements for the service. Currently only one mount is supported per service.
dependsServiceDepencency[]List of dependencies (see below)
displaystring
  • "stack" => show this service as a top-level stack
  • "standalone" => show this service as a standalone (hidden behind the checkbox in the UI)
  • otherwise, do not display this service; only allow it to be added to other stacks
accessstring
  • "internal" => allow this service to receive requests only from within the cluster
  • "external" => allow this service to receive requests from outside of the cluster (usually a browser)
  • otherwise, do not allow any communication to be received by this service
readinessProbeReadyProbeProbe used to determine when a service is ready to receive traffic
argsstring[]Optional arguments to be passed to the container
commandstring[]Optional commands to be passed to the container.
resourceLimitsResourceLimit[]Required CPU and memory requirements for application.

 

Port

FieldTypeDescription
portintPort
protocolstringProtocol – must be one of "http" or "tcp". Determines whether a link is displayed on the NDSLabs UI

 

Config

FieldTypeDescription
namestringName of environment variables passed to container
valuestringDefault value of environment variable
labelstringLabel used for display in the NDSLabs UI
isPasswordboolWhether the field is a password for display in NDSLabs UI
canOverrideboolWhether the value can be overridden

 

VolumeMount

FieldTypeDescription
mountPathstringMount path
namestringName, currently must match the service key

 

ReadyProbe

FieldTypeDescription
typestringProbe type: must be one of "http" or "tcp"
pathstringProbe path for HTTP probes
portintProbe port
initialDelayintHow long to wait before starting probe
timeoutintHow long to wait before timing out

 

ServiceDependency

FieldTypeDescription
keystringUnique identifier of a child service
requiredboolWhether the service is required or optional
shareConfigboolIf 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.

FieldTypeDescription
cpuMaxStringMaximum expected CPU utilization in millicores (1 core = 1000m)
cpuDefaultStringInitial CPU utilization in millicores (1 core = 1000m)
memMaxStringMaximum memory in SI (G, M, K) or power-of-two (Gi, Mi, Ki)
memDefaultStringInitial memory in SI (G, M, K) or power-of-two (Gi, Mi, Ki)
  • No labels