예제 #1
0
func NewStorage(s storage.Interface) ContainerStorage {
	rcRegistry := controller.NewRegistry(etcd.NewREST(s))

	return ContainerStorage{
		ReplicationController: &RcREST{},
		Scale: &ScaleREST{registry: &rcRegistry},
	}
}
예제 #2
0
파일: etcd.go 프로젝트: ipbabble/kubernetes
func NewStorage(opts generic.RESTOptions) ControllerStorage {
	controllerREST, statusREST := NewREST(opts)
	controllerRegistry := controller.NewRegistry(controllerREST)

	return ControllerStorage{
		Controller: controllerREST,
		Status:     statusREST,
		Scale:      &ScaleREST{registry: controllerRegistry},
	}
}
예제 #3
0
func NewStorage(s storage.Interface) ContainerStorage {
	// scale does not set status, only updates spec so we ignore the status
	controllerREST, _ := etcd.NewREST(s)
	rcRegistry := controller.NewRegistry(controllerREST)

	return ContainerStorage{
		ReplicationController: &RcREST{},
		Scale: &ScaleREST{registry: &rcRegistry},
	}
}