support for raw pod output

if a user specifies a docker-compose service
with restart value as "no" or "on-failure"
then normal pod will be created as against
to a controller and a pod.
This commit is contained in:
Suraj Deshmukh
2016-12-13 19:24:25 +05:30
parent 65e19e3105
commit 6ea5f72e40
12 changed files with 288 additions and 17 deletions
+24
View File
@@ -306,3 +306,27 @@ services:
labels:
kompose.service.type: nodeport
```
## Restart
If you want to create normal pods without controllers you can use `restart` construct of docker-compose to define that. Follow table below to see what heppens on the `restart` value.
| `docker-compose` `restart` | object created | Pod `restartPolicy` |
|----------------------------|-------------------|---------------------|
| `""` | controller object | `Always` |
| `always` | controller object | `Always` |
| `on-failure` | Pod | `OnFailure` |
| `no` | Pod | `Never` |
**Note**: controller object could be `deployment` or `replicationcontroller`, etc.
For e.g. `mariadb` service will become pod down here.
```yaml
version: "2"
services:
mariadb:
image: centos/mariadb
restart: "no"
```