Reduce ACI API calls (#282)

* Reduce ACI API calls

Reduce reconcile calls and API calls in reconcile

* Fix the pod status update issue

* Revert a few unnecessary change
This commit is contained in:
Robbie Zhang
2018-07-31 13:31:00 -07:00
committed by GitHub
parent f9c7af5ec9
commit 3f83588e59
4 changed files with 66 additions and 52 deletions

View File

@@ -23,7 +23,7 @@ func TestResourceManager(t *testing.T) {
pod1Name := "Pod1"
pod1Namespace := "Pod1Namespace"
pod1 := makePod(pod1Namespace, pod1Name)
pm.AddPod(pod1)
pm.UpdatePod(pod1)
pods := pm.GetPods()
if len(pods) != 1 {
@@ -40,7 +40,7 @@ func TestResourceManagerDeletePod(t *testing.T) {
pod1Name := "Pod1"
pod1Namespace := "Pod1Namespace"
pod1 := makePod(pod1Namespace, pod1Name)
pm.AddPod(pod1)
pm.UpdatePod(pod1)
pods := pm.GetPods()
if len(pods) != 1 {
t.Errorf("Got %d, expected 1 pod", len(pods))
@@ -65,7 +65,7 @@ func TestResourceManagerUpdatePod(t *testing.T) {
pod1Name := "Pod1"
pod1Namespace := "Pod1Namespace"
pod1 := makePod(pod1Namespace, pod1Name)
pm.AddPod(pod1)
pm.UpdatePod(pod1)
pods := pm.GetPods()
if len(pods) != 1 {