Example specification:

{
    "id": "uniqueid",
	"logo": "URL",
    "key": "shortname",
    "label": "My Service Display Name",
	"image": {
		"registry" : "docker.io",
		"name" : "ndslabs/myimage",
		"tags" : [ "latest", "v1", "v2", "v3" ]
	},
    "display": "stack",
    "access": "external",
    "description": "Description of my service",
    "depends": [
        {
            "id": "dependencyid",
            "required": true,
			"sharedConfig": false
        },
	],
    "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"
        }
    ],
    "repositories":  [
        {
            "name": "https://github.com/golang/example",
            "type": "git"
        }
    ],
    "developerEnvironment" : "devenvId",
    "volumeMounts":[
       {  
			"name": "data",
			"mountPath": "/data"
	   },
       { 
			"name": "other",
			"mountPath": "/other"
	   }	
    ],
    "readinessProbe" : {
        "type" : "http",
        "path" : "/favicon.ico",
        "port" : 80,
        "initialDelay": 10,
        "timeout" : 600
    },
    "resourceLimits": {
        "cpuMax": "1",
        "cpuDefault": "100m",
        "memMax": "2Gi",
        "memDefault": "1Gi"
    },
	"tags": [
		"tagId1",
		"tagId2"
	]
}
FieldDescriptionNotes
idUnique IDUsed to uniquely identify this service
shortnameShort nameWas key – used in Kubernetes service, RC and pod names. Should be unique and limited to
labelDisplay name 
descriptionDescription 
imageDocker image 
dependsOptional and required depenciesShould key on ID going forward
configEnvironment variables (canOverride, password)Should we revisit this? Type (password, text, boolean, dropdown) – later
commandOptional startup command 
argsOptional command arguments 
displayWhether to display in the catalog (stack, standalone,Do we need this?
accessWhether 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
portsList of ports exposed by this serviceCurrently, we assume a single port. Multiple ports means multiple NodePorts or ingress rules.
repositoriesList of source code repositories associated with this serviceShould support Git/Bitbucket, Mercurial, SVN, CVS. A service can have multiple repositories. 
developerEnvironmentDeveloper environment used to create this serviceReference to unique ID of developer environment specification
volumeMountsList of volume mount pointsCurrently, we support a single volume mount. Remove the name.
readinessProbeReadiness probe used to determine when the service is ready 
resourceLimitsResource limits for the service 
logoURL to logo 
tagsList of tags used to describe/filter this serviceReferenced by Id; new /tags endpoint

 

API Changes:

  • Tags:
    • GET /tags
    • POST/PUT tags
    • DELETE /tags/tag
  • Services
    • GET /services?filter=tag1,tag2,tag3

 

 

  • No labels