forked from LaconicNetwork/kompose
This command will add `kompose command` used to generate artifacts as well as `kompose version`,
for ex,
```
metadata:
annotations:
kompose.cmd: kompose convert -f /home/snarwade --stdout
kompose.version: 1.0.0 (HEAD)
```
For functional test, Now each test has template like,
```
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
```
Because, for every machine these values will be different.
Updated functional test with new annotations
335 lines
7.6 KiB
JSON
335 lines
7.6 KiB
JSON
{
|
|
"kind": "List",
|
|
"apiVersion": "v1",
|
|
"metadata": {},
|
|
"items": [
|
|
{
|
|
"kind": "Service",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "etherpad",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "etherpad"
|
|
},
|
|
"annotations": {
|
|
"kompose.cmd": "%CMD%",
|
|
"kompose.version": "%VERSION%"
|
|
}
|
|
},
|
|
"spec": {
|
|
"ports": [
|
|
{
|
|
"name": "80",
|
|
"port": 80,
|
|
"targetPort": 9001
|
|
}
|
|
],
|
|
"selector": {
|
|
"io.kompose.service": "etherpad"
|
|
}
|
|
},
|
|
"status": {
|
|
"loadBalancer": {}
|
|
}
|
|
},
|
|
{
|
|
"kind": "Service",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "mariadb",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "mariadb"
|
|
},
|
|
"annotations": {
|
|
"kompose.cmd": "%CMD%",
|
|
"kompose.version": "%VERSION%"
|
|
}
|
|
},
|
|
"spec": {
|
|
"ports": [
|
|
{
|
|
"name": "3306",
|
|
"port": 3306,
|
|
"targetPort": 3306
|
|
}
|
|
],
|
|
"selector": {
|
|
"io.kompose.service": "mariadb"
|
|
}
|
|
},
|
|
"status": {
|
|
"loadBalancer": {}
|
|
}
|
|
},
|
|
{
|
|
"kind": "DeploymentConfig",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "etherpad",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "etherpad"
|
|
},
|
|
"annotations": {
|
|
"kompose.cmd": "%CMD%",
|
|
"kompose.version": "%VERSION%"
|
|
}
|
|
},
|
|
"spec": {
|
|
"strategy": {
|
|
"resources": {}
|
|
},
|
|
"triggers": [
|
|
{
|
|
"type": "ConfigChange"
|
|
},
|
|
{
|
|
"type": "ImageChange",
|
|
"imageChangeParams": {
|
|
"automatic": true,
|
|
"containerNames": [
|
|
"etherpad"
|
|
],
|
|
"from": {
|
|
"kind": "ImageStreamTag",
|
|
"name": "etherpad:latest"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"replicas": 1,
|
|
"test": false,
|
|
"selector": {
|
|
"io.kompose.service": "etherpad"
|
|
},
|
|
"template": {
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "etherpad"
|
|
}
|
|
},
|
|
"spec": {
|
|
"containers": [
|
|
{
|
|
"name": "etherpad",
|
|
"image": " ",
|
|
"ports": [
|
|
{
|
|
"containerPort": 9001
|
|
}
|
|
],
|
|
"env": [
|
|
{
|
|
"name": "DB_DBID",
|
|
"value": "etherpad"
|
|
},
|
|
{
|
|
"name": "DB_HOST",
|
|
"value": "mariadb"
|
|
},
|
|
{
|
|
"name": "DB_PASS",
|
|
"value": "etherpad"
|
|
},
|
|
{
|
|
"name": "DB_PORT",
|
|
"value": "3306"
|
|
},
|
|
{
|
|
"name": "DB_USER",
|
|
"value": "etherpad"
|
|
}
|
|
],
|
|
"resources": {}
|
|
}
|
|
],
|
|
"restartPolicy": "Always"
|
|
}
|
|
}
|
|
},
|
|
"status": {}
|
|
},
|
|
{
|
|
"kind": "ImageStream",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "etherpad",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "etherpad"
|
|
}
|
|
},
|
|
"spec": {
|
|
"tags": [
|
|
{
|
|
"name": "latest",
|
|
"annotations": null,
|
|
"from": {
|
|
"kind": "DockerImage",
|
|
"name": "centos/etherpad"
|
|
},
|
|
"generation": null,
|
|
"importPolicy": {}
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"dockerImageRepository": ""
|
|
}
|
|
},
|
|
{
|
|
"kind": "DeploymentConfig",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "mariadb",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "mariadb"
|
|
},
|
|
"annotations": {
|
|
"kompose.cmd": "%CMD%",
|
|
"kompose.version": "%VERSION%"
|
|
}
|
|
},
|
|
"spec": {
|
|
"strategy": {
|
|
"type": "Recreate",
|
|
"resources": {}
|
|
},
|
|
"triggers": [
|
|
{
|
|
"type": "ConfigChange"
|
|
},
|
|
{
|
|
"type": "ImageChange",
|
|
"imageChangeParams": {
|
|
"automatic": true,
|
|
"containerNames": [
|
|
"mariadb"
|
|
],
|
|
"from": {
|
|
"kind": "ImageStreamTag",
|
|
"name": "mariadb:latest"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"replicas": 1,
|
|
"test": false,
|
|
"selector": {
|
|
"io.kompose.service": "mariadb"
|
|
},
|
|
"template": {
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "mariadb"
|
|
}
|
|
},
|
|
"spec": {
|
|
"volumes": [
|
|
{
|
|
"name": "mariadb-claim0",
|
|
"persistentVolumeClaim": {
|
|
"claimName": "mariadb-claim0"
|
|
}
|
|
}
|
|
],
|
|
"containers": [
|
|
{
|
|
"name": "mariadb",
|
|
"image": " ",
|
|
"ports": [
|
|
{
|
|
"containerPort": 3306
|
|
}
|
|
],
|
|
"env": [
|
|
{
|
|
"name": "MYSQL_DATABASE",
|
|
"value": "etherpad"
|
|
},
|
|
{
|
|
"name": "MYSQL_PASSWORD",
|
|
"value": "etherpad"
|
|
},
|
|
{
|
|
"name": "MYSQL_ROOT_PASSWORD",
|
|
"value": "etherpad"
|
|
},
|
|
{
|
|
"name": "MYSQL_USER",
|
|
"value": "etherpad"
|
|
}
|
|
],
|
|
"resources": {},
|
|
"volumeMounts": [
|
|
{
|
|
"name": "mariadb-claim0",
|
|
"mountPath": "/var/lib/mysql"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"restartPolicy": "Always"
|
|
}
|
|
}
|
|
},
|
|
"status": {}
|
|
},
|
|
{
|
|
"kind": "ImageStream",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "mariadb",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "mariadb"
|
|
}
|
|
},
|
|
"spec": {
|
|
"tags": [
|
|
{
|
|
"name": "latest",
|
|
"annotations": null,
|
|
"from": {
|
|
"kind": "DockerImage",
|
|
"name": "centos/mariadb"
|
|
},
|
|
"generation": null,
|
|
"importPolicy": {}
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"dockerImageRepository": ""
|
|
}
|
|
},
|
|
{
|
|
"kind": "PersistentVolumeClaim",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "mariadb-claim0",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "mariadb-claim0"
|
|
}
|
|
},
|
|
"spec": {
|
|
"accessModes": [
|
|
"ReadWriteOnce"
|
|
],
|
|
"resources": {
|
|
"requests": {
|
|
"storage": "100Mi"
|
|
}
|
|
}
|
|
},
|
|
"status": {}
|
|
}
|
|
]
|
|
}
|