WIP: Add election framework to master; publish services.

Needs tests still.



> On Oct 21, 2014, at 11:23 AM, Eric Tune <notifications@github.com> wrote:
> 
> In pkg/master/publish.go:
> 
> > +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > +See the License for the specific language governing permissions and
> > +limitations under the License.
> > +*/
> > +
> > +package master
> > +
> > +import (
> > +	"time"
> > +
> > +	"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
> > +
> > +	"github.com/golang/glog"
> > +)
> > +
> > +func (m *Master) serviceWriterLoop(stop chan struct{}) {
> Making apiserver master-elected will make it simpler to maintain coherent indexes for validation. I also don't have a picture of how you would to admission control (quota) in a stateless fashion.

I'm not positive, but admission control seems highly customizable such that I was almost assuming it would be its own plugin controller process.  Not sure admission control belongs in direct path of the apiserver.

> Also, what is going to allocate IP addresses for services? It seems like the apiserver does that, and it needs state for the next available address?

I commented on that issue, but I think allocation can be handled in etcd if necessary.

How many other allocation problems will we solve in the master?  Shouldn't those be external as well?  Why are endpoints an external controller but service ip allocation isn't?  Seems like we don't have a clear description of what should be part of a stateful master and what shouldn't - any maybe the apiserver bits should be split from that bucket of almost master controlled items.  I'm looking for us to draw some clearer boundaries here and explicitly delineate what makes a master, and it seems very important to be deliberate about that.

> …
> —
> Reply to this email directly or view it on GitHub.