Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #935 from hangyan/add-volume-label-doc
Browse files Browse the repository at this point in the history
Add doc for volume size label
  • Loading branch information
cdrage committed Feb 23, 2018
2 parents 170acd9 + f641582 commit ade2660
Showing 1 changed file with 31 additions and 11 deletions.
42 changes: 31 additions & 11 deletions docs/user-guide.md
Expand Up @@ -290,9 +290,23 @@ The chart structure is aimed at providing a skeleton for building your Helm char
## Labels
`kompose` supports Kompose-specific labels within the `docker-compose.yml` file in order to explicitly define a service's behavior upon conversion.
`kompose` supports Kompose-specific labels within the `docker-compose.yml` file to
explicitly define the generated resources' behavior upon conversion, like Service, PersistentVolumeClaim...

- kompose.service.type defines the type of service to be created.
The currently supported options are:

| Key | Value |
|----------------------|-------------------------------------|
| kompose.service.type | nodeport / clusterip / loadbalancer |
| kompose.service.expose | true / hostname |
| kompose.service.expose.tls-secret | secret name |
| kompose.volume.size | kubernetes supported volume size |

**Note**: `kompose.service.type` label should be defined with `ports` only, otherwise `kompose` will fail.



- `kompose.service.type` defines the type of service to be created.

For example:

Expand All @@ -310,10 +324,10 @@ services:
kompose.service.type: nodeport
```

- kompose.service.expose defines if the service needs to be made accessible from outside the cluster or not. If the value is set to "true", the provider sets the endpoint automatically, and for any other value, the value is set as the hostname. If multiple ports are defined in a service, the first one is chosen to be the exposed.
- `kompose.service.expose` defines if the service needs to be made accessible from outside the cluster or not. If the value is set to "true", the provider sets the endpoint automatically, and for any other value, the value is set as the hostname. If multiple ports are defined in a service, the first one is chosen to be the exposed.
- For the Kubernetes provider, an ingress resource is created and it is assumed that an ingress controller has already been configured.
- For the OpenShift provider, a route is created.
- kompose.service.expose.tls-secret provides the name of the TLS secret to use with the Kubernetes ingress controller. This requires kompose.service.expose to be set.
- `kompose.service.expose.tls-secret` provides the name of the TLS secret to use with the Kubernetes ingress controller. This requires kompose.service.expose to be set.

For example:

Expand All @@ -335,15 +349,21 @@ services:
- "6379"
```

The currently supported options are:
- `kompose.volume.size` defines the requests storage's size in the PersistentVolumeClaim
| Key | Value |
|----------------------|-------------------------------------|
| kompose.service.type | nodeport / clusterip / loadbalancer |
| kompose.service.expose | true / hostname |
| kompose.service.expose.tls-secret | secret name |
For example:
```yaml
version: '2'
services:
db:
image: postgres:10.1
labels:
kompose.volume.size: 1Gi
volumes:
- db-data:/var/lib/postgresql/data
```
**Note**: `kompose.service.type` label should be defined with `ports` only, otherwise `kompose` will fail.
## Restart
Expand Down

0 comments on commit ade2660

Please sign in to comment.