Skip to content

Commit 95cac05

Browse files
committed
adjust to new client
1 parent e825c5f commit 95cac05

File tree

23 files changed

+99
-98
lines changed

23 files changed

+99
-98
lines changed

hack/import-restrictions.json

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -47,60 +47,60 @@
4747
]
4848
},
4949

50+
5051
{
5152
"checkedPackages": [
52-
"github.com/openshift/origin/pkg/authorization/apis/authorization",
53-
"github.com/openshift/origin/pkg/authorization/apis/authorization/v1"
53+
"github.com/openshift/origin/pkg/apps/apis/apps",
54+
"github.com/openshift/origin/pkg/apps/apis/apps/v1"
5455
],
5556
"allowedImportPackageRoots": [
5657
"vendor/k8s.io/apimachinery",
57-
"vendor/github.com/gogo/protobuf",
58-
"github.com/openshift/origin/pkg/api/apihelpers"
58+
"vendor/k8s.io/api",
59+
"vendor/github.com/openshift/api"
5960
],
6061
"allowedImportPackages": [
61-
"vendor/k8s.io/api/core/v1",
6262
"vendor/k8s.io/kubernetes/pkg/api",
6363
"vendor/k8s.io/kubernetes/pkg/api/v1",
64-
"vendor/k8s.io/kubernetes/pkg/apis/rbac",
65-
"github.com/openshift/origin/pkg/authorization/apis/authorization/internal/serviceaccount"
64+
"vendor/k8s.io/kubernetes/pkg/apis/extensions",
65+
"github.com/openshift/origin/pkg/image/apis/image"
6666
]
6767
},
6868

6969
{
7070
"checkedPackages": [
71-
"github.com/openshift/origin/pkg/build/apis/build",
72-
"github.com/openshift/origin/pkg/build/apis/build/v1"
71+
"github.com/openshift/origin/pkg/authorization/apis/authorization",
72+
"github.com/openshift/origin/pkg/authorization/apis/authorization/v1"
7373
],
7474
"allowedImportPackageRoots": [
7575
"vendor/k8s.io/apimachinery",
76-
"vendor/github.com/gogo/protobuf",
76+
"vendor/k8s.io/api",
77+
"vendor/github.com/openshift/api",
7778
"github.com/openshift/origin/pkg/api/apihelpers"
7879
],
7980
"allowedImportPackages": [
80-
"vendor/k8s.io/api/core/v1",
8181
"vendor/k8s.io/kubernetes/pkg/api",
8282
"vendor/k8s.io/kubernetes/pkg/api/v1",
83-
"github.com/openshift/origin/pkg/image/apis/image",
84-
"vendor/github.com/golang/glog"
83+
"vendor/k8s.io/kubernetes/pkg/apis/rbac",
84+
"github.com/openshift/origin/pkg/authorization/apis/authorization/internal/serviceaccount"
8585
]
8686
},
8787

8888
{
8989
"checkedPackages": [
90-
"github.com/openshift/origin/pkg/apps/apis/apps",
91-
"github.com/openshift/origin/pkg/apps/apis/apps/v1"
90+
"github.com/openshift/origin/pkg/build/apis/build",
91+
"github.com/openshift/origin/pkg/build/apis/build/v1"
9292
],
9393
"allowedImportPackageRoots": [
9494
"vendor/k8s.io/apimachinery",
95-
"vendor/github.com/gogo/protobuf"
95+
"vendor/k8s.io/api",
96+
"vendor/github.com/openshift/api",
97+
"github.com/openshift/origin/pkg/api/apihelpers"
9698
],
9799
"allowedImportPackages": [
98-
"vendor/k8s.io/api/core/v1",
99-
"vendor/k8s.io/api/extensions/v1beta1",
100100
"vendor/k8s.io/kubernetes/pkg/api",
101101
"vendor/k8s.io/kubernetes/pkg/api/v1",
102-
"vendor/k8s.io/kubernetes/pkg/apis/extensions",
103-
"github.com/openshift/origin/pkg/image/apis/image"
102+
"github.com/openshift/origin/pkg/image/apis/image",
103+
"vendor/github.com/golang/glog"
104104
]
105105
},
106106

@@ -113,27 +113,41 @@
113113
],
114114
"allowedImportPackageRoots": [
115115
"vendor/k8s.io/apimachinery",
116-
"vendor/github.com/gogo/protobuf",
117116
"github.com/openshift/origin/pkg/image/apis/image/internal",
117+
"vendor/k8s.io/api",
118+
"vendor/github.com/openshift/api",
118119
"github.com/openshift/origin/pkg/api/apihelpers"
119120
],
120121
"allowedImportPackages": [
121-
"vendor/k8s.io/api/core/v1",
122122
"vendor/k8s.io/kubernetes/pkg/api",
123123
"vendor/k8s.io/kubernetes/pkg/api/v1",
124124
"vendor/github.com/golang/glog",
125125
"vendor/github.com/blang/semver"
126126
]
127127
},
128128

129+
{
130+
"checkedPackages": [
131+
"github.com/openshift/origin/pkg/network/apis/network",
132+
"github.com/openshift/origin/pkg/network/apis/network/v1"
133+
],
134+
"allowedImportPackageRoots": [
135+
"vendor/k8s.io/apimachinery",
136+
"vendor/k8s.io/api",
137+
"vendor/github.com/openshift/api"
138+
],
139+
"allowedImportPackages": []
140+
},
141+
129142
{
130143
"checkedPackages": [
131144
"github.com/openshift/origin/pkg/oauth/apis/oauth",
132145
"github.com/openshift/origin/pkg/oauth/apis/oauth/v1"
133146
],
134147
"allowedImportPackageRoots": [
135148
"vendor/k8s.io/apimachinery",
136-
"vendor/github.com/gogo/protobuf",
149+
"vendor/k8s.io/api",
150+
"vendor/github.com/openshift/api",
137151
"github.com/openshift/origin/pkg/api/apihelpers"
138152
],
139153
"allowedImportPackages": []
@@ -146,11 +160,11 @@
146160
],
147161
"allowedImportPackageRoots": [
148162
"vendor/k8s.io/apimachinery",
149-
"vendor/github.com/gogo/protobuf",
163+
"vendor/k8s.io/api",
164+
"vendor/github.com/openshift/api",
150165
"github.com/openshift/origin/pkg/api/apihelpers"
151166
],
152167
"allowedImportPackages": [
153-
"vendor/k8s.io/api/core/v1",
154168
"vendor/k8s.io/kubernetes/pkg/api"
155169
]
156170
},
@@ -162,10 +176,10 @@
162176
],
163177
"allowedImportPackageRoots": [
164178
"vendor/k8s.io/apimachinery",
165-
"vendor/github.com/gogo/protobuf"
179+
"vendor/k8s.io/api",
180+
"vendor/github.com/openshift/api"
166181
],
167182
"allowedImportPackages": [
168-
"vendor/k8s.io/api/core/v1",
169183
"vendor/k8s.io/kubernetes/pkg/api",
170184
"vendor/k8s.io/kubernetes/pkg/api/v1"
171185
]
@@ -178,11 +192,11 @@
178192
],
179193
"allowedImportPackageRoots": [
180194
"vendor/k8s.io/apimachinery",
181-
"vendor/github.com/gogo/protobuf",
195+
"vendor/k8s.io/api",
196+
"vendor/github.com/openshift/api",
182197
"github.com/openshift/origin/pkg/api/apihelpers"
183198
],
184199
"allowedImportPackages": [
185-
"vendor/k8s.io/api/core/v1",
186200
"vendor/k8s.io/kubernetes/pkg/api"
187201
]
188202
},
@@ -200,30 +214,17 @@
200214
]
201215
},
202216

203-
{
204-
"checkedPackages": [
205-
"github.com/openshift/origin/pkg/network/apis/network",
206-
"github.com/openshift/origin/pkg/network/apis/network/v1"
207-
],
208-
"allowedImportPackageRoots": [
209-
"vendor/k8s.io/apimachinery",
210-
"vendor/github.com/gogo/protobuf"
211-
],
212-
"allowedImportPackages": []
213-
},
214-
215217
{
216218
"checkedPackages": [
217219
"github.com/openshift/origin/pkg/template/apis/template",
218220
"github.com/openshift/origin/pkg/template/apis/template/v1"
219221
],
220222
"allowedImportPackageRoots": [
221223
"vendor/k8s.io/apimachinery",
222-
"vendor/github.com/gogo/protobuf",
223-
"github.com/openshift/origin/pkg/api/apihelpers"
224+
"vendor/k8s.io/api",
225+
"vendor/github.com/openshift/api"
224226
],
225227
"allowedImportPackages": [
226-
"vendor/k8s.io/api/core/v1",
227228
"vendor/k8s.io/kubernetes/pkg/api",
228229
"vendor/k8s.io/kubernetes/pkg/api/v1"
229230
]
@@ -236,11 +237,11 @@
236237
],
237238
"allowedImportPackageRoots": [
238239
"vendor/k8s.io/apimachinery",
239-
"vendor/github.com/gogo/protobuf",
240+
"vendor/k8s.io/api",
241+
"vendor/github.com/openshift/api",
240242
"github.com/openshift/origin/pkg/api/apihelpers"
241243
],
242244
"allowedImportPackages": [
243-
"vendor/k8s.io/api/core/v1",
244245
"vendor/k8s.io/kubernetes/pkg/api",
245246
"vendor/k8s.io/kubernetes/pkg/api/v1"
246247
]
@@ -267,8 +268,9 @@
267268
"vendor/k8s.io/client-go",
268269
"vendor/github.com/spf13/cobra",
269270
"vendor/golang.org",
271+
"vendor/github.com/openshift/api",
272+
"vendor/github.com/openshift/client-go",
270273
"github.com/openshift/origin/pkg/config/cmd",
271-
"github.com/openshift/origin/pkg/template/generated",
272274
"github.com/openshift/origin/pkg/template/servicebroker",
273275
"github.com/openshift/origin/pkg/util/rest"
274276
],
@@ -284,7 +286,6 @@
284286
"vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util",
285287
"github.com/openshift/origin/pkg/api",
286288
"github.com/openshift/origin/pkg/template/apis/template",
287-
"github.com/openshift/origin/pkg/template/apis/template/v1",
288289
"github.com/openshift/origin/pkg/template/apis/template/validation",
289290
"github.com/openshift/origin/pkg/route/apis/route"
290291
]

pkg/apps/client/v1/scale.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
66
kextensionsclient "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
77

8-
appstypedclient "github.com/openshift/origin/pkg/apps/generated/clientset/typed/apps/v1"
8+
appstypedclient "github.com/openshift/client-go/apps/clientset/versioned/typed/apps/v1"
99
)
1010

1111
type delegatingScaleInterface struct {

pkg/authorization/admission/restrictusers/restrictusers.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ import (
1515
kadmission "k8s.io/kubernetes/pkg/kubeapiserver/admission"
1616

1717
userapi "github.com/openshift/api/user/v1"
18-
authorizationclient "github.com/openshift/origin/pkg/authorization/generated/clientset"
19-
authorizationtypedclient "github.com/openshift/origin/pkg/authorization/generated/clientset/typed/authorization/v1"
18+
authorizationclient "github.com/openshift/client-go/authorization/clientset/versioned"
19+
authorizationtypedclient "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1"
20+
userclient "github.com/openshift/client-go/user/clientset/versioned"
21+
userinformer "github.com/openshift/client-go/user/informers/externalversions"
2022
oadmission "github.com/openshift/origin/pkg/cmd/server/admission"
2123
usercache "github.com/openshift/origin/pkg/user/cache"
22-
userclient "github.com/openshift/origin/pkg/user/generated/clientset"
23-
userinformer "github.com/openshift/origin/pkg/user/generated/informers/externalversions"
2424
)
2525

2626
func Register(plugins *admission.Plugins) {

pkg/authorization/admission/restrictusers/restrictusers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import (
1717

1818
authorizationapi "github.com/openshift/api/authorization/v1"
1919
userapi "github.com/openshift/api/user/v1"
20-
fakeauthorizationclient "github.com/openshift/origin/pkg/authorization/generated/clientset/fake"
20+
fakeauthorizationclient "github.com/openshift/client-go/authorization/clientset/versioned/fake"
21+
fakeuserclient "github.com/openshift/client-go/user/clientset/versioned/fake"
2122
oadmission "github.com/openshift/origin/pkg/cmd/server/admission"
22-
fakeuserclient "github.com/openshift/origin/pkg/user/generated/clientset/fake"
2323
)
2424

2525
func TestAdmission(t *testing.T) {

pkg/authorization/admission/restrictusers/subjectchecker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
authorizationapi "github.com/openshift/api/authorization/v1"
1313
userapi "github.com/openshift/api/user/v1"
14-
userclient "github.com/openshift/origin/pkg/user/generated/clientset/typed/user/v1"
14+
userclient "github.com/openshift/client-go/user/clientset/versioned/typed/user/v1"
1515
)
1616

1717
// SubjectChecker determines whether rolebindings on a subject (user, group, or

pkg/authorization/admission/restrictusers/subjectchecker_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
authorizationapi "github.com/openshift/api/authorization/v1"
1414
userapi "github.com/openshift/api/user/v1"
15-
fakeuserclient "github.com/openshift/origin/pkg/user/generated/clientset/fake"
15+
fakeuserclient "github.com/openshift/client-go/user/clientset/versioned/fake"
1616
)
1717

1818
func mustNewSubjectChecker(t *testing.T, spec *authorizationapi.RoleBindingRestrictionSpec) SubjectChecker {

pkg/build/admission/strategyrestrictions/admission.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import (
1515
kubeadmission "k8s.io/kubernetes/pkg/kubeapiserver/admission"
1616
rbacregistry "k8s.io/kubernetes/pkg/registry/rbac"
1717

18+
buildclient "github.com/openshift/client-go/build/clientset/versioned"
1819
authorizationapi "github.com/openshift/origin/pkg/authorization/apis/authorization"
1920
"github.com/openshift/origin/pkg/authorization/util"
2021
buildapi "github.com/openshift/origin/pkg/build/apis/build"
21-
buildclient "github.com/openshift/origin/pkg/build/generated/clientset"
2222
oadmission "github.com/openshift/origin/pkg/cmd/server/admission"
2323
"k8s.io/kubernetes/pkg/apis/authorization"
2424
)

pkg/build/admission/strategyrestrictions/admission_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
kubeadmission "k8s.io/kubernetes/pkg/kubeapiserver/admission"
1818

1919
buildapiv1 "github.com/openshift/api/build/v1"
20+
fakebuildclient "github.com/openshift/client-go/build/clientset/versioned/fake"
2021
buildapi "github.com/openshift/origin/pkg/build/apis/build"
21-
fakebuildclient "github.com/openshift/origin/pkg/build/generated/clientset/fake"
2222
oadmission "github.com/openshift/origin/pkg/cmd/server/admission"
2323

2424
_ "github.com/openshift/origin/pkg/build/apis/build/install"

pkg/cmd/server/admission/init.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import (
88
kubeapiserveradmission "k8s.io/kubernetes/pkg/kubeapiserver/admission"
99
"k8s.io/kubernetes/pkg/quota"
1010

11-
authorizationclient "github.com/openshift/origin/pkg/authorization/generated/clientset"
12-
buildclient "github.com/openshift/origin/pkg/build/generated/clientset"
11+
authorizationclient "github.com/openshift/client-go/authorization/clientset/versioned"
12+
buildclient "github.com/openshift/client-go/build/clientset/versioned"
13+
userclient "github.com/openshift/client-go/user/clientset/versioned"
14+
userinformer "github.com/openshift/client-go/user/informers/externalversions"
1315
configapi "github.com/openshift/origin/pkg/cmd/server/api"
1416
imageapi "github.com/openshift/origin/pkg/image/apis/image"
1517
imageclient "github.com/openshift/origin/pkg/image/generated/internalclientset"
@@ -19,8 +21,6 @@ import (
1921
quotaclient "github.com/openshift/origin/pkg/quota/generated/internalclientset"
2022
securityinformer "github.com/openshift/origin/pkg/security/generated/informers/internalversion"
2123
templateclient "github.com/openshift/origin/pkg/template/generated/internalclientset"
22-
userclient "github.com/openshift/origin/pkg/user/generated/clientset"
23-
userinformer "github.com/openshift/origin/pkg/user/generated/informers/externalversions"
2424
)
2525

2626
type PluginInitializer struct {

pkg/cmd/server/admission/types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ import (
77
kinternalinformers "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion"
88
"k8s.io/kubernetes/pkg/quota"
99

10-
authorizationclient "github.com/openshift/origin/pkg/authorization/generated/clientset"
11-
buildclient "github.com/openshift/origin/pkg/build/generated/clientset"
10+
authorizationclient "github.com/openshift/client-go/authorization/clientset/versioned"
11+
buildclient "github.com/openshift/client-go/build/clientset/versioned"
12+
userclient "github.com/openshift/client-go/user/clientset/versioned"
13+
userinformer "github.com/openshift/client-go/user/informers/externalversions"
1214
configapi "github.com/openshift/origin/pkg/cmd/server/api"
1315
imageclient "github.com/openshift/origin/pkg/image/generated/internalclientset"
1416
"github.com/openshift/origin/pkg/project/cache"
@@ -17,8 +19,6 @@ import (
1719
quotaclient "github.com/openshift/origin/pkg/quota/generated/internalclientset"
1820
securityinformer "github.com/openshift/origin/pkg/security/generated/informers/internalversion"
1921
templateclient "github.com/openshift/origin/pkg/template/generated/internalclientset"
20-
userclient "github.com/openshift/origin/pkg/user/generated/clientset"
21-
userinformer "github.com/openshift/origin/pkg/user/generated/informers/externalversions"
2222
)
2323

2424
type WantsOpenshiftInternalAuthorizationClient interface {

0 commit comments

Comments
 (0)