refactor services to v1beta3

This commit is contained in:
markturansky
2014-10-30 09:29:11 -04:00
parent 5a649f2b93
commit bd7643c033
26 changed files with 466 additions and 340 deletions

View File

@@ -57,7 +57,7 @@ func (e *EndpointController) SyncServiceEndpoints() error {
continue
}
glog.Infof("About to update endpoints for service %v", service.Name)
pods, err := e.client.Pods(service.Namespace).List(labels.Set(service.Selector).AsSelector())
pods, err := e.client.Pods(service.Namespace).List(labels.Set(service.Spec.Selector).AsSelector())
if err != nil {
glog.Errorf("Error syncing service: %#v, skipping.", service)
resultErr = err
@@ -65,7 +65,7 @@ func (e *EndpointController) SyncServiceEndpoints() error {
}
endpoints := []string{}
for _, pod := range pods.Items {
port, err := findPort(&pod.DesiredState.Manifest, service.ContainerPort)
port, err := findPort(&pod.DesiredState.Manifest, service.Spec.ContainerPort)
if err != nil {
glog.Errorf("Failed to find port for service: %v, %v", service, err)
continue