fix: Empty Rancher launch config.
This commit is contained in:
parent
bc0121808a
commit
5b896bb46c
1 changed files with 6 additions and 2 deletions
|
@ -388,9 +388,13 @@ func parseRancherData(environments []*rancher.Environment, services []*rancher.S
|
|||
Containers: []string{},
|
||||
}
|
||||
|
||||
if service.LaunchConfig == nil || service.LaunchConfig.Labels == nil {
|
||||
log.Warnf("Rancher Service Labels are missing. Environment: %s, service: %s", environment.Name, service.Name)
|
||||
} else {
|
||||
for key, value := range service.LaunchConfig.Labels {
|
||||
rancherData.Labels[key] = value.(string)
|
||||
}
|
||||
}
|
||||
|
||||
for _, container := range containers {
|
||||
if container.Labels["io.rancher.stack_service.name"] == rancherData.Name && containerFilter(container) {
|
||||
|
|
Loading…
Add table
Reference in a new issue