Skip to content

Commit

Permalink
add comment to dc algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
juanvallejo committed Oct 9, 2017
1 parent dcff611 commit e9cf687
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cmd/util/clientcmd/factory_object_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ func (f *ring1Factory) ApproximatePodTemplateForObject(object runtime.Object) (*
return fallback, err
}

// If we have any pods available, find the newest
// pod with regards to our most recent deployment.
// If the fallback PodTemplateSpec is nil, prefer
// the newest pod available.
for i := range pods.Items {
pod := &pods.Items[i]
if fallback == nil || pod.CreationTimestamp.Before(fallback.CreationTimestamp) {
Expand Down

0 comments on commit e9cf687

Please sign in to comment.