Example specification:
Code Block |
---|
{ "id": "uniqueid", "logo": "URL", "key": "cloud9goshortname", "label": "Cloud9 GOMy Service Display Name", "image": { "registry" "image": "docker.io", "name" : "ndslabs/cloud9-go:latest", myimage", "tags" : [ "latest", "v1", "v2", "v3" ] }, "display": "stack", "access": "external", "description": "Description of my service", "depends": "Unopinionated Go development environment based on Cloud9", [ { "id": "dependencyid", "required": true, "sharedConfig": false }, ], "portsconfig": [ { "name": "ENV_VAR", "port"value": "value", "label": 80"Label", "protocolcanOverride": "http"true, "isPassword": true }, ], "command": [ "somecommand" ], "args" : [ "-someargument" ], "ports": [ { "port": 800080, "protocol": "http" }, { "port": 80808000, "protocol": "http" } ], "repositories": [ { "name": "https://github.com/golang/example", "type": "git" } ], "developerEnvironment" : "cloud9godevenvId", "volumeMounts":[ { "name": "data", "mountPath": "/workspace", "namedata" }, { "name": "other", "mountPath": "cloud9go"/other" } ], "readinessProbe" : { "type" : "http", "path" : "/favicon.ico", "port" : 80, "initialDelay": 10, "timeout" : 600 }, "resourceLimits": { "cpuMax": "1", "cpuDefault": "100m", "memMax": "2Gi", "memDefault": "1Gi" }, "labels "tags": {[ "key1tagId1": "value1", "key2": "value2" } } |
Notes:
...
tagId2"
]
} |
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? Type (password, text, boolean, dropdown) – later |
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) | If we support multiple ports, access should be on a per-port level. We can consider making this defaultAccess and allowing th user to override during stack configuration – later |
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. Remove the name. |
readinessProbe | Readiness probe used to determine when the service is ready | |
resourceLimits | Resource limits for the service | |
logo | URL to logo | |
tags | List of tags used to describe/filter this service | Referenced by Id; new /tags endpoint |
API Changes:
- Tags:
- GET /tags
- POST/PUT tags
- DELETE /tags/tag
- Services
- GET /services?filter=tag1,tag2,tag3