Make PortalIP alloc HA

* Add an allocator which saves state in etcd
* Perform PortalIP allocation check on startup and periodically afterwards

Also expose methods in master for downstream components to handle IP allocation
/ master registration themselves.
This commit is contained in:
Clayton Coleman
2015-05-03 18:44:05 -04:00
parent 0d16f43475
commit e200d5a317
31 changed files with 1475 additions and 811 deletions

View File

@@ -64,6 +64,7 @@ func init() {
&ComponentStatus{},
&ComponentStatusList{},
&SerializedReference{},
&RangeAllocation{},
)
// Legacy names are supported
api.Scheme.AddKnownTypeWithName("v1", "Minion", &Node{})
@@ -108,3 +109,4 @@ func (*PodProxyOptions) IsAnAPIObject() {}
func (*ComponentStatus) IsAnAPIObject() {}
func (*ComponentStatusList) IsAnAPIObject() {}
func (*SerializedReference) IsAnAPIObject() {}
func (*RangeAllocation) IsAnAPIObject() {}

View File

@@ -1780,3 +1780,12 @@ type SELinuxOptions struct {
// SELinux level label.
Level string `json:"level,omitempty" description:"the level label to apply to the container"`
}
// RangeAllocation is not a public type
type RangeAllocation struct {
TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#metadata"`
Range string `json:"range" description:"a range string that identifies the range represented by 'data'; required"`
Data []byte `json:"data" description:"a bit array containing all allocated addresses in the previous segment"`
}