move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod

This commit is contained in:
Chao Xu
2017-04-17 10:56:40 -07:00
parent f96b187fcb
commit 4f9591b1de
126 changed files with 1472 additions and 981 deletions

View File

@@ -26,6 +26,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/kubernetes/pkg/api/v1"
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"
)
@@ -106,9 +107,9 @@ func calculateStatus(rc *v1.ReplicationController, filteredPods []*v1.Pod, manag
if templateLabel.Matches(labels.Set(pod.Labels)) {
fullyLabeledReplicasCount++
}
if v1.IsPodReady(pod) {
if podutil.IsPodReady(pod) {
readyReplicasCount++
if v1.IsPodAvailable(pod, rc.Spec.MinReadySeconds, metav1.Now()) {
if podutil.IsPodAvailable(pod, rc.Spec.MinReadySeconds, metav1.Now()) {
availableReplicasCount++
}
}