跳到主要内容

53.fit

PR #1536

Add in resource fit as a predicate.  Manually set the available resources.


nodes, err := factory.Client.ListMinions()
if err != nil {
glog.Errorf("failed to obtain minion information, aborting")
return nil
}
algo := algorithm.NewGenericScheduler(
[]algorithm.FitPredicate{
// Fit is defined based on the absence of port conflicts.
algorithm.PodFitsPorts,
// Fit is determined by resource availability
algorithm.NewResourceFitPredicate(algorithm.StaticNodeInfo{nodes}),
},
// All nodes where things fit are equally likely (Random)
algorithm.EqualPriority,
&storeToPodLister{podCache}, r)

PR #1578

Extract the service controller from the apiserver.

PP #1594

Add an IPAllocator type

type ipAllocator struct {
subnet *net.IPNet
// TODO: This could be smarter, but for now a bitmap will suffice.
lock sync.Mutex // protects 'used'
used []byte // a bitmap of allocated IPs
}

PR #1569

Initial support to propagating the termination reasons and image failures


type ContainerStateRunning struct {
StartedAt time.Time `json:"startedAt,omitempty" yaml:"startedAt,omitempty"`
}

type ContainerStateTerminated struct {
ExitCode int `json:"exitCode" yaml:"exitCode"`
Signal int `json:"signal,omitempty" yaml:"signal,omitempty"`
Reason string `json:"reason,omitempty" yaml:"reason,omitempty"`
StartedAt time.Time `json:"startedAt,omitempty" yaml:"startedAt,omitempty"`
FinishedAt time.Time `json:"finishedAt,omitempty" yaml:"finishedAt,omitempty"`
}


func inspectContainer(client DockerInterface, dockerID, containerName string) (*api.ContainerStatus, error)

func GetDockerPodInfo(client DockerInterface, manifest api.ContainerManifest, podFullName, uuid string) (api.PodInfo, error)

PR #951

extend selector with EXISTS, new tests/some old tests use table-driven style

PR #1623

Rename JSONBase -> TypeMeta in preparation for v1beta3

PR #1622

Add new metadata to internal/v1beta(1|2) for v1beta3