Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
2eda19da
Commit
2eda19da
authored
Jul 19, 2017
by
Shiyang Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix NotFound errors do not line up with API endpoint's group version
parent
c75d3028
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
345 additions
and
259 deletions
+345
-259
etcd.go
federation/registry/cluster/etcd/etcd.go
+6
-6
storage.go
...ion/externaladmissionhookconfiguration/storage/storage.go
+3
-3
storage.go
...nregistration/initializerconfiguration/storage/storage.go
+3
-3
storage.go
pkg/registry/apps/controllerrevision/storage/storage.go
+6
-6
storage.go
pkg/registry/apps/statefulset/storage/storage.go
+6
-6
storage.go
...ry/autoscaling/horizontalpodautoscaler/storage/storage.go
+6
-6
storage.go
pkg/registry/batch/cronjob/storage/storage.go
+8
-9
storage.go
pkg/registry/batch/job/storage/storage.go
+6
-6
storage.go
pkg/registry/certificates/certificates/storage/storage.go
+6
-6
storage.go
pkg/registry/core/configmap/storage/storage.go
+6
-6
storage.go
pkg/registry/core/endpoint/storage/storage.go
+6
-6
storage.go
pkg/registry/core/event/storage/storage.go
+2
-2
storage.go
pkg/registry/core/limitrange/storage/storage.go
+6
-6
storage.go
pkg/registry/core/namespace/storage/storage.go
+6
-6
storage.go
pkg/registry/core/node/storage/storage.go
+6
-6
storage.go
pkg/registry/core/persistentvolume/storage/storage.go
+6
-6
storage.go
pkg/registry/core/persistentvolumeclaim/storage/storage.go
+6
-6
storage.go
pkg/registry/core/pod/storage/storage.go
+6
-6
storage.go
pkg/registry/core/podtemplate/storage/storage.go
+6
-6
storage.go
pkg/registry/core/replicationcontroller/storage/storage.go
+6
-6
storage.go
pkg/registry/core/resourcequota/storage/storage.go
+6
-6
storage.go
pkg/registry/core/secret/storage/storage.go
+6
-6
storage.go
pkg/registry/core/service/storage/storage.go
+6
-6
storage.go
pkg/registry/core/serviceaccount/storage/storage.go
+6
-6
storage.go
pkg/registry/extensions/daemonset/storage/storage.go
+6
-6
storage.go
pkg/registry/extensions/deployment/storage/storage.go
+6
-6
storage.go
pkg/registry/extensions/ingress/storage/storage.go
+6
-6
storage.go
pkg/registry/extensions/networkpolicy/storage/storage.go
+6
-6
storage.go
pkg/registry/extensions/podsecuritypolicy/storage/storage.go
+6
-6
storage.go
pkg/registry/extensions/replicaset/storage/storage.go
+6
-6
storage.go
pkg/registry/networking/networkpolicy/storage/storage.go
+6
-6
storage.go
pkg/registry/policy/poddisruptionbudget/storage/storage.go
+6
-6
storage.go
pkg/registry/rbac/clusterrole/storage/storage.go
+6
-6
storage.go
pkg/registry/rbac/clusterrolebinding/storage/storage.go
+6
-6
storage.go
pkg/registry/rbac/role/storage/storage.go
+6
-6
storage.go
pkg/registry/rbac/rolebinding/storage/storage.go
+6
-6
storage.go
pkg/registry/scheduling/priorityclass/storage/storage.go
+6
-6
storage.go
pkg/registry/settings/podpreset/storage/storage.go
+6
-6
storage.go
pkg/registry/storage/storageclass/storage/storage.go
+6
-6
etcd.go
...iextensions-apiserver/pkg/registry/customresource/etcd.go
+2
-2
etcd.go
...s-apiserver/pkg/registry/customresourcedefinition/etcd.go
+5
-5
store.go
...c/k8s.io/apiserver/pkg/registry/generic/registry/store.go
+0
-0
store_test.go
....io/apiserver/pkg/registry/generic/registry/store_test.go
+97
-10
etcd.go
...s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go
+5
-5
etcd.go
...s.io/sample-apiserver/pkg/registry/wardle/fischer/etcd.go
+5
-5
etcd.go
...s.io/sample-apiserver/pkg/registry/wardle/flunder/etcd.go
+5
-5
No files found.
federation/registry/cluster/etcd/etcd.go
View file @
2eda19da
...
@@ -48,12 +48,12 @@ func (r *StatusREST) Update(ctx genericapirequest.Context, name string, objInfo
...
@@ -48,12 +48,12 @@ func (r *StatusREST) Update(ctx genericapirequest.Context, name string, objInfo
// NewREST returns a RESTStorage object that will work against clusters.
// NewREST returns a RESTStorage object that will work against clusters.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
federation
.
Cluster
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
federation
.
Cluster
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
federation
.
ClusterList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
federation
.
ClusterList
{}
},
PredicateFunc
:
cluster
.
MatchCluster
,
PredicateFunc
:
cluster
.
MatchCluster
,
QualifiedResource
:
federation
.
Resource
(
"clusters"
),
Default
QualifiedResource
:
federation
.
Resource
(
"clusters"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"clusters"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"clusters"
),
CreateStrategy
:
cluster
.
Strategy
,
CreateStrategy
:
cluster
.
Strategy
,
UpdateStrategy
:
cluster
.
Strategy
,
UpdateStrategy
:
cluster
.
Strategy
,
...
...
pkg/registry/admissionregistration/externaladmissionhookconfiguration/storage/storage.go
View file @
2eda19da
...
@@ -40,9 +40,9 @@ func NewREST(optsGetter generic.RESTOptionsGetter) *REST {
...
@@ -40,9 +40,9 @@ func NewREST(optsGetter generic.RESTOptionsGetter) *REST {
ObjectNameFunc
:
func
(
obj
runtime
.
Object
)
(
string
,
error
)
{
ObjectNameFunc
:
func
(
obj
runtime
.
Object
)
(
string
,
error
)
{
return
obj
.
(
*
admissionregistration
.
ExternalAdmissionHookConfiguration
)
.
Name
,
nil
return
obj
.
(
*
admissionregistration
.
ExternalAdmissionHookConfiguration
)
.
Name
,
nil
},
},
PredicateFunc
:
externaladmissionhookconfiguration
.
MatchExternalAdmissionHookConfiguration
,
PredicateFunc
:
externaladmissionhookconfiguration
.
MatchExternalAdmissionHookConfiguration
,
QualifiedResource
:
admissionregistration
.
Resource
(
"externaladmissionhookconfigurations"
),
Default
QualifiedResource
:
admissionregistration
.
Resource
(
"externaladmissionhookconfigurations"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"externaladmissionhookconfigurations"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"externaladmissionhookconfigurations"
),
CreateStrategy
:
externaladmissionhookconfiguration
.
Strategy
,
CreateStrategy
:
externaladmissionhookconfiguration
.
Strategy
,
UpdateStrategy
:
externaladmissionhookconfiguration
.
Strategy
,
UpdateStrategy
:
externaladmissionhookconfiguration
.
Strategy
,
...
...
pkg/registry/admissionregistration/initializerconfiguration/storage/storage.go
View file @
2eda19da
...
@@ -40,9 +40,9 @@ func NewREST(optsGetter generic.RESTOptionsGetter) *REST {
...
@@ -40,9 +40,9 @@ func NewREST(optsGetter generic.RESTOptionsGetter) *REST {
ObjectNameFunc
:
func
(
obj
runtime
.
Object
)
(
string
,
error
)
{
ObjectNameFunc
:
func
(
obj
runtime
.
Object
)
(
string
,
error
)
{
return
obj
.
(
*
admissionregistration
.
InitializerConfiguration
)
.
Name
,
nil
return
obj
.
(
*
admissionregistration
.
InitializerConfiguration
)
.
Name
,
nil
},
},
PredicateFunc
:
initializerconfiguration
.
MatchInitializerConfiguration
,
PredicateFunc
:
initializerconfiguration
.
MatchInitializerConfiguration
,
QualifiedResource
:
admissionregistration
.
Resource
(
"initializerconfigurations"
),
Default
QualifiedResource
:
admissionregistration
.
Resource
(
"initializerconfigurations"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"initializerconfigurations"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"initializerconfigurations"
),
CreateStrategy
:
initializerconfiguration
.
Strategy
,
CreateStrategy
:
initializerconfiguration
.
Strategy
,
UpdateStrategy
:
initializerconfiguration
.
Strategy
,
UpdateStrategy
:
initializerconfiguration
.
Strategy
,
...
...
pkg/registry/apps/controllerrevision/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work with ControllerRevision objects.
// NewREST returns a RESTStorage object that will work with ControllerRevision objects.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
apps
.
ControllerRevision
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
apps
.
ControllerRevision
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
apps
.
ControllerRevisionList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
apps
.
ControllerRevisionList
{}
},
PredicateFunc
:
controllerrevision
.
MatchControllerRevision
,
PredicateFunc
:
controllerrevision
.
MatchControllerRevision
,
QualifiedResource
:
apps
.
Resource
(
"controllerrevisions"
),
Default
QualifiedResource
:
apps
.
Resource
(
"controllerrevisions"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"controllerrevisions"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"controllerrevisions"
),
CreateStrategy
:
controllerrevision
.
Strategy
,
CreateStrategy
:
controllerrevision
.
Strategy
,
UpdateStrategy
:
controllerrevision
.
Strategy
,
UpdateStrategy
:
controllerrevision
.
Strategy
,
...
...
pkg/registry/apps/statefulset/storage/storage.go
View file @
2eda19da
...
@@ -37,12 +37,12 @@ type REST struct {
...
@@ -37,12 +37,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against replication controllers.
// NewREST returns a RESTStorage object that will work against replication controllers.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
appsapi
.
StatefulSet
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
appsapi
.
StatefulSet
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
appsapi
.
StatefulSetList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
appsapi
.
StatefulSetList
{}
},
PredicateFunc
:
statefulset
.
MatchStatefulSet
,
PredicateFunc
:
statefulset
.
MatchStatefulSet
,
QualifiedResource
:
appsapi
.
Resource
(
"statefulsets"
),
Default
QualifiedResource
:
appsapi
.
Resource
(
"statefulsets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"statefulsets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"statefulsets"
),
CreateStrategy
:
statefulset
.
Strategy
,
CreateStrategy
:
statefulset
.
Strategy
,
UpdateStrategy
:
statefulset
.
Strategy
,
UpdateStrategy
:
statefulset
.
Strategy
,
...
...
pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage.go
View file @
2eda19da
...
@@ -36,12 +36,12 @@ type REST struct {
...
@@ -36,12 +36,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against horizontal pod autoscalers.
// NewREST returns a RESTStorage object that will work against horizontal pod autoscalers.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
autoscaling
.
HorizontalPodAutoscaler
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
autoscaling
.
HorizontalPodAutoscaler
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
autoscaling
.
HorizontalPodAutoscalerList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
autoscaling
.
HorizontalPodAutoscalerList
{}
},
PredicateFunc
:
horizontalpodautoscaler
.
MatchAutoscaler
,
PredicateFunc
:
horizontalpodautoscaler
.
MatchAutoscaler
,
QualifiedResource
:
autoscaling
.
Resource
(
"horizontalpodautoscalers"
),
Default
QualifiedResource
:
autoscaling
.
Resource
(
"horizontalpodautoscalers"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"horizontalpodautoscalers"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"horizontalpodautoscalers"
),
CreateStrategy
:
horizontalpodautoscaler
.
Strategy
,
CreateStrategy
:
horizontalpodautoscaler
.
Strategy
,
UpdateStrategy
:
horizontalpodautoscaler
.
Strategy
,
UpdateStrategy
:
horizontalpodautoscaler
.
Strategy
,
...
...
pkg/registry/batch/cronjob/storage/storage.go
View file @
2eda19da
...
@@ -37,15 +37,14 @@ type REST struct {
...
@@ -37,15 +37,14 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against CronJobs.
// NewREST returns a RESTStorage object that will work against CronJobs.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
batch
.
CronJob
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
batch
.
CronJob
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
batch
.
CronJobList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
batch
.
CronJobList
{}
},
QualifiedResource
:
batch
.
Resource
(
"cronjobs"
),
DefaultQualifiedResource
:
batch
.
Resource
(
"cronjobs"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"cronjobs"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"cronjobs"
),
CreateStrategy
:
cronjob
.
Strategy
,
CreateStrategy
:
cronjob
.
Strategy
,
UpdateStrategy
:
cronjob
.
Strategy
,
UpdateStrategy
:
cronjob
.
Strategy
,
DeleteStrategy
:
cronjob
.
Strategy
,
DeleteStrategy
:
cronjob
.
Strategy
,
}
}
options
:=
&
generic
.
StoreOptions
{
RESTOptions
:
optsGetter
}
options
:=
&
generic
.
StoreOptions
{
RESTOptions
:
optsGetter
}
if
err
:=
store
.
CompleteWithOptions
(
options
);
err
!=
nil
{
if
err
:=
store
.
CompleteWithOptions
(
options
);
err
!=
nil
{
...
...
pkg/registry/batch/job/storage/storage.go
View file @
2eda19da
...
@@ -52,12 +52,12 @@ type REST struct {
...
@@ -52,12 +52,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against Jobs.
// NewREST returns a RESTStorage object that will work against Jobs.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
batch
.
Job
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
batch
.
Job
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
batch
.
JobList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
batch
.
JobList
{}
},
PredicateFunc
:
job
.
MatchJob
,
PredicateFunc
:
job
.
MatchJob
,
QualifiedResource
:
batch
.
Resource
(
"jobs"
),
Default
QualifiedResource
:
batch
.
Resource
(
"jobs"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"jobs"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"jobs"
),
CreateStrategy
:
job
.
Strategy
,
CreateStrategy
:
job
.
Strategy
,
UpdateStrategy
:
job
.
Strategy
,
UpdateStrategy
:
job
.
Strategy
,
...
...
pkg/registry/certificates/certificates/storage/storage.go
View file @
2eda19da
...
@@ -36,12 +36,12 @@ type REST struct {
...
@@ -36,12 +36,12 @@ type REST struct {
// NewREST returns a registry which will store CertificateSigningRequest in the given helper
// NewREST returns a registry which will store CertificateSigningRequest in the given helper
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
,
*
ApprovalREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
,
*
ApprovalREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
certificates
.
CertificateSigningRequest
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
certificates
.
CertificateSigningRequest
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
certificates
.
CertificateSigningRequestList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
certificates
.
CertificateSigningRequestList
{}
},
PredicateFunc
:
csrregistry
.
Matcher
,
PredicateFunc
:
csrregistry
.
Matcher
,
QualifiedResource
:
certificates
.
Resource
(
"certificatesigningrequests"
),
Default
QualifiedResource
:
certificates
.
Resource
(
"certificatesigningrequests"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"certificatesigningrequests"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"certificatesigningrequests"
),
CreateStrategy
:
csrregistry
.
Strategy
,
CreateStrategy
:
csrregistry
.
Strategy
,
UpdateStrategy
:
csrregistry
.
Strategy
,
UpdateStrategy
:
csrregistry
.
Strategy
,
...
...
pkg/registry/core/configmap/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work with ConfigMap objects.
// NewREST returns a RESTStorage object that will work with ConfigMap objects.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ConfigMap
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ConfigMap
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ConfigMapList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ConfigMapList
{}
},
PredicateFunc
:
configmap
.
MatchConfigMap
,
PredicateFunc
:
configmap
.
MatchConfigMap
,
QualifiedResource
:
api
.
Resource
(
"configmaps"
),
Default
QualifiedResource
:
api
.
Resource
(
"configmaps"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"configmaps"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"configmaps"
),
CreateStrategy
:
configmap
.
Strategy
,
CreateStrategy
:
configmap
.
Strategy
,
UpdateStrategy
:
configmap
.
Strategy
,
UpdateStrategy
:
configmap
.
Strategy
,
...
...
pkg/registry/core/endpoint/storage/storage.go
View file @
2eda19da
...
@@ -33,12 +33,12 @@ type REST struct {
...
@@ -33,12 +33,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against endpoints.
// NewREST returns a RESTStorage object that will work against endpoints.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Endpoints
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Endpoints
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
EndpointsList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
EndpointsList
{}
},
PredicateFunc
:
endpoint
.
MatchEndpoints
,
PredicateFunc
:
endpoint
.
MatchEndpoints
,
QualifiedResource
:
api
.
Resource
(
"endpoints"
),
Default
QualifiedResource
:
api
.
Resource
(
"endpoints"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"endpoints"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"endpoints"
),
CreateStrategy
:
endpoint
.
Strategy
,
CreateStrategy
:
endpoint
.
Strategy
,
UpdateStrategy
:
endpoint
.
Strategy
,
UpdateStrategy
:
endpoint
.
Strategy
,
...
...
pkg/registry/core/event/storage/storage.go
View file @
2eda19da
...
@@ -50,8 +50,8 @@ func NewREST(optsGetter generic.RESTOptionsGetter, ttl uint64) *REST {
...
@@ -50,8 +50,8 @@ func NewREST(optsGetter generic.RESTOptionsGetter, ttl uint64) *REST {
TTLFunc
:
func
(
runtime
.
Object
,
uint64
,
bool
)
(
uint64
,
error
)
{
TTLFunc
:
func
(
runtime
.
Object
,
uint64
,
bool
)
(
uint64
,
error
)
{
return
ttl
,
nil
return
ttl
,
nil
},
},
QualifiedResource
:
resource
,
Default
QualifiedResource
:
resource
,
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
resource
.
Resource
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
resource
.
Resource
),
CreateStrategy
:
event
.
Strategy
,
CreateStrategy
:
event
.
Strategy
,
UpdateStrategy
:
event
.
Strategy
,
UpdateStrategy
:
event
.
Strategy
,
...
...
pkg/registry/core/limitrange/storage/storage.go
View file @
2eda19da
...
@@ -33,12 +33,12 @@ type REST struct {
...
@@ -33,12 +33,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against horizontal pod autoscalers.
// NewREST returns a RESTStorage object that will work against horizontal pod autoscalers.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
LimitRange
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
LimitRange
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
LimitRangeList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
LimitRangeList
{}
},
PredicateFunc
:
limitrange
.
MatchLimitRange
,
PredicateFunc
:
limitrange
.
MatchLimitRange
,
QualifiedResource
:
api
.
Resource
(
"limitranges"
),
Default
QualifiedResource
:
api
.
Resource
(
"limitranges"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"limitranges"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"limitranges"
),
CreateStrategy
:
limitrange
.
Strategy
,
CreateStrategy
:
limitrange
.
Strategy
,
UpdateStrategy
:
limitrange
.
Strategy
,
UpdateStrategy
:
limitrange
.
Strategy
,
...
...
pkg/registry/core/namespace/storage/storage.go
View file @
2eda19da
...
@@ -54,12 +54,12 @@ type FinalizeREST struct {
...
@@ -54,12 +54,12 @@ type FinalizeREST struct {
// NewREST returns a RESTStorage object that will work against namespaces.
// NewREST returns a RESTStorage object that will work against namespaces.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
,
*
FinalizeREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
,
*
FinalizeREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Namespace
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Namespace
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
NamespaceList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
NamespaceList
{}
},
PredicateFunc
:
namespace
.
MatchNamespace
,
PredicateFunc
:
namespace
.
MatchNamespace
,
QualifiedResource
:
api
.
Resource
(
"namespaces"
),
Default
QualifiedResource
:
api
.
Resource
(
"namespaces"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"namespaces"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"namespaces"
),
CreateStrategy
:
namespace
.
Strategy
,
CreateStrategy
:
namespace
.
Strategy
,
UpdateStrategy
:
namespace
.
Strategy
,
UpdateStrategy
:
namespace
.
Strategy
,
...
...
pkg/registry/core/node/storage/storage.go
View file @
2eda19da
...
@@ -73,12 +73,12 @@ func (r *StatusREST) Update(ctx genericapirequest.Context, name string, objInfo
...
@@ -73,12 +73,12 @@ func (r *StatusREST) Update(ctx genericapirequest.Context, name string, objInfo
// NewStorage returns a NodeStorage object that will work against nodes.
// NewStorage returns a NodeStorage object that will work against nodes.
func
NewStorage
(
optsGetter
generic
.
RESTOptionsGetter
,
kubeletClientConfig
client
.
KubeletClientConfig
,
proxyTransport
http
.
RoundTripper
)
(
*
NodeStorage
,
error
)
{
func
NewStorage
(
optsGetter
generic
.
RESTOptionsGetter
,
kubeletClientConfig
client
.
KubeletClientConfig
,
proxyTransport
http
.
RoundTripper
)
(
*
NodeStorage
,
error
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Node
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Node
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
NodeList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
NodeList
{}
},
PredicateFunc
:
node
.
MatchNode
,
PredicateFunc
:
node
.
MatchNode
,
QualifiedResource
:
api
.
Resource
(
"nodes"
),
Default
QualifiedResource
:
api
.
Resource
(
"nodes"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"nodes"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"nodes"
),
CreateStrategy
:
node
.
Strategy
,
CreateStrategy
:
node
.
Strategy
,
UpdateStrategy
:
node
.
Strategy
,
UpdateStrategy
:
node
.
Strategy
,
...
...
pkg/registry/core/persistentvolume/storage/storage.go
View file @
2eda19da
...
@@ -35,12 +35,12 @@ type REST struct {
...
@@ -35,12 +35,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against persistent volumes.
// NewREST returns a RESTStorage object that will work against persistent volumes.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PersistentVolume
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PersistentVolume
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PersistentVolumeList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PersistentVolumeList
{}
},
PredicateFunc
:
persistentvolume
.
MatchPersistentVolumes
,
PredicateFunc
:
persistentvolume
.
MatchPersistentVolumes
,
QualifiedResource
:
api
.
Resource
(
"persistentvolumes"
),
Default
QualifiedResource
:
api
.
Resource
(
"persistentvolumes"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"persistentvolumes"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"persistentvolumes"
),
CreateStrategy
:
persistentvolume
.
Strategy
,
CreateStrategy
:
persistentvolume
.
Strategy
,
UpdateStrategy
:
persistentvolume
.
Strategy
,
UpdateStrategy
:
persistentvolume
.
Strategy
,
...
...
pkg/registry/core/persistentvolumeclaim/storage/storage.go
View file @
2eda19da
...
@@ -35,12 +35,12 @@ type REST struct {
...
@@ -35,12 +35,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against persistent volume claims.
// NewREST returns a RESTStorage object that will work against persistent volume claims.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PersistentVolumeClaim
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PersistentVolumeClaim
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PersistentVolumeClaimList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PersistentVolumeClaimList
{}
},
PredicateFunc
:
persistentvolumeclaim
.
MatchPersistentVolumeClaim
,
PredicateFunc
:
persistentvolumeclaim
.
MatchPersistentVolumeClaim
,
QualifiedResource
:
api
.
Resource
(
"persistentvolumeclaims"
),
Default
QualifiedResource
:
api
.
Resource
(
"persistentvolumeclaims"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"persistentvolumeclaims"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"persistentvolumeclaims"
),
CreateStrategy
:
persistentvolumeclaim
.
Strategy
,
CreateStrategy
:
persistentvolumeclaim
.
Strategy
,
UpdateStrategy
:
persistentvolumeclaim
.
Strategy
,
UpdateStrategy
:
persistentvolumeclaim
.
Strategy
,
...
...
pkg/registry/core/pod/storage/storage.go
View file @
2eda19da
...
@@ -66,12 +66,12 @@ type REST struct {
...
@@ -66,12 +66,12 @@ type REST struct {
func
NewStorage
(
optsGetter
generic
.
RESTOptionsGetter
,
k
client
.
ConnectionInfoGetter
,
proxyTransport
http
.
RoundTripper
,
podDisruptionBudgetClient
policyclient
.
PodDisruptionBudgetsGetter
)
PodStorage
{
func
NewStorage
(
optsGetter
generic
.
RESTOptionsGetter
,
k
client
.
ConnectionInfoGetter
,
proxyTransport
http
.
RoundTripper
,
podDisruptionBudgetClient
policyclient
.
PodDisruptionBudgetsGetter
)
PodStorage
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Pod
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Pod
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PodList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PodList
{}
},
PredicateFunc
:
pod
.
MatchPod
,
PredicateFunc
:
pod
.
MatchPod
,
QualifiedResource
:
api
.
Resource
(
"pods"
),
Default
QualifiedResource
:
api
.
Resource
(
"pods"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"pods"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"pods"
),
CreateStrategy
:
pod
.
Strategy
,
CreateStrategy
:
pod
.
Strategy
,
UpdateStrategy
:
pod
.
Strategy
,
UpdateStrategy
:
pod
.
Strategy
,
...
...
pkg/registry/core/podtemplate/storage/storage.go
View file @
2eda19da
...
@@ -32,12 +32,12 @@ type REST struct {
...
@@ -32,12 +32,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against pod templates.
// NewREST returns a RESTStorage object that will work against pod templates.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PodTemplate
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PodTemplate
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PodTemplateList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
PodTemplateList
{}
},
PredicateFunc
:
podtemplate
.
MatchPodTemplate
,
PredicateFunc
:
podtemplate
.
MatchPodTemplate
,
QualifiedResource
:
api
.
Resource
(
"podtemplates"
),
Default
QualifiedResource
:
api
.
Resource
(
"podtemplates"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"podtemplates"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"podtemplates"
),
CreateStrategy
:
podtemplate
.
Strategy
,
CreateStrategy
:
podtemplate
.
Strategy
,
UpdateStrategy
:
podtemplate
.
Strategy
,
UpdateStrategy
:
podtemplate
.
Strategy
,
...
...
pkg/registry/core/replicationcontroller/storage/storage.go
View file @
2eda19da
...
@@ -61,12 +61,12 @@ type REST struct {
...
@@ -61,12 +61,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against replication controllers.
// NewREST returns a RESTStorage object that will work against replication controllers.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ReplicationController
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ReplicationController
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ReplicationControllerList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ReplicationControllerList
{}
},
PredicateFunc
:
replicationcontroller
.
MatchController
,
PredicateFunc
:
replicationcontroller
.
MatchController
,
QualifiedResource
:
api
.
Resource
(
"replicationcontrollers"
),
Default
QualifiedResource
:
api
.
Resource
(
"replicationcontrollers"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"replicationcontrollers"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"replicationcontrollers"
),
CreateStrategy
:
replicationcontroller
.
Strategy
,
CreateStrategy
:
replicationcontroller
.
Strategy
,
UpdateStrategy
:
replicationcontroller
.
Strategy
,
UpdateStrategy
:
replicationcontroller
.
Strategy
,
...
...
pkg/registry/core/resourcequota/storage/storage.go
View file @
2eda19da
...
@@ -35,12 +35,12 @@ type REST struct {
...
@@ -35,12 +35,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against resource quotas.
// NewREST returns a RESTStorage object that will work against resource quotas.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ResourceQuota
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ResourceQuota
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ResourceQuotaList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ResourceQuotaList
{}
},
PredicateFunc
:
resourcequota
.
MatchResourceQuota
,
PredicateFunc
:
resourcequota
.
MatchResourceQuota
,
QualifiedResource
:
api
.
Resource
(
"resourcequotas"
),
Default
QualifiedResource
:
api
.
Resource
(
"resourcequotas"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"resourcequotas"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"resourcequotas"
),
CreateStrategy
:
resourcequota
.
Strategy
,
CreateStrategy
:
resourcequota
.
Strategy
,
UpdateStrategy
:
resourcequota
.
Strategy
,
UpdateStrategy
:
resourcequota
.
Strategy
,
...
...
pkg/registry/core/secret/storage/storage.go
View file @
2eda19da
...
@@ -32,12 +32,12 @@ type REST struct {
...
@@ -32,12 +32,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against secrets.
// NewREST returns a RESTStorage object that will work against secrets.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Secret
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Secret
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
SecretList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
SecretList
{}
},
PredicateFunc
:
secret
.
Matcher
,
PredicateFunc
:
secret
.
Matcher
,
QualifiedResource
:
api
.
Resource
(
"secrets"
),
Default
QualifiedResource
:
api
.
Resource
(
"secrets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"secrets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"secrets"
),
CreateStrategy
:
secret
.
Strategy
,
CreateStrategy
:
secret
.
Strategy
,
UpdateStrategy
:
secret
.
Strategy
,
UpdateStrategy
:
secret
.
Strategy
,
...
...
pkg/registry/core/service/storage/storage.go
View file @
2eda19da
...
@@ -35,12 +35,12 @@ type REST struct {
...
@@ -35,12 +35,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against services.
// NewREST returns a RESTStorage object that will work against services.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Service
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
Service
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ServiceList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ServiceList
{}
},
PredicateFunc
:
service
.
MatchServices
,
PredicateFunc
:
service
.
MatchServices
,
QualifiedResource
:
api
.
Resource
(
"services"
),
Default
QualifiedResource
:
api
.
Resource
(
"services"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"services"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"services"
),
CreateStrategy
:
service
.
Strategy
,
CreateStrategy
:
service
.
Strategy
,
UpdateStrategy
:
service
.
Strategy
,
UpdateStrategy
:
service
.
Strategy
,
...
...
pkg/registry/core/serviceaccount/storage/storage.go
View file @
2eda19da
...
@@ -33,12 +33,12 @@ type REST struct {
...
@@ -33,12 +33,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against service accounts.
// NewREST returns a RESTStorage object that will work against service accounts.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ServiceAccount
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ServiceAccount
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ServiceAccountList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
api
.
ServiceAccountList
{}
},
PredicateFunc
:
serviceaccount
.
Matcher
,
PredicateFunc
:
serviceaccount
.
Matcher
,
QualifiedResource
:
api
.
Resource
(
"serviceaccounts"
),
Default
QualifiedResource
:
api
.
Resource
(
"serviceaccounts"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"serviceaccounts"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"serviceaccounts"
),
CreateStrategy
:
serviceaccount
.
Strategy
,
CreateStrategy
:
serviceaccount
.
Strategy
,
UpdateStrategy
:
serviceaccount
.
Strategy
,
UpdateStrategy
:
serviceaccount
.
Strategy
,
...
...
pkg/registry/extensions/daemonset/storage/storage.go
View file @
2eda19da
...
@@ -37,12 +37,12 @@ type REST struct {
...
@@ -37,12 +37,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against DaemonSets.
// NewREST returns a RESTStorage object that will work against DaemonSets.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
DaemonSet
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
DaemonSet
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
DaemonSetList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
DaemonSetList
{}
},
PredicateFunc
:
daemonset
.
MatchDaemonSet
,
PredicateFunc
:
daemonset
.
MatchDaemonSet
,
QualifiedResource
:
extensions
.
Resource
(
"daemonsets"
),
Default
QualifiedResource
:
extensions
.
Resource
(
"daemonsets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"daemonsets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"daemonsets"
),
CreateStrategy
:
daemonset
.
Strategy
,
CreateStrategy
:
daemonset
.
Strategy
,
UpdateStrategy
:
daemonset
.
Strategy
,
UpdateStrategy
:
daemonset
.
Strategy
,
...
...
pkg/registry/extensions/deployment/storage/storage.go
View file @
2eda19da
...
@@ -63,12 +63,12 @@ type REST struct {
...
@@ -63,12 +63,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against deployments.
// NewREST returns a RESTStorage object that will work against deployments.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
,
*
RollbackREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
,
*
RollbackREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
Deployment
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
Deployment
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
DeploymentList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
DeploymentList
{}
},
PredicateFunc
:
deployment
.
MatchDeployment
,
PredicateFunc
:
deployment
.
MatchDeployment
,
QualifiedResource
:
extensions
.
Resource
(
"deployments"
),
Default
QualifiedResource
:
extensions
.
Resource
(
"deployments"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"deployments"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"deployments"
),
CreateStrategy
:
deployment
.
Strategy
,
CreateStrategy
:
deployment
.
Strategy
,
UpdateStrategy
:
deployment
.
Strategy
,
UpdateStrategy
:
deployment
.
Strategy
,
...
...
pkg/registry/extensions/ingress/storage/storage.go
View file @
2eda19da
...
@@ -37,12 +37,12 @@ type REST struct {
...
@@ -37,12 +37,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against replication controllers.
// NewREST returns a RESTStorage object that will work against replication controllers.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
Ingress
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
Ingress
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
IngressList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
IngressList
{}
},
PredicateFunc
:
ingress
.
MatchIngress
,
PredicateFunc
:
ingress
.
MatchIngress
,
QualifiedResource
:
extensions
.
Resource
(
"ingresses"
),
Default
QualifiedResource
:
extensions
.
Resource
(
"ingresses"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"ingresses"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"ingresses"
),
CreateStrategy
:
ingress
.
Strategy
,
CreateStrategy
:
ingress
.
Strategy
,
UpdateStrategy
:
ingress
.
Strategy
,
UpdateStrategy
:
ingress
.
Strategy
,
...
...
pkg/registry/extensions/networkpolicy/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against network policies.
// NewREST returns a RESTStorage object that will work against network policies.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensionsapi
.
NetworkPolicy
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensionsapi
.
NetworkPolicy
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensionsapi
.
NetworkPolicyList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensionsapi
.
NetworkPolicyList
{}
},
PredicateFunc
:
networkpolicy
.
MatchNetworkPolicy
,
PredicateFunc
:
networkpolicy
.
MatchNetworkPolicy
,
QualifiedResource
:
extensionsapi
.
Resource
(
"networkpolicies"
),
Default
QualifiedResource
:
extensionsapi
.
Resource
(
"networkpolicies"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"networkpolicies"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"networkpolicies"
),
CreateStrategy
:
networkpolicy
.
Strategy
,
CreateStrategy
:
networkpolicy
.
Strategy
,
UpdateStrategy
:
networkpolicy
.
Strategy
,
UpdateStrategy
:
networkpolicy
.
Strategy
,
...
...
pkg/registry/extensions/podsecuritypolicy/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against PodSecurityPolicy objects.
// NewREST returns a RESTStorage object that will work against PodSecurityPolicy objects.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
PodSecurityPolicy
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
PodSecurityPolicy
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
PodSecurityPolicyList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
PodSecurityPolicyList
{}
},
PredicateFunc
:
podsecuritypolicy
.
MatchPodSecurityPolicy
,
PredicateFunc
:
podsecuritypolicy
.
MatchPodSecurityPolicy
,
QualifiedResource
:
extensions
.
Resource
(
"podsecuritypolicies"
),
Default
QualifiedResource
:
extensions
.
Resource
(
"podsecuritypolicies"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"podsecuritypolicies"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"podsecuritypolicies"
),
CreateStrategy
:
podsecuritypolicy
.
Strategy
,
CreateStrategy
:
podsecuritypolicy
.
Strategy
,
UpdateStrategy
:
podsecuritypolicy
.
Strategy
,
UpdateStrategy
:
podsecuritypolicy
.
Strategy
,
...
...
pkg/registry/extensions/replicaset/storage/storage.go
View file @
2eda19da
...
@@ -60,12 +60,12 @@ type REST struct {
...
@@ -60,12 +60,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against ReplicaSet.
// NewREST returns a RESTStorage object that will work against ReplicaSet.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
ReplicaSet
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
ReplicaSet
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
ReplicaSetList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
extensions
.
ReplicaSetList
{}
},
PredicateFunc
:
replicaset
.
MatchReplicaSet
,
PredicateFunc
:
replicaset
.
MatchReplicaSet
,
QualifiedResource
:
extensions
.
Resource
(
"replicasets"
),
Default
QualifiedResource
:
extensions
.
Resource
(
"replicasets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"replicasets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"replicasets"
),
CreateStrategy
:
replicaset
.
Strategy
,
CreateStrategy
:
replicaset
.
Strategy
,
UpdateStrategy
:
replicaset
.
Strategy
,
UpdateStrategy
:
replicaset
.
Strategy
,
...
...
pkg/registry/networking/networkpolicy/storage/storage.go
View file @
2eda19da
...
@@ -35,12 +35,12 @@ type REST struct {
...
@@ -35,12 +35,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against NetworkPolicies
// NewREST returns a RESTStorage object that will work against NetworkPolicies
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
networkingapi
.
NetworkPolicy
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
networkingapi
.
NetworkPolicy
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
networkingapi
.
NetworkPolicyList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
networkingapi
.
NetworkPolicyList
{}
},
PredicateFunc
:
networkpolicy
.
Matcher
,
PredicateFunc
:
networkpolicy
.
Matcher
,
QualifiedResource
:
networkingapi
.
Resource
(
"networkpolicies"
),
Default
QualifiedResource
:
networkingapi
.
Resource
(
"networkpolicies"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"networkpolicies"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"networkpolicies"
),
CreateStrategy
:
networkpolicy
.
Strategy
,
CreateStrategy
:
networkpolicy
.
Strategy
,
UpdateStrategy
:
networkpolicy
.
Strategy
,
UpdateStrategy
:
networkpolicy
.
Strategy
,
...
...
pkg/registry/policy/poddisruptionbudget/storage/storage.go
View file @
2eda19da
...
@@ -37,12 +37,12 @@ type REST struct {
...
@@ -37,12 +37,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against pod disruption budgets.
// NewREST returns a RESTStorage object that will work against pod disruption budgets.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
(
*
REST
,
*
StatusREST
)
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
policyapi
.
PodDisruptionBudget
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
policyapi
.
PodDisruptionBudget
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
policyapi
.
PodDisruptionBudgetList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
policyapi
.
PodDisruptionBudgetList
{}
},
PredicateFunc
:
poddisruptionbudget
.
MatchPodDisruptionBudget
,
PredicateFunc
:
poddisruptionbudget
.
MatchPodDisruptionBudget
,
QualifiedResource
:
policyapi
.
Resource
(
"poddisruptionbudgets"
),
Default
QualifiedResource
:
policyapi
.
Resource
(
"poddisruptionbudgets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"poddisruptionbudgets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"poddisruptionbudgets"
),
CreateStrategy
:
poddisruptionbudget
.
Strategy
,
CreateStrategy
:
poddisruptionbudget
.
Strategy
,
UpdateStrategy
:
poddisruptionbudget
.
Strategy
,
UpdateStrategy
:
poddisruptionbudget
.
Strategy
,
...
...
pkg/registry/rbac/clusterrole/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against ClusterRole objects.
// NewREST returns a RESTStorage object that will work against ClusterRole objects.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
ClusterRole
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
ClusterRole
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
ClusterRoleList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
ClusterRoleList
{}
},
PredicateFunc
:
clusterrole
.
Matcher
,
PredicateFunc
:
clusterrole
.
Matcher
,
QualifiedResource
:
rbac
.
Resource
(
"clusterroles"
),
Default
QualifiedResource
:
rbac
.
Resource
(
"clusterroles"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"clusterroles"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"clusterroles"
),
CreateStrategy
:
clusterrole
.
Strategy
,
CreateStrategy
:
clusterrole
.
Strategy
,
UpdateStrategy
:
clusterrole
.
Strategy
,
UpdateStrategy
:
clusterrole
.
Strategy
,
...
...
pkg/registry/rbac/clusterrolebinding/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against ClusterRoleBinding objects.
// NewREST returns a RESTStorage object that will work against ClusterRoleBinding objects.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
ClusterRoleBinding
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
ClusterRoleBinding
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
ClusterRoleBindingList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
ClusterRoleBindingList
{}
},
PredicateFunc
:
clusterrolebinding
.
Matcher
,
PredicateFunc
:
clusterrolebinding
.
Matcher
,
QualifiedResource
:
rbac
.
Resource
(
"clusterrolebindings"
),
Default
QualifiedResource
:
rbac
.
Resource
(
"clusterrolebindings"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"clusterrolebindings"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"clusterrolebindings"
),
CreateStrategy
:
clusterrolebinding
.
Strategy
,
CreateStrategy
:
clusterrolebinding
.
Strategy
,
UpdateStrategy
:
clusterrolebinding
.
Strategy
,
UpdateStrategy
:
clusterrolebinding
.
Strategy
,
...
...
pkg/registry/rbac/role/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against Role objects.
// NewREST returns a RESTStorage object that will work against Role objects.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
Role
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
Role
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
RoleList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
RoleList
{}
},
PredicateFunc
:
role
.
Matcher
,
PredicateFunc
:
role
.
Matcher
,
QualifiedResource
:
rbac
.
Resource
(
"roles"
),
Default
QualifiedResource
:
rbac
.
Resource
(
"roles"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"roles"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"roles"
),
CreateStrategy
:
role
.
Strategy
,
CreateStrategy
:
role
.
Strategy
,
UpdateStrategy
:
role
.
Strategy
,
UpdateStrategy
:
role
.
Strategy
,
...
...
pkg/registry/rbac/rolebinding/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against RoleBinding objects.
// NewREST returns a RESTStorage object that will work against RoleBinding objects.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
RoleBinding
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
RoleBinding
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
RoleBindingList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
rbac
.
RoleBindingList
{}
},
PredicateFunc
:
rolebinding
.
Matcher
,
PredicateFunc
:
rolebinding
.
Matcher
,
QualifiedResource
:
rbac
.
Resource
(
"rolebindings"
),
Default
QualifiedResource
:
rbac
.
Resource
(
"rolebindings"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"rolebindings"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"rolebindings"
),
CreateStrategy
:
rolebinding
.
Strategy
,
CreateStrategy
:
rolebinding
.
Strategy
,
UpdateStrategy
:
rolebinding
.
Strategy
,
UpdateStrategy
:
rolebinding
.
Strategy
,
...
...
pkg/registry/scheduling/priorityclass/storage/storage.go
View file @
2eda19da
...
@@ -35,12 +35,12 @@ type REST struct {
...
@@ -35,12 +35,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against priority classes.
// NewREST returns a RESTStorage object that will work against priority classes.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
schedulingapi
.
PriorityClass
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
schedulingapi
.
PriorityClass
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
schedulingapi
.
PriorityClassList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
schedulingapi
.
PriorityClassList
{}
},
PredicateFunc
:
priorityclass
.
Matcher
,
PredicateFunc
:
priorityclass
.
Matcher
,
QualifiedResource
:
schedulingapi
.
Resource
(
"priorityclasses"
),
Default
QualifiedResource
:
schedulingapi
.
Resource
(
"priorityclasses"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"priorityclasses"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"priorityclasses"
),
CreateStrategy
:
priorityclass
.
Strategy
,
CreateStrategy
:
priorityclass
.
Strategy
,
UpdateStrategy
:
priorityclass
.
Strategy
,
UpdateStrategy
:
priorityclass
.
Strategy
,
...
...
pkg/registry/settings/podpreset/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against replication controllers.
// NewREST returns a RESTStorage object that will work against replication controllers.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
settingsapi
.
PodPreset
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
settingsapi
.
PodPreset
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
settingsapi
.
PodPresetList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
settingsapi
.
PodPresetList
{}
},
PredicateFunc
:
podpreset
.
Matcher
,
PredicateFunc
:
podpreset
.
Matcher
,
QualifiedResource
:
settingsapi
.
Resource
(
"podpresets"
),
Default
QualifiedResource
:
settingsapi
.
Resource
(
"podpresets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"podpresets"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"podpresets"
),
CreateStrategy
:
podpreset
.
Strategy
,
CreateStrategy
:
podpreset
.
Strategy
,
UpdateStrategy
:
podpreset
.
Strategy
,
UpdateStrategy
:
podpreset
.
Strategy
,
...
...
pkg/registry/storage/storageclass/storage/storage.go
View file @
2eda19da
...
@@ -34,12 +34,12 @@ type REST struct {
...
@@ -34,12 +34,12 @@ type REST struct {
// NewREST returns a RESTStorage object that will work against persistent volumes.
// NewREST returns a RESTStorage object that will work against persistent volumes.
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
api
.
Scheme
,
Copier
:
api
.
Scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
storageapi
.
StorageClass
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
storageapi
.
StorageClass
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
storageapi
.
StorageClassList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
storageapi
.
StorageClassList
{}
},
PredicateFunc
:
storageclass
.
MatchStorageClasses
,
PredicateFunc
:
storageclass
.
MatchStorageClasses
,
QualifiedResource
:
storageapi
.
Resource
(
"storageclasses"
),
Default
QualifiedResource
:
storageapi
.
Resource
(
"storageclasses"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"storageclass"
),
WatchCacheSize
:
cachesize
.
GetWatchCacheSizeByResource
(
"storageclass"
),
CreateStrategy
:
storageclass
.
Strategy
,
CreateStrategy
:
storageclass
.
Strategy
,
UpdateStrategy
:
storageclass
.
Strategy
,
UpdateStrategy
:
storageclass
.
Strategy
,
...
...
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd.go
View file @
2eda19da
...
@@ -40,8 +40,8 @@ func NewREST(resource schema.GroupResource, listKind schema.GroupVersionKind, co
...
@@ -40,8 +40,8 @@ func NewREST(resource schema.GroupResource, listKind schema.GroupVersionKind, co
ret
.
SetGroupVersionKind
(
listKind
)
ret
.
SetGroupVersionKind
(
listKind
)
return
ret
return
ret
},
},
PredicateFunc
:
strategy
.
MatchCustomResourceDefinitionStorage
,
PredicateFunc
:
strategy
.
MatchCustomResourceDefinitionStorage
,
QualifiedResource
:
resource
,
Default
QualifiedResource
:
resource
,
CreateStrategy
:
strategy
,
CreateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
...
...
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go
View file @
2eda19da
...
@@ -41,11 +41,11 @@ func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) *REST
...
@@ -41,11 +41,11 @@ func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) *REST
strategy
:=
NewStrategy
(
scheme
)
strategy
:=
NewStrategy
(
scheme
)
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
scheme
,
Copier
:
scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
apiextensions
.
CustomResourceDefinition
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
apiextensions
.
CustomResourceDefinition
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
apiextensions
.
CustomResourceDefinitionList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
apiextensions
.
CustomResourceDefinitionList
{}
},
PredicateFunc
:
MatchCustomResourceDefinition
,
PredicateFunc
:
MatchCustomResourceDefinition
,
QualifiedResource
:
apiextensions
.
Resource
(
"customresourcedefinitions"
),
Default
QualifiedResource
:
apiextensions
.
Resource
(
"customresourcedefinitions"
),
CreateStrategy
:
strategy
,
CreateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
...
...
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go
View file @
2eda19da
This diff is collapsed.
Click to expand it.
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go
View file @
2eda19da
...
@@ -42,6 +42,7 @@ import (
...
@@ -42,6 +42,7 @@ import (
"k8s.io/apimachinery/pkg/watch"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/apiserver/pkg/apis/example"
"k8s.io/apiserver/pkg/apis/example"
examplev1
"k8s.io/apiserver/pkg/apis/example/v1"
examplev1
"k8s.io/apiserver/pkg/apis/example/v1"
"k8s.io/apiserver/pkg/endpoints/request"
genericapirequest
"k8s.io/apiserver/pkg/endpoints/request"
genericapirequest
"k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/apiserver/pkg/registry/generic"
"k8s.io/apiserver/pkg/registry/generic"
"k8s.io/apiserver/pkg/registry/rest"
"k8s.io/apiserver/pkg/registry/rest"
...
@@ -381,6 +382,13 @@ func isInitialized(obj metav1.Object) bool {
...
@@ -381,6 +382,13 @@ func isInitialized(obj metav1.Object) bool {
return
obj
.
GetInitializers
()
==
nil
return
obj
.
GetInitializers
()
==
nil
}
}
func
isQualifiedResource
(
err
error
,
kind
,
group
string
)
bool
{
if
err
.
(
errors
.
APIStatus
)
.
Status
()
.
Details
.
Kind
!=
kind
||
err
.
(
errors
.
APIStatus
)
.
Status
()
.
Details
.
Group
!=
group
{
return
false
}
return
true
}
func
TestStoreCreateInitialized
(
t
*
testing
.
T
)
{
func
TestStoreCreateInitialized
(
t
*
testing
.
T
)
{
podA
:=
&
example
.
Pod
{
podA
:=
&
example
.
Pod
{
ObjectMeta
:
metav1
.
ObjectMeta
{
ObjectMeta
:
metav1
.
ObjectMeta
{
...
@@ -1801,13 +1809,13 @@ func newTestGenericStoreRegistry(t *testing.T, scheme *runtime.Scheme, hasCacheE
...
@@ -1801,13 +1809,13 @@ func newTestGenericStoreRegistry(t *testing.T, scheme *runtime.Scheme, hasCacheE
}
}
return
destroyFunc
,
&
Store
{
return
destroyFunc
,
&
Store
{
Copier
:
scheme
,
Copier
:
scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
example
.
Pod
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
example
.
Pod
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
example
.
PodList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
example
.
PodList
{}
},
QualifiedResource
:
example
.
Resource
(
"pods"
),
Default
QualifiedResource
:
example
.
Resource
(
"pods"
),
CreateStrategy
:
strategy
,
CreateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
DeleteStrategy
:
strategy
,
DeleteStrategy
:
strategy
,
KeyRootFunc
:
func
(
ctx
genericapirequest
.
Context
)
string
{
KeyRootFunc
:
func
(
ctx
genericapirequest
.
Context
)
string
{
return
podPrefix
return
podPrefix
},
},
...
@@ -1842,7 +1850,7 @@ func TestFinalizeDelete(t *testing.T) {
...
@@ -1842,7 +1850,7 @@ func TestFinalizeDelete(t *testing.T) {
obj
:=
&
example
.
Pod
{
obj
:=
&
example
.
Pod
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
"foo"
,
UID
:
"random-uid"
},
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
"foo"
,
UID
:
"random-uid"
},
}
}
result
,
err
:=
s
.
finalizeDelete
(
obj
,
false
)
result
,
err
:=
s
.
finalizeDelete
(
genericapirequest
.
NewContext
(),
obj
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"unexpected err: %s"
,
err
)
t
.
Fatalf
(
"unexpected err: %s"
,
err
)
}
}
...
@@ -1852,8 +1860,8 @@ func TestFinalizeDelete(t *testing.T) {
...
@@ -1852,8 +1860,8 @@ func TestFinalizeDelete(t *testing.T) {
Status
:
metav1
.
StatusSuccess
,
Status
:
metav1
.
StatusSuccess
,
Details
:
&
metav1
.
StatusDetails
{
Details
:
&
metav1
.
StatusDetails
{
Name
:
"foo"
,
Name
:
"foo"
,
Group
:
s
.
QualifiedResource
.
Group
,
Group
:
s
.
Default
QualifiedResource
.
Group
,
Kind
:
s
.
QualifiedResource
.
Resource
,
Kind
:
s
.
Default
QualifiedResource
.
Resource
,
UID
:
"random-uid"
,
UID
:
"random-uid"
,
},
},
}
}
...
@@ -1861,3 +1869,82 @@ func TestFinalizeDelete(t *testing.T) {
...
@@ -1861,3 +1869,82 @@ func TestFinalizeDelete(t *testing.T) {
t
.
Errorf
(
"unexpected obj. expected %#v, got %#v"
,
expectedObj
,
returnedObj
)
t
.
Errorf
(
"unexpected obj. expected %#v, got %#v"
,
expectedObj
,
returnedObj
)
}
}
}
}
func
fakeRequestInfo
(
resource
,
apiGroup
string
)
*
request
.
RequestInfo
{
return
&
request
.
RequestInfo
{
IsResourceRequest
:
true
,
Path
:
"/api/v1/test"
,
Verb
:
"test"
,
APIPrefix
:
"api"
,
APIGroup
:
apiGroup
,
APIVersion
:
"v1"
,
Namespace
:
""
,
Resource
:
resource
,
Subresource
:
""
,
Name
:
""
,
Parts
:
[]
string
{
"test"
},
}
}
func
TestQualifiedResource
(
t
*
testing
.
T
)
{
podA
:=
&
example
.
Pod
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
"foo"
,
Namespace
:
"test"
},
Spec
:
example
.
PodSpec
{
NodeName
:
"machine"
},
}
qualifiedKind
:=
"pod"
qualifiedGroup
:=
"test"
testContext
:=
genericapirequest
.
WithNamespace
(
genericapirequest
.
NewContext
(),
"test"
)
testContext
=
genericapirequest
.
WithRequestInfo
(
testContext
,
fakeRequestInfo
(
qualifiedKind
,
qualifiedGroup
))
destroyFunc
,
registry
:=
NewTestGenericStoreRegistry
(
t
)
defer
destroyFunc
()
// update a non-exist object
_
,
_
,
err
:=
registry
.
Update
(
testContext
,
podA
.
Name
,
rest
.
DefaultUpdatedObjectInfo
(
podA
,
scheme
))
if
!
errors
.
IsNotFound
(
err
)
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
if
!
isQualifiedResource
(
err
,
qualifiedKind
,
qualifiedGroup
)
{
t
.
Fatalf
(
"Unexpected error: %#v"
,
err
)
}
// get a non-exist object
_
,
err
=
registry
.
Get
(
testContext
,
podA
.
Name
,
&
metav1
.
GetOptions
{})
if
!
errors
.
IsNotFound
(
err
)
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
if
!
isQualifiedResource
(
err
,
qualifiedKind
,
qualifiedGroup
)
{
t
.
Fatalf
(
"Unexpected error: %#v"
,
err
)
}
// delete a non-exist object
_
,
_
,
err
=
registry
.
Delete
(
testContext
,
podA
.
Name
,
nil
)
if
!
errors
.
IsNotFound
(
err
)
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
if
!
isQualifiedResource
(
err
,
qualifiedKind
,
qualifiedGroup
)
{
t
.
Fatalf
(
"Unexpected error: %#v"
,
err
)
}
// create a non-exist object
_
,
err
=
registry
.
Create
(
testContext
,
podA
,
false
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
// create a exist object will fail
_
,
err
=
registry
.
Create
(
testContext
,
podA
,
false
)
if
!
errors
.
IsAlreadyExists
(
err
)
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
if
!
isQualifiedResource
(
err
,
qualifiedKind
,
qualifiedGroup
)
{
t
.
Fatalf
(
"Unexpected error: %#v"
,
err
)
}
}
staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go
View file @
2eda19da
...
@@ -35,11 +35,11 @@ type REST struct {
...
@@ -35,11 +35,11 @@ type REST struct {
func
NewREST
(
scheme
*
runtime
.
Scheme
,
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
func
NewREST
(
scheme
*
runtime
.
Scheme
,
optsGetter
generic
.
RESTOptionsGetter
)
*
REST
{
strategy
:=
apiservice
.
NewStrategy
(
scheme
)
strategy
:=
apiservice
.
NewStrategy
(
scheme
)
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
scheme
,
Copier
:
scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
apiregistration
.
APIService
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
apiregistration
.
APIService
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
apiregistration
.
APIServiceList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
apiregistration
.
APIServiceList
{}
},
PredicateFunc
:
apiservice
.
MatchAPIService
,
PredicateFunc
:
apiservice
.
MatchAPIService
,
QualifiedResource
:
apiregistration
.
Resource
(
"apiservices"
),
Default
QualifiedResource
:
apiregistration
.
Resource
(
"apiservices"
),
CreateStrategy
:
strategy
,
CreateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
...
...
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer/etcd.go
View file @
2eda19da
...
@@ -29,11 +29,11 @@ func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) (*reg
...
@@ -29,11 +29,11 @@ func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) (*reg
strategy
:=
NewStrategy
(
scheme
)
strategy
:=
NewStrategy
(
scheme
)
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
scheme
,
Copier
:
scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
wardle
.
Fischer
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
wardle
.
Fischer
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
wardle
.
FischerList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
wardle
.
FischerList
{}
},
PredicateFunc
:
MatchFischer
,
PredicateFunc
:
MatchFischer
,
QualifiedResource
:
wardle
.
Resource
(
"fischers"
),
Default
QualifiedResource
:
wardle
.
Resource
(
"fischers"
),
CreateStrategy
:
strategy
,
CreateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
...
...
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder/etcd.go
View file @
2eda19da
...
@@ -29,11 +29,11 @@ func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) (*reg
...
@@ -29,11 +29,11 @@ func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) (*reg
strategy
:=
NewStrategy
(
scheme
)
strategy
:=
NewStrategy
(
scheme
)
store
:=
&
genericregistry
.
Store
{
store
:=
&
genericregistry
.
Store
{
Copier
:
scheme
,
Copier
:
scheme
,
NewFunc
:
func
()
runtime
.
Object
{
return
&
wardle
.
Flunder
{}
},
NewFunc
:
func
()
runtime
.
Object
{
return
&
wardle
.
Flunder
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
wardle
.
FlunderList
{}
},
NewListFunc
:
func
()
runtime
.
Object
{
return
&
wardle
.
FlunderList
{}
},
PredicateFunc
:
MatchFlunder
,
PredicateFunc
:
MatchFlunder
,
QualifiedResource
:
wardle
.
Resource
(
"flunders"
),
Default
QualifiedResource
:
wardle
.
Resource
(
"flunders"
),
CreateStrategy
:
strategy
,
CreateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
UpdateStrategy
:
strategy
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment