Skip to content

Commit

Permalink
fix: Empty Rancher launch config.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed May 24, 2017
1 parent bc01218 commit 5b896bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions provider/rancher/rancher.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,12 @@ func parseRancherData(environments []*rancher.Environment, services []*rancher.S
Containers: []string{},
}

for key, value := range service.LaunchConfig.Labels {
rancherData.Labels[key] = value.(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 {
Expand Down

0 comments on commit 5b896bb

Please sign in to comment.