fix: Empty Rancher launch config.
This commit is contained in:
parent
bc0121808a
commit
5b896bb46c
1 changed files with 6 additions and 2 deletions
|
@ -388,8 +388,12 @@ func parseRancherData(environments []*rancher.Environment, services []*rancher.S
|
||||||
Containers: []string{},
|
Containers: []string{},
|
||||||
}
|
}
|
||||||
|
|
||||||
for key, value := range service.LaunchConfig.Labels {
|
if service.LaunchConfig == nil || service.LaunchConfig.Labels == nil {
|
||||||
rancherData.Labels[key] = value.(string)
|
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 {
|
for _, container := range containers {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue