Implement kubernetes & kubernetes-ro services

This commit is contained in:
Daniel Smith
2014-10-27 17:56:33 -07:00
parent 3045311398
commit 7146ec9d49
5 changed files with 232 additions and 6 deletions

View File

@@ -51,6 +51,12 @@ func (e *EndpointController) SyncServiceEndpoints() error {
}
var resultErr error
for _, service := range services.Items {
if service.Name == "kubernetes" || service.Name == "kubernetes-ro" {
// This is a temporary hack for supporting the master services
// until we actually start running apiserver in a pod.
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())
if err != nil {
glog.Errorf("Error syncing service: %#v, skipping.", service)