forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.go
124 lines (106 loc) · 4.71 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package admission
import (
"k8s.io/apiserver/pkg/admission"
kauthorizer "k8s.io/apiserver/pkg/authorization/authorizer"
restclient "k8s.io/client-go/rest"
kinternalinformers "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion"
"k8s.io/kubernetes/pkg/quota"
authorizationclient "github.com/openshift/origin/pkg/authorization/generated/internalclientset"
buildclient "github.com/openshift/origin/pkg/build/generated/internalclientset"
configapi "github.com/openshift/origin/pkg/cmd/server/api"
imageclient "github.com/openshift/origin/pkg/image/generated/internalclientset"
"github.com/openshift/origin/pkg/project/cache"
"github.com/openshift/origin/pkg/quota/controller/clusterquotamapping"
quotainformer "github.com/openshift/origin/pkg/quota/generated/informers/internalversion/quota/internalversion"
quotaclient "github.com/openshift/origin/pkg/quota/generated/internalclientset"
securityinformer "github.com/openshift/origin/pkg/security/generated/informers/internalversion"
templateclient "github.com/openshift/origin/pkg/template/generated/internalclientset"
userinformer "github.com/openshift/origin/pkg/user/generated/informers/internalversion"
userclient "github.com/openshift/origin/pkg/user/generated/internalclientset"
)
type WantsOpenshiftInternalAuthorizationClient interface {
SetOpenshiftInternalAuthorizationClient(authorizationclient.Interface)
admission.Validator
}
type WantsOpenshiftInternalBuildClient interface {
SetOpenshiftInternalBuildClient(buildclient.Interface)
admission.Validator
}
// WantsOpenshiftInternalQuotaClient should be implemented by admission plugins that need
// an Openshift internal quota client
type WantsOpenshiftInternalQuotaClient interface {
SetOpenshiftInternalQuotaClient(quotaclient.Interface)
admission.Validator
}
// WantsOpenshiftInternalUserClient should be implemented by admission plugins that need
// an Openshift internal user client
type WantsOpenshiftInternalUserClient interface {
SetOpenshiftInternalUserClient(userclient.Interface)
admission.Validator
}
// WantsOpenshiftInternalImageClient should be implemented by admission plugins that need
// an Openshift internal image client
type WantsOpenshiftInternalImageClient interface {
SetOpenshiftInternalImageClient(imageclient.Interface)
admission.Validator
}
// WantsOpenshiftInternalTemplateClient should be implemented by admission plugins that need
// an Openshift internal template client
type WantsOpenshiftInternalTemplateClient interface {
SetOpenshiftInternalTemplateClient(templateclient.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
}
// WantsInternalKubernetesInformers should be implemented by admission plugins that need the internal kubernetes
// informers.
type WantsInternalKubernetesInformers interface {
SetInternalKubernetesInformers(kinternalinformers.SharedInformerFactory)
admission.Validator
}
// WantsClusterQuota should be implemented by admission plugins that need to know how to map between
// cluster quota and namespaces and get access to the informer.
type WantsClusterQuota interface {
SetClusterQuota(clusterquotamapping.ClusterQuotaMapper, quotainformer.ClusterResourceQuotaInformer)
admission.Validator
}
type WantsSecurityInformer interface {
SetSecurityInformers(securityinformer.SharedInformerFactory)
admission.Validator
}
// WantsDefaultRegistryFunc should be implemented by admission plugins that need to know the default registry
// address.
type WantsDefaultRegistryFunc interface {
SetDefaultRegistryFunc(func() (string, bool))
admission.Validator
}
type WantsUserInformer interface {
SetUserInformer(userinformer.SharedInformerFactory)
admission.Validator
}