implement expose service, add tests, fix #140

Implements a kompose specific docker compose label "kompose.service.expose" which can be used to expose the specified services externally. The accepted values are of type string.
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.

Unit tests, functional tests, glide updates and docs have also been added in this commit for the related feature.
This commit is contained in:
Shubham Minglani
2016-12-21 20:00:38 +05:30
parent 48e3ba88cd
commit 7e378cd546
174 changed files with 10380 additions and 32848 deletions
+2
View File
@@ -302,6 +302,8 @@ func (c *Compose) LoadFile(file string) kobject.KomposeObject {
switch key {
case "kompose.service.type":
serviceConfig.ServiceType = handleServiceType(value)
case "kompose.service.expose":
serviceConfig.ExposeService = strings.ToLower(value)
}
}