kompose/script/test/fixtures/secrets/output-long-os.json
Chander G 356c64890c fix tests related to secrets (#1198)
1. fix the path used to read secret data
without this fix, the path to the compose file is added to the already
absolute path, hence readFile was unable to find the secrets file

2. fix the expected json format
mountPath includes the entire path including the name of the secret
2019-12-04 10:32:29 +08:00

134 lines
3.0 KiB
JSON

{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Secret",
"apiVersion": "v1",
"metadata": {
"name": "my_secret",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "my_secret"
}
},
"data": {
"my_secret": "Rm9yIHRoZSBXYXRjaCE="
},
"type": "Opaque"
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "redis"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": [
{
"type": "ConfigChange"
},
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"redis"
],
"from": {
"kind": "ImageStreamTag",
"name": "redis:latest"
}
}
}
],
"replicas": 1,
"test": false,
"selector": {
"io.kompose.service": "redis"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "redis"
}
},
"spec": {
"volumes": [
{
"name": "my_secret",
"secret": {
"secretName": "my_secret",
"items": [
{
"key": "my_secret",
"path": "redis_secret"
}
],
"defaultMode": 288
}
}
],
"containers": [
{
"name": "redis",
"image": " ",
"resources": {},
"volumeMounts": [
{
"name": "my_secret",
"mountPath": "/run/secrets/my_secret"
}
]
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "redis"
}
},
"spec": {
"tags": [
{
"name": "latest",
"annotations": null,
"from": {
"kind": "DockerImage",
"name": "redis:latest"
},
"generation": null,
"importPolicy": {}
}
]
},
"status": {
"dockerImageRepository": ""
}
}
]
}