Rename controller pkg/registry/core/controller to pkg/registry/core/replicationcontroller

This commit is contained in:
Rene Saenz 2017-01-24 18:15:51 -06:00
parent 6dbad57bce
commit 1bf6c76928
11 changed files with 20 additions and 20 deletions

View File

@ -16,4 +16,4 @@ limitations under the License.
// Package controller provides Registry interface and it's RESTStorage
// implementation for storing ReplicationController api objects.
package controller // import "k8s.io/kubernetes/pkg/registry/core/controller"
package replicationcontroller // import "k8s.io/kubernetes/pkg/registry/core/replicationcontroller"

View File

@ -16,7 +16,7 @@ limitations under the License.
// If you make changes to this file, you should also make the corresponding change in ReplicaSet.
package controller
package replicationcontroller
import (
"fmt"

View File

@ -32,7 +32,7 @@ import (
"k8s.io/kubernetes/pkg/genericapiserver/registry/generic"
genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry"
"k8s.io/kubernetes/pkg/genericapiserver/registry/rest"
"k8s.io/kubernetes/pkg/registry/core/controller"
"k8s.io/kubernetes/pkg/registry/core/replicationcontroller"
)
// ControllerStorage includes dummy storage for Replication Controllers and for Scale subresource.
@ -44,7 +44,7 @@ type ControllerStorage struct {
func NewStorage(optsGetter generic.RESTOptionsGetter) ControllerStorage {
controllerREST, statusREST := NewREST(optsGetter)
controllerRegistry := controller.NewRegistry(controllerREST)
controllerRegistry := replicationcontroller.NewRegistry(controllerREST)
return ControllerStorage{
Controller: controllerREST,
@ -65,20 +65,20 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST) {
ObjectNameFunc: func(obj runtime.Object) (string, error) {
return obj.(*api.ReplicationController).Name, nil
},
PredicateFunc: controller.MatchController,
PredicateFunc: replicationcontroller.MatchController,
QualifiedResource: api.Resource("replicationcontrollers"),
CreateStrategy: controller.Strategy,
UpdateStrategy: controller.Strategy,
DeleteStrategy: controller.Strategy,
CreateStrategy: replicationcontroller.Strategy,
UpdateStrategy: replicationcontroller.Strategy,
DeleteStrategy: replicationcontroller.Strategy,
}
options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: controller.GetAttrs}
options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: replicationcontroller.GetAttrs}
if err := store.CompleteWithOptions(options); err != nil {
panic(err) // TODO: Propagate error up
}
statusStore := *store
statusStore.UpdateStrategy = controller.StatusStrategy
statusStore.UpdateStrategy = replicationcontroller.StatusStrategy
return &REST{store}, &StatusREST{store: &statusStore}
}
@ -103,7 +103,7 @@ func (r *StatusREST) Update(ctx genericapirequest.Context, name string, objInfo
}
type ScaleREST struct {
registry controller.Registry
registry replicationcontroller.Registry
}
// ScaleREST implements Patcher

View File

@ -16,7 +16,7 @@ limitations under the License.
// If you make changes to this file, you should also make the corresponding change in ReplicaSet.
package controller
package replicationcontroller
import (
"fmt"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package controller
package replicationcontroller
import (
"strings"

View File

@ -39,7 +39,6 @@ import (
"k8s.io/kubernetes/pkg/master/ports"
"k8s.io/kubernetes/pkg/registry/core/componentstatus"
configmapstore "k8s.io/kubernetes/pkg/registry/core/configmap/storage"
controllerstore "k8s.io/kubernetes/pkg/registry/core/controller/storage"
"k8s.io/kubernetes/pkg/registry/core/endpoint"
endpointsstore "k8s.io/kubernetes/pkg/registry/core/endpoint/storage"
eventstore "k8s.io/kubernetes/pkg/registry/core/event/storage"
@ -51,6 +50,7 @@ import (
podstore "k8s.io/kubernetes/pkg/registry/core/pod/storage"
podtemplatestore "k8s.io/kubernetes/pkg/registry/core/podtemplate/storage"
"k8s.io/kubernetes/pkg/registry/core/rangeallocation"
controllerstore "k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage"
resourcequotastore "k8s.io/kubernetes/pkg/registry/core/resourcequota/storage"
secretstore "k8s.io/kubernetes/pkg/registry/core/secret/storage"
"k8s.io/kubernetes/pkg/registry/core/service"

View File

@ -28,8 +28,8 @@ import (
extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation"
"k8s.io/kubernetes/pkg/genericapiserver/registry/generic"
"k8s.io/kubernetes/pkg/genericapiserver/registry/rest"
"k8s.io/kubernetes/pkg/registry/core/controller"
controllerstore "k8s.io/kubernetes/pkg/registry/core/controller/storage"
"k8s.io/kubernetes/pkg/registry/core/replicationcontroller"
controllerstore "k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage"
)
// Container includes dummy storage for RC pods and experimental storage for Scale.
@ -41,7 +41,7 @@ type ContainerStorage struct {
func NewStorage(optsGetter generic.RESTOptionsGetter) ContainerStorage {
// scale does not set status, only updates spec so we ignore the status
controllerREST, _ := controllerstore.NewREST(optsGetter)
rcRegistry := controller.NewRegistry(controllerREST)
rcRegistry := replicationcontroller.NewRegistry(controllerREST)
return ContainerStorage{
ReplicationController: &RcREST{},
@ -50,7 +50,7 @@ func NewStorage(optsGetter generic.RESTOptionsGetter) ContainerStorage {
}
type ScaleREST struct {
registry *controller.Registry
registry *replicationcontroller.Registry
}
// ScaleREST implements Patcher

View File

@ -756,8 +756,8 @@ k8s.io/kubernetes/pkg/registry/certificates/certificates,smarterclayton,1
k8s.io/kubernetes/pkg/registry/core/componentstatus,krousey,1
k8s.io/kubernetes/pkg/registry/core/configmap,janetkuo,1
k8s.io/kubernetes/pkg/registry/core/configmap/etcd,gmarek,1
k8s.io/kubernetes/pkg/registry/core/controller,freehan,1
k8s.io/kubernetes/pkg/registry/core/controller/etcd,fabioy,1
k8s.io/kubernetes/pkg/registry/core/replicationcontroller,freehan,1
k8s.io/kubernetes/pkg/registry/core/replicationcontroller/etcd,fabioy,1
k8s.io/kubernetes/pkg/registry/core/endpoint,bprashanth,1
k8s.io/kubernetes/pkg/registry/core/endpoint/etcd,mikedanese,1
k8s.io/kubernetes/pkg/registry/core/event,ixdy,1

1 name owner auto-assigned
756 k8s.io/kubernetes/pkg/registry/core/componentstatus krousey 1
757 k8s.io/kubernetes/pkg/registry/core/configmap janetkuo 1
758 k8s.io/kubernetes/pkg/registry/core/configmap/etcd gmarek 1
759 k8s.io/kubernetes/pkg/registry/core/controller k8s.io/kubernetes/pkg/registry/core/replicationcontroller freehan 1
760 k8s.io/kubernetes/pkg/registry/core/controller/etcd k8s.io/kubernetes/pkg/registry/core/replicationcontroller/etcd fabioy 1
761 k8s.io/kubernetes/pkg/registry/core/endpoint bprashanth 1
762 k8s.io/kubernetes/pkg/registry/core/endpoint/etcd mikedanese 1
763 k8s.io/kubernetes/pkg/registry/core/event ixdy 1