mirror of
https://github.com/zalando-incubator/kube-metrics-adapter.git
synced 2024-12-22 19:16:06 +00:00
fix nil pointer dereference
Signed-off-by: zlawrence <zak.lawrence@zalando.de>
This commit is contained in:
parent
070f9ab299
commit
680e0feea1
@ -331,7 +331,7 @@ func calculateMetrics(spec v1.ScalingScheduleSpec, defaultScalingWindow time.Dur
|
||||
}
|
||||
|
||||
// If no end time was provided, set it to equal the start time
|
||||
if (string(*schedule.EndDate)) == "" {
|
||||
if schedule.EndDate == nil || *schedule.EndDate == "" {
|
||||
scheduledEndTime = scheduledTime
|
||||
} else {
|
||||
scheduledEndTime, err = time.Parse(time.RFC3339, string(*schedule.EndDate))
|
||||
|
Loading…
x
Reference in New Issue
Block a user