[FIX] Prevent segmentation fault with --no-lb and --verbose/trace (#775)
This commit is contained in:
parent
de5805640b
commit
2040a458b1
@ -100,8 +100,9 @@ func TransformPorts(ctx context.Context, runtime runtimes.Runtime, cluster *k3d.
|
||||
|
||||
}
|
||||
|
||||
// print generated loadbalancer config
|
||||
if l.Log().GetLevel() >= logrus.DebugLevel {
|
||||
// print generated loadbalancer config if exists
|
||||
// (avoid segmentation fault if loadbalancer is disabled)
|
||||
if l.Log().GetLevel() >= logrus.DebugLevel && cluster.ServerLoadBalancer != nil {
|
||||
yamlized, err := yaml.Marshal(cluster.ServerLoadBalancer.Config)
|
||||
if err != nil {
|
||||
l.Log().Errorf("error printing loadbalancer config: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user