forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
83 lines (71 loc) · 2.73 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package admission
import (
"k8s.io/apiserver/pkg/admission"
kauthorizer "k8s.io/apiserver/pkg/authorization/authorizer"
restclient "k8s.io/client-go/rest"
"k8s.io/kubernetes/pkg/quota"
"github.com/openshift/origin/pkg/client"
configapi "github.com/openshift/origin/pkg/cmd/server/api"
"github.com/openshift/origin/pkg/controller/shared"
imageapi "github.com/openshift/origin/pkg/image/api"
"github.com/openshift/origin/pkg/project/cache"
"github.com/openshift/origin/pkg/quota/controller/clusterquotamapping"
usercache "github.com/openshift/origin/pkg/user/cache"
)
// WantsOpenshiftClient should be implemented by admission plugins that need
// an Openshift client
type WantsOpenshiftClient interface {
SetOpenshiftClient(client.Interface)
admission.Validator
}
// WantsProjectCache should be implemented by admission plugins that need a
// project cache
type WantsProjectCache interface {
SetProjectCache(*cache.ProjectCache)
admission.Validator
}
// WantsQuotaRegistry should be implemented by admission plugins that need a quota registry
type WantsOriginQuotaRegistry interface {
SetOriginQuotaRegistry(quota.Registry)
admission.Validator
}
// WantsAuthorizer should be implemented by admission plugins that
// need access to the Authorizer interface
type WantsAuthorizer interface {
SetAuthorizer(kauthorizer.Authorizer)
admission.Validator
}
// WantsJenkinsPipelineConfig gives access to the JenkinsPipelineConfig. This is a historical oddity.
// It's likely that what we really wanted was this as an admission plugin config
type WantsJenkinsPipelineConfig interface {
SetJenkinsPipelineConfig(jenkinsConfig configapi.JenkinsPipelineConfig)
admission.Validator
}
// WantsRESTClientConfig gives access to a RESTClientConfig. It's useful for doing unusual things with transports.
type WantsRESTClientConfig interface {
SetRESTClientConfig(restclient.Config)
admission.Validator
}
// WantsInformers should be implemented by admission plugins that will select its own informer
type WantsInformers interface {
SetInformers(shared.InformerFactory)
admission.Validator
}
// WantsClusterQuotaMapper should be implemented by admission plugins that need to know how to map between
// cluster quota and namespaces
type WantsClusterQuotaMapper interface {
SetClusterQuotaMapper(clusterquotamapping.ClusterQuotaMapper)
admission.Validator
}
// WantsDefaultRegistryFunc should be implemented by admission plugins that need to know the default registry
// address.
type WantsDefaultRegistryFunc interface {
SetDefaultRegistryFunc(imageapi.DefaultRegistryFunc)
admission.Validator
}
// WantsGroupCache should be implemented by admission plugins that need a
// group cache.
type WantsGroupCache interface {
SetGroupCache(*usercache.GroupCache)
admission.Validator
}