File tree 18 files changed +143
-65
lines changed
authorization/registry/rolebindingrestriction
cmd/server/kubernetes/master
quota/registry/clusterresourcequota
staging/src/k8s.io/apiserver/pkg/registry 18 files changed +143
-65
lines changed Original file line number Diff line number Diff line change 8
8
"k8s.io/apimachinery/pkg/runtime"
9
9
"k8s.io/apimachinery/pkg/util/validation/field"
10
10
apirequest "k8s.io/apiserver/pkg/endpoints/request"
11
+ "k8s.io/apiserver/pkg/registry/rest"
11
12
"k8s.io/apiserver/pkg/storage"
12
13
"k8s.io/apiserver/pkg/storage/names"
13
14
kapi "k8s.io/kubernetes/pkg/api"
@@ -23,6 +24,10 @@ type strategy struct {
23
24
24
25
var Strategy = strategy {kapi .Scheme , names .SimpleNameGenerator }
25
26
27
+ func (strategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
28
+ return rest .Unsupported
29
+ }
30
+
26
31
func (strategy ) NamespaceScoped () bool {
27
32
return true
28
33
}
Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ func BuildControllerManagerServer(masterConfig configapi.MasterConfig) (*cmapp.C
318
318
cmserver .PodEvictionTimeout = metav1.Duration {Duration : podEvictionTimeout }
319
319
cmserver .VolumeConfiguration .EnableDynamicProvisioning = masterConfig .VolumeConfig .DynamicProvisioningEnabled
320
320
321
+ // IF YOU ADD ANYTHING TO THIS LIST, MAKE SURE THAT YOU UPDATE THEIR STRATEGIES TO PREVENT GC FINALIZERS
321
322
cmserver .GCIgnoredResources = append (cmserver .GCIgnoredResources ,
322
323
// explicitly disabled from GC for now - not enough value to track them
323
324
componentconfig.GroupResource {Group : "authorization.openshift.io" , Resource : "rolebindingrestrictions" },
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
"k8s.io/apimachinery/pkg/util/validation/field"
11
11
apirequest "k8s.io/apiserver/pkg/endpoints/request"
12
12
"k8s.io/apiserver/pkg/registry/generic"
13
+ "k8s.io/apiserver/pkg/registry/rest"
13
14
kstorage "k8s.io/apiserver/pkg/storage"
14
15
"k8s.io/apiserver/pkg/storage/names"
15
16
kapi "k8s.io/kubernetes/pkg/api"
@@ -28,6 +29,10 @@ type imageStrategy struct {
28
29
// Image objects via the REST API.
29
30
var Strategy = imageStrategy {kapi .Scheme , names .SimpleNameGenerator }
30
31
32
+ func (imageStrategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
33
+ return rest .Unsupported
34
+ }
35
+
31
36
// NamespaceScoped is false for images.
32
37
func (imageStrategy ) NamespaceScoped () bool {
33
38
return false
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ func NewStrategy(clientGetter oauthclient.Getter) strategy {
33
33
return strategy {ObjectTyper : kapi .Scheme , clientGetter : clientGetter }
34
34
}
35
35
36
+ func (strategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
37
+ return rest .Unsupported
38
+ }
39
+
36
40
func (strategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
37
41
38
42
// NamespaceScoped is false for OAuth objects
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ func NewStrategy(clientGetter oauthclient.Getter) strategy {
33
33
return strategy {ObjectTyper : kapi .Scheme , clientGetter : clientGetter }
34
34
}
35
35
36
+ func (strategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
37
+ return rest .Unsupported
38
+ }
39
+
36
40
func (strategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
37
41
38
42
// NamespaceScoped is false for OAuth objects
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
"k8s.io/apimachinery/pkg/runtime"
11
11
"k8s.io/apimachinery/pkg/util/validation/field"
12
12
apirequest "k8s.io/apiserver/pkg/endpoints/request"
13
+ "k8s.io/apiserver/pkg/registry/rest"
13
14
kstorage "k8s.io/apiserver/pkg/storage"
14
15
kapi "k8s.io/kubernetes/pkg/api"
15
16
)
@@ -23,6 +24,10 @@ type strategy struct {
23
24
// objects via the REST API.
24
25
var Strategy = strategy {kapi .Scheme }
25
26
27
+ func (strategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
28
+ return rest .Unsupported
29
+ }
30
+
26
31
func (strategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
27
32
28
33
// NamespaceScoped is false for OAuth objects
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
11
11
"k8s.io/apimachinery/pkg/runtime"
12
12
"k8s.io/apimachinery/pkg/util/validation/field"
13
13
apirequest "k8s.io/apiserver/pkg/endpoints/request"
14
+ "k8s.io/apiserver/pkg/registry/rest"
14
15
kstorage "k8s.io/apiserver/pkg/storage"
15
16
kapi "k8s.io/kubernetes/pkg/api"
16
17
@@ -29,6 +30,10 @@ func NewStrategy(clientGetter oauthclient.Getter) strategy {
29
30
return strategy {ObjectTyper : kapi .Scheme , clientGetter : clientGetter }
30
31
}
31
32
33
+ func (strategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
34
+ return rest .Unsupported
35
+ }
36
+
32
37
func (strategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {
33
38
auth := obj .(* oauthapi.OAuthClientAuthorization )
34
39
auth .Name = fmt .Sprintf ("%s:%s" , auth .UserName , auth .ClientName )
Original file line number Diff line number Diff line change 8
8
"k8s.io/apimachinery/pkg/runtime"
9
9
"k8s.io/apimachinery/pkg/util/validation/field"
10
10
apirequest "k8s.io/apiserver/pkg/endpoints/request"
11
+ "k8s.io/apiserver/pkg/registry/rest"
11
12
"k8s.io/apiserver/pkg/storage"
12
13
kapi "k8s.io/kubernetes/pkg/api"
13
14
@@ -21,6 +22,10 @@ type strategy struct {
21
22
22
23
var Strategy = strategy {kapi .Scheme }
23
24
25
+ func (strategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
26
+ return rest .Unsupported
27
+ }
28
+
24
29
func (strategy ) NamespaceScoped () bool {
25
30
return false
26
31
}
Original file line number Diff line number Diff line change 8
8
"k8s.io/apimachinery/pkg/runtime"
9
9
"k8s.io/apimachinery/pkg/util/validation/field"
10
10
apirequest "k8s.io/apiserver/pkg/endpoints/request"
11
+ "k8s.io/apiserver/pkg/registry/rest"
11
12
"k8s.io/apiserver/pkg/storage"
12
13
kapi "k8s.io/kubernetes/pkg/api"
13
14
@@ -24,6 +25,10 @@ type sdnStrategy struct {
24
25
// objects via the REST API.
25
26
var Strategy = sdnStrategy {kapi .Scheme }
26
27
28
+ func (sdnStrategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
29
+ return rest .Unsupported
30
+ }
31
+
27
32
func (sdnStrategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
28
33
29
34
// NamespaceScoped is false for sdns
Original file line number Diff line number Diff line change 8
8
"k8s.io/apimachinery/pkg/runtime"
9
9
"k8s.io/apimachinery/pkg/util/validation/field"
10
10
apirequest "k8s.io/apiserver/pkg/endpoints/request"
11
+ "k8s.io/apiserver/pkg/registry/rest"
11
12
"k8s.io/apiserver/pkg/storage"
12
13
kapi "k8s.io/kubernetes/pkg/api"
13
14
@@ -24,6 +25,10 @@ type enpStrategy struct {
24
25
// objects via the REST API.
25
26
var Strategy = enpStrategy {kapi .Scheme }
26
27
28
+ func (enpStrategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
29
+ return rest .Unsupported
30
+ }
31
+
27
32
func (enpStrategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
28
33
29
34
// NamespaceScoped is true for egress network policy
Original file line number Diff line number Diff line change 8
8
"k8s.io/apimachinery/pkg/runtime"
9
9
"k8s.io/apimachinery/pkg/util/validation/field"
10
10
apirequest "k8s.io/apiserver/pkg/endpoints/request"
11
+ "k8s.io/apiserver/pkg/registry/rest"
11
12
"k8s.io/apiserver/pkg/storage"
12
13
kapi "k8s.io/kubernetes/pkg/api"
13
14
@@ -24,6 +25,10 @@ type sdnStrategy struct {
24
25
// objects via the REST API.
25
26
var Strategy = sdnStrategy {kapi .Scheme }
26
27
28
+ func (sdnStrategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
29
+ return rest .Unsupported
30
+ }
31
+
27
32
func (sdnStrategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
28
33
29
34
// Canonicalize normalizes the object after validation.
Original file line number Diff line number Diff line change 8
8
"k8s.io/apimachinery/pkg/runtime"
9
9
"k8s.io/apimachinery/pkg/util/validation/field"
10
10
apirequest "k8s.io/apiserver/pkg/endpoints/request"
11
+ "k8s.io/apiserver/pkg/registry/rest"
11
12
"k8s.io/apiserver/pkg/storage"
12
13
kapi "k8s.io/kubernetes/pkg/api"
13
14
@@ -24,6 +25,10 @@ type sdnStrategy struct {
24
25
// objects via the REST API.
25
26
var Strategy = sdnStrategy {kapi .Scheme }
26
27
28
+ func (sdnStrategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
29
+ return rest .Unsupported
30
+ }
31
+
27
32
func (sdnStrategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
28
33
29
34
// Canonicalize normalizes the object after validation.
Original file line number Diff line number Diff line change 8
8
"k8s.io/apimachinery/pkg/runtime"
9
9
"k8s.io/apimachinery/pkg/util/validation/field"
10
10
apirequest "k8s.io/apiserver/pkg/endpoints/request"
11
+ "k8s.io/apiserver/pkg/registry/rest"
11
12
kstorage "k8s.io/apiserver/pkg/storage"
12
13
kapi "k8s.io/kubernetes/pkg/api"
13
14
@@ -24,6 +25,10 @@ type groupStrategy struct {
24
25
// objects via the REST API.
25
26
var Strategy = groupStrategy {kapi .Scheme }
26
27
28
+ func (groupStrategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
29
+ return rest .Unsupported
30
+ }
31
+
27
32
func (groupStrategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
28
33
29
34
// NamespaceScoped is false for groups
Original file line number Diff line number Diff line change 8
8
"k8s.io/apimachinery/pkg/runtime"
9
9
"k8s.io/apimachinery/pkg/util/validation/field"
10
10
apirequest "k8s.io/apiserver/pkg/endpoints/request"
11
+ "k8s.io/apiserver/pkg/registry/rest"
11
12
kstorage "k8s.io/apiserver/pkg/storage"
12
13
kapi "k8s.io/kubernetes/pkg/api"
13
14
@@ -24,6 +25,10 @@ type identityStrategy struct {
24
25
// objects via the REST API.
25
26
var Strategy = identityStrategy {kapi .Scheme }
26
27
28
+ func (identityStrategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
29
+ return rest .Unsupported
30
+ }
31
+
27
32
func (identityStrategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
28
33
29
34
// NamespaceScoped is false for users
Original file line number Diff line number Diff line change 8
8
"k8s.io/apimachinery/pkg/runtime"
9
9
"k8s.io/apimachinery/pkg/util/validation/field"
10
10
apirequest "k8s.io/apiserver/pkg/endpoints/request"
11
+ "k8s.io/apiserver/pkg/registry/rest"
11
12
kstorage "k8s.io/apiserver/pkg/storage"
12
13
kapi "k8s.io/kubernetes/pkg/api"
13
14
@@ -24,6 +25,10 @@ type userStrategy struct {
24
25
// objects via the REST API.
25
26
var Strategy = userStrategy {kapi .Scheme }
26
27
28
+ func (userStrategy ) DefaultGarbageCollectionPolicy () rest.GarbageCollectionPolicy {
29
+ return rest .Unsupported
30
+ }
31
+
27
32
func (userStrategy ) PrepareForUpdate (ctx apirequest.Context , obj , old runtime.Object ) {}
28
33
29
34
// NamespaceScoped is false for users
You can’t perform that action at this time.
0 commit comments