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
83 lines
1.7 KiB
JSON
83 lines
1.7 KiB
JSON
{
|
|
"kind": "List",
|
|
"apiVersion": "v1",
|
|
"metadata": {},
|
|
"items": [
|
|
{
|
|
"kind": "Service",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "foo",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "foo"
|
|
},
|
|
"annotations": {
|
|
"kompose.cmd": "%CMD%",
|
|
"kompose.version": "%VERSION%"
|
|
}
|
|
},
|
|
"spec": {
|
|
"ports": [
|
|
{
|
|
"name": "headless",
|
|
"port": 55555,
|
|
"targetPort": 0
|
|
}
|
|
],
|
|
"selector": {
|
|
"io.kompose.service": "foo"
|
|
},
|
|
"clusterIP": "None"
|
|
},
|
|
"status": {
|
|
"loadBalancer": {}
|
|
}
|
|
},
|
|
{
|
|
"kind": "Deployment",
|
|
"apiVersion": "extensions/v1beta1",
|
|
"metadata": {
|
|
"name": "foo",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "foo"
|
|
},
|
|
"annotations": {
|
|
"kompose.cmd": "%CMD%",
|
|
"kompose.version": "%VERSION%"
|
|
}
|
|
},
|
|
"spec": {
|
|
"replicas": 1,
|
|
"template": {
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "foo"
|
|
}
|
|
},
|
|
"spec": {
|
|
"containers": [
|
|
{
|
|
"name": "foo",
|
|
"image": "foo/bar:latest",
|
|
"env": [
|
|
{
|
|
"name": "FOO",
|
|
"value": "bar"
|
|
}
|
|
],
|
|
"resources": {}
|
|
}
|
|
],
|
|
"restartPolicy": "Always"
|
|
}
|
|
},
|
|
"strategy": {}
|
|
},
|
|
"status": {}
|
|
}
|
|
]
|
|
}
|