You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Example specification:

{
    "key": "cloud9go",
    "label": "Cloud9 GO",
    "image": "ndslabs/cloud9-go:latest",
    "display": "stack",
    "access": "external",
    "description": "Unopinionated Go development environment based on Cloud9",
    "ports": [
        {
            "port": 80,
            "protocol": "http"
        },
        {
            "port": 8000,
            "protocol": "http"
        },
        {
            "port": 8080,
            "protocol": "http"
        }
    ],
    "repositories":  [
        {
            "name": "https://github.com/golang/example",
            "type": "git"
        }
    ],
    "developerEnvironment" : "cloud9go",
    "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"
    },
    "labels": {
		"key1": "value1",
		"key2": "value2"
    }
}

 

Notes:

  • Key versus short name versus ID – the key is useful as a short name for volumes and pod names.  UIDs in this case will get ugly.
  • Display – do we need this?
  • Access – should this be at the spec or stack level?
  • Ports – Multiple ports means multiple NodePorts or ingress rules
  • Repositories – a service can have multiple repositories. 
  • DeveloperEnvironment – doesn't make sense in this example, but should be a reference to a valid developer environment that was used to create this service image
  • Labels – ideally the labels would come from some existing vocabulary (think RDF/SKOS). This could be key/value pairs, or maybe just an array of URIs (e.g., http://mex.aksw.org/mex-algo#Java).

 

  • No labels