kompose/script/test/fixtures/gitlab/output-k8s-template.json
Suraj Narwade ec5c4d8550 Adding save command to annotation
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
2017-08-14 12:22:33 +05:30

291 lines
6.7 KiB
JSON

{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "gitlab",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "gitlab"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"ports": [
{
"name": "30000",
"port": 30000,
"targetPort": 80
},
{
"name": "30001",
"port": 30001,
"targetPort": 443
},
{
"name": "30002",
"port": 30002,
"targetPort": 22
}
],
"selector": {
"io.kompose.service": "gitlab"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "postgresql",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "postgresql"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"ports": [
{
"name": "5432",
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"io.kompose.service": "postgresql"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "redis"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"ports": [
{
"name": "6379",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"io.kompose.service": "redis"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "gitlab",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "gitlab"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "gitlab"
}
},
"spec": {
"containers": [
{
"name": "gitlab",
"image": "swordphilic/gitlab",
"ports": [
{
"containerPort": 80
},
{
"containerPort": 443
},
{
"containerPort": 22
}
],
"env": [
{
"name": "DB_HOST",
"value": "postgresql"
},
{
"name": "DB_NAME",
"value": "gitlab"
},
{
"name": "DB_PASS",
"value": "gitlab"
},
{
"name": "DB_PORT",
"value": "5432"
},
{
"name": "DB_TYPE",
"value": "postgres"
},
{
"name": "DB_USER",
"value": "gitlab"
},
{
"name": "REDIS_HOST",
"value": "redis"
},
{
"name": "REDIS_PORT",
"value": "6379"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "postgresql",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "postgresql"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "postgresql"
}
},
"spec": {
"containers": [
{
"name": "postgresql",
"image": "swordphilic/postgresql",
"ports": [
{
"containerPort": 5432
}
],
"env": [
{
"name": "DB_NAME",
"value": "gitlab"
},
{
"name": "DB_PASS",
"value": "gitlab"
},
{
"name": "DB_USER",
"value": "gitlab"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "redis"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "redis"
}
},
"spec": {
"containers": [
{
"name": "redis",
"image": "swordphilic/redis",
"ports": [
{
"containerPort": 6379
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
}
]
}