nulecule
nulecule copied to clipboard
'generateName' support for Kubernetes provider
Problem Statement
Some of the Nulecule applications in the nulecule-library, such as MariaDB and MongoDB, can only be used once within an application's (nested) graph, because the Pod and Service created by the Kubernetes provider carries a non-unique name (in their pod and service definitions).
Suggested Solution(s)
- Support the
generateNameproperty in the artifacts, such that amariadb-centos7-atomicappcan be pulled in more than once and pods and services are not called a duplicate "mariadb". - Substitute the included atomicapp's
namewith thenamethe parent gives the application in the graph, i.e.;
graph: [
{
"name": "myapp-mariadb",
"source": "docker://projectatomic/mariadb-centos7-atomicapp"
},
{
"name": "anotherapp-mariadb",
"source": "docker://projectatomic/mariadb-centos7-atomicapp"
}
]
- Recommend and document forking a Nulecule application like so, for example, which is then used here.