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
82 lines
2.0 KiB
JSON
82 lines
2.0 KiB
JSON
{
|
|
"kind": "List",
|
|
"apiVersion": "v1",
|
|
"metadata": {},
|
|
"items": [
|
|
{
|
|
"kind": "Service",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "client",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "client"
|
|
},
|
|
"annotations": {
|
|
"kompose.cmd": "kompose -f /home/snarwade/go/src/github.com/kubernetes/kompose/script/test/fixtures/tty-true/docker-compose.yml convert --stdout -j",
|
|
"kompose.version": "1.0.0 (HEAD)"
|
|
}
|
|
},
|
|
"spec": {
|
|
"ports": [
|
|
{
|
|
"name": "1337",
|
|
"port": 1337,
|
|
"targetPort": 1337
|
|
}
|
|
],
|
|
"selector": {
|
|
"io.kompose.service": "client"
|
|
}
|
|
},
|
|
"status": {
|
|
"loadBalancer": {}
|
|
}
|
|
},
|
|
{
|
|
"kind": "Deployment",
|
|
"apiVersion": "extensions/v1beta1",
|
|
"metadata": {
|
|
"name": "client",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "client"
|
|
},
|
|
"annotations": {
|
|
"kompose.cmd": "kompose -f /home/snarwade/go/src/github.com/kubernetes/kompose/script/test/fixtures/tty-true/docker-compose.yml convert --stdout -j",
|
|
"kompose.version": "1.0.0 (HEAD)"
|
|
}
|
|
},
|
|
"spec": {
|
|
"replicas": 1,
|
|
"template": {
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "client"
|
|
}
|
|
},
|
|
"spec": {
|
|
"containers": [
|
|
{
|
|
"name": "client",
|
|
"image": "registry.centos.org/centos/centos:7",
|
|
"ports": [
|
|
{
|
|
"containerPort": 1337
|
|
}
|
|
],
|
|
"resources": {},
|
|
"tty": true
|
|
}
|
|
],
|
|
"restartPolicy": "Always"
|
|
}
|
|
},
|
|
"strategy": {}
|
|
},
|
|
"status": {}
|
|
}
|
|
]
|
|
}
|