Example specification:
{ "id": "uniqueid", "key": "shortname", "label": "My Service Display Name", "image": "ndslabs/myimage:latest", "display": "stack", "access": "external", "description": "Description of my service", "depends": [ { "id": "dependencyid", "required": true }, ], "config": [ { "name": "ENV_VAR", "value": "value", "label": "Label", "canOverride": true, "isPassword": true }, ], "command": [ "somecommand" ], "args" : [ "-someargument" ], "ports": [ { "port": 80, "protocol": "http" }, { "port": 8000, "protocol": "http" }, { "port": 8080, "protocol": "http" } ], "repositories": [ { "name": "https://github.com/golang/example", "type": "git" } ], "developerEnvironment" : "devenvId", "volumeMounts":[ { "mountPath": "/workspace", "name": "cloud9go" } ], "readinessProbe" : { "type" : "http", "path" : "/favicon.ico", "port" : 80, "initialDelay": 10, "timeout" : 600 }, "resourceLimits": { "cpuMax": "1", "cpuDefault": "100m", "memMax": "2Gi", "memDefault": "1Gi" }, "tags": [ "Go", "Development Environment" ] }
Field | Description | Notes |
---|---|---|
id | Unique ID | Used to uniquely identify this service |
shortname | Short name | Was key – used in Kubernetes service, RC and pod names. Should be unique and limited to |
label | Display name | |
description | Description | |
image | Docker image | |
depends | Optional and required depencies | Should key on ID going forward |
config | Environment variables (canOverride, password) | Should we revisit this? |
command | Optional startup command | |
args | Optional command arguments | |
display | Whether to display in the catalog (stack, standalone, | Do we need this? |
access | Whether to enable remote access (Nodeport, ingress) | Should this be at the spec or stack level? |
ports | List of ports exposed by this service | Currently, we assume a single port. Multiple ports means multiple NodePorts or ingress rules. |
repositories | List of source code repositories associated with this service | Should support Git/Bitbucket, Mercurial, SVN, CVS. A service can have multiple repositories. |
developerEnvironment | Developer environment used to create this service | Reference to unique ID of developer environment specification |
volumeMounts | List of volume mount points | Currently, we support a single volume mount |
readinessProbe | Readiness probe used to determine when the service is ready | |
resourceLimits | Resource limits for the service | |
tags | List of tags used to describe/filter this service | Where do the tags come from |
API Changes:
- Tags:
- GET /tags
- POST/PUT tags
- DELETE /tags/tag
- Services
- GET /services?filter=tag1,tag2,tag3