forked from LaconicNetwork/kompose
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user