Support compose global deploy mode to daemonset

This commit is contained in:
xianlubird
2018-05-07 15:19:47 +08:00
parent 1a2928eb47
commit 84b419c7ef
7 changed files with 167 additions and 11 deletions
+6
View File
@@ -0,0 +1,6 @@
version: '3'
services:
worker:
image: dockersamples/examplevotingapp_worker
deploy:
mode: global
@@ -0,0 +1,45 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "worker",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "worker"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "worker"
}
},
"spec": {
"containers": [
{
"name": "worker",
"image": "dockersamples/examplevotingapp_worker",
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
}
]
}
@@ -0,0 +1,47 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "DaemonSet",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "worker",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "worker"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "worker"
}
},
"spec": {
"containers": [
{
"name": "worker",
"image": "dockersamples/examplevotingapp_worker",
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {
"currentNumberScheduled": 0,
"numberMisscheduled": 0,
"desiredNumberScheduled": 0
}
}
]
}