Change:
/kind bug The lease reconciler creates the kubernetes endpoint with a prefix of kube-apiserver-endpoint, however that is not the prefix that the rest of kube uses. The end result is that the kubernetes service doesn't have an endpoint, and kubectl won't list the kubernetes endpoint. The lease reconciler also creates lease files with a really long lease time instead of the default 15 seconds.
/cc
cc xref
kube-apiserver-endpoint is used for the lease itself, from what I remember. I don't think that's an issue by itself.
Oh but it does look like the endpointRegistry for the lease reconciler is misconfigured to use that
i'll look into it
what is the name that should be used?
services/endpoints afaik -
Yeah, making that change locally fixed it for me
But I'm not seeing the masterleases/apiServerIPInfo data in etcd, or I'm issuing the wrong command to find it
I had that same problem. The lease timeout is set way high, but for some reason that resulted in the lease files being created for only a very short time. I'm not sure why. Playing with the ttl amount got the lease files to stay around....forever. I've got a PR I'm about to push to fix both issues.
FYI has a PR for this now
cc

Discussion:
DefaultEndpointReconcilerInterval = 10 * time.Second // DefaultEndpointReconcilerTTL is the default TTL timeout for the storage layer DefaultEndpointReconcilerTTL = 15 * time.Second <del> // DefaultStorageEndpoint is the default storage endpoint for the lease controller DefaultStorageEndpoint = "kube-apiserver-endpoint" </del> ) type ExtraConfig struct {

if err != nil { glog.Fatalf("Error creating storage factory: %v", err) } <del> endpointConfig, err := c.ExtraConfig.StorageFactory.NewConfig(kapi.Resource(DefaultStorageEndpoint)) </del> <ins> endpointConfig, err := c.ExtraConfig.StorageFactory.NewConfig(kapi.Resource("endpoints")) </ins> if err != nil { glog.Fatalf("Error getting storage config: %v", err) }

StorageConfig:           endpointConfig, Decorator:               generic.UndecoratedStorage, DeleteCollectionWorkers: 0, <del> ResourcePrefix:          c.ExtraConfig.StorageFactory.ResourcePrefix(kapi.Resource(DefaultStorageEndpoint)), </del> <ins> ResourcePrefix:          c.ExtraConfig.StorageFactory.ResourcePrefix(kapi.Resource("endpoints")), </ins> }) endpointRegistry := endpoint.NewRegistry(endpointsStorage) masterLeases := reconcilers.NewLeases(leaseStorage, "/masterleases/", ttl)

import ( "fmt" "net" <ins> "path" </ins> "sync" "time"

// UpdateLease resets the TTL on a master IP in storage func (s *storageLeases) UpdateLease(ip string) error { <del> return s.storage.GuaranteedUpdate(apirequest.NewDefaultContext(), s.baseKey+"/"+ip, &api.Endpoints{}, true, nil, func(input kruntime.Object, respMeta storage.ResponseMeta) (kruntime.Object, *uint64, error) { </del> <ins> key := path.Join(s.baseKey, ip) return s.storage.GuaranteedUpdate(apirequest.NewDefaultContext(), key, &api.Endpoints{}, true, nil, func(input kruntime.Object, respMeta storage.ResponseMeta) (kruntime.Object, *uint64, error) { </ins> // just make sure we've got the right IP set, and then refresh the TTL existing := input.(*api.Endpoints) existing.Subsets = []api.EndpointSubset{

}, } <del> leaseTime := uint64(s.leaseTime) </del> <ins> // leaseTime needs to be in seconds leaseTime := uint64(s.leaseTime / time.Second) </ins> // NB: GuaranteedUpdate does not perform the store operation unless // something changed between load and store (not including resource