Merge pull request #252 from cdrage/label-docs

Add documentation on recent labels feature
This commit is contained in:
Tomas Kral 2016-10-30 17:56:55 +02:00 committed by GitHub
commit 80c1323448

View File

@ -278,3 +278,31 @@ WARN[0000] Unsupported key build - ignoring
WARN[0000] Unsupported key cap_add - ignoring WARN[0000] Unsupported key cap_add - ignoring
WARN[0000] Unsupported key dockerfile - ignoring WARN[0000] Unsupported key dockerfile - ignoring
``` ```
## Labels
`kompose` supports Kompose-specific labels within the `docker-compose.yml` file in order to explicitly imply a service type upon conversion.
The currently supported options are:
| Key | Value |
|----------------------|-------------------------------------|
| kompose.service.type | nodeport / clusterip / loadbalancer |
For example:
```yaml
---
version: "2"
services:
nginx:
image: nginx
dockerfile: foobar
build: ./foobar
cap_add:
- ALL
container_name: foobar
labels:
kompose.service.type: nodeport
```