Add kompose.image-pull-secret and kompose.image-pull-policy (#1091)

* Add kompose.image-pull-secret

* Add kompose.image-pull-secret tests

* Add kompose.image-pull-policy

* Add kompose.image-pull-policy tests

* ignore .coverprofile

* Fix typo
This commit is contained in:
Kamil Kieliszczyk
2019-02-07 09:50:53 -05:00
committed by Charlie Drage
parent 40c1b8cf87
commit 66ac4aff4f
18 changed files with 387 additions and 7 deletions
@@ -0,0 +1,6 @@
tm-image-service:
image: premium/private-image
labels:
kompose.image-pull-secret: "sample-k8s-secret-name"
open-image-service:
image: nginx-alpine
@@ -0,0 +1,89 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "open-image-service",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "open-image-service"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "open-image-service"
}
},
"spec": {
"containers": [
{
"name": "open-image-service",
"image": "nginx-alpine",
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "tm-image-service",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "tm-image-service"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.image-pull-secret": "sample-k8s-secret-name",
"kompose.version": "%VERSION%"
}
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "tm-image-service"
}
},
"spec": {
"containers": [
{
"name": "tm-image-service",
"image": "premium/private-image",
"resources": {}
}
],
"restartPolicy": "Always",
"imagePullSecrets": [
{
"name": "sample-k8s-secret-name"
}
]
}
},
"strategy": {}
},
"status": {}
}
]
}