- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ReplicaSetsBySizeNewer (0.67 sec)
-
pkg/controller/controller_utils.go
} // ReplicaSetsBySizeNewer sorts a list of ReplicaSet by size in descending order, using their creation timestamp or name as a tie breaker. // By using the creation timestamp, this sorts from new to old replica sets. type ReplicaSetsBySizeNewer []*apps.ReplicaSet func (o ReplicaSetsBySizeNewer) Len() int { return len(o) } func (o ReplicaSetsBySizeNewer) Swap(i, j int) { o[i], o[j] = o[j], o[i] }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 12 15:34:44 UTC 2024 - 47.6K bytes - Viewed (0) -
pkg/controller/deployment/sync.go
// when scaling down, we should scale down older replica sets first. var scalingOperation string switch { case deploymentReplicasToAdd > 0: sort.Sort(controller.ReplicaSetsBySizeNewer(allRSs)) scalingOperation = "up" case deploymentReplicasToAdd < 0: sort.Sort(controller.ReplicaSetsBySizeOlder(allRSs)) scalingOperation = "down" }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 05 23:39:52 UTC 2023 - 24.5K bytes - Viewed (0)