CORD-2965 configmap support

Change-Id: I4c6bfe970dc7b466ac3d370e0e056bf0e67dfa1c
diff --git a/xos/synchronizer/pull_steps/pull_pods.py b/xos/synchronizer/pull_steps/pull_pods.py
index 8d5d544..519e587 100644
--- a/xos/synchronizer/pull_steps/pull_pods.py
+++ b/xos/synchronizer/pull_steps/pull_pods.py
@@ -227,8 +227,17 @@
                                                     backend_handle = self.obj_to_handle(pod),
                                                     xos_managed = False)
                 xos_pod.save()
+                xos_pods_by_name[k] = xos_pod
                 log.info("Created XOS POD %s" % xos_pod.name)
 
+            # Check to see if the ip address has changed. This can happen for pods that are managed by XOS. The IP
+            # isn't available immediately when XOS creates a pod, but shows up a bit later. So handle that case
+            # here.
+            xos_pod = xos_pods_by_name[k]
+            if (pod.status.pod_ip is not None) and (xos_pod.pod_ip != pod.status.pod_ip):
+                xos_pod.pod_ip = pod.status.pod_ip
+                xos_pod.save(update_fields = ["pod_ip"])
+
         # For each xos pod, see if there is no k8s pod. If that's the case, then the pud must have been deleted.
         for (k,xos_pod) in xos_pods_by_name.items():
             if (not k in k8s_pods_by_name):