mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
refactor: generated
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
||||
"time"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/resource"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// Returns string version of ResourceName.
|
||||
@@ -81,7 +81,7 @@ func GetExistingContainerStatus(statuses []ContainerStatus, name string) Contain
|
||||
// of that, there are two cases when a pod can be considered available:
|
||||
// 1. minReadySeconds == 0, or
|
||||
// 2. LastTransitionTime (is set) + minReadySeconds < current time
|
||||
func IsPodAvailable(pod *Pod, minReadySeconds int32, now unversioned.Time) bool {
|
||||
func IsPodAvailable(pod *Pod, minReadySeconds int32, now metav1.Time) bool {
|
||||
if !IsPodReady(pod) {
|
||||
return false
|
||||
}
|
||||
@@ -144,7 +144,7 @@ func GetNodeCondition(status *NodeStatus, conditionType NodeConditionType) (int,
|
||||
// status has changed.
|
||||
// Returns true if pod condition has changed or has been added.
|
||||
func UpdatePodCondition(status *PodStatus, condition *PodCondition) bool {
|
||||
condition.LastTransitionTime = unversioned.Now()
|
||||
condition.LastTransitionTime = metav1.Now()
|
||||
// Try to find this pod condition.
|
||||
conditionIndex, oldCondition := GetPodCondition(status, condition.Type)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user