Browse code

switch policy types to map to pointers

deads2k authored on 2015/06/17 22:56:39
Showing 22 changed files
... ...
@@ -7,5 +7,5 @@ set -o pipefail
7 7
 #!/bin/bash
8 8
 for i in {1..500}
9 9
 do
10
-  openshift ex new-project projects-${i}
10
+  oc new-project projects-${i}
11 11
 done
12 12
\ No newline at end of file
... ...
@@ -35,13 +35,13 @@ func deepCopy_api_ClusterPolicy(in authorizationapi.ClusterPolicy, out *authoriz
35 35
 		out.LastModified = newVal.(util.Time)
36 36
 	}
37 37
 	if in.Roles != nil {
38
-		out.Roles = make(map[string]authorizationapi.ClusterRole)
38
+		out.Roles = make(map[string]*authorizationapi.ClusterRole)
39 39
 		for key, val := range in.Roles {
40
-			newVal := new(authorizationapi.ClusterRole)
41
-			if err := deepCopy_api_ClusterRole(val, newVal, c); err != nil {
40
+			if newVal, err := c.DeepCopy(val); err != nil {
42 41
 				return err
42
+			} else {
43
+				out.Roles[key] = newVal.(*authorizationapi.ClusterRole)
43 44
 			}
44
-			out.Roles[key] = *newVal
45 45
 		}
46 46
 	} else {
47 47
 		out.Roles = nil
... ...
@@ -71,13 +71,13 @@ func deepCopy_api_ClusterPolicyBinding(in authorizationapi.ClusterPolicyBinding,
71 71
 		out.PolicyRef = newVal.(api.ObjectReference)
72 72
 	}
73 73
 	if in.RoleBindings != nil {
74
-		out.RoleBindings = make(map[string]authorizationapi.ClusterRoleBinding)
74
+		out.RoleBindings = make(map[string]*authorizationapi.ClusterRoleBinding)
75 75
 		for key, val := range in.RoleBindings {
76
-			newVal := new(authorizationapi.ClusterRoleBinding)
77
-			if err := deepCopy_api_ClusterRoleBinding(val, newVal, c); err != nil {
76
+			if newVal, err := c.DeepCopy(val); err != nil {
78 77
 				return err
78
+			} else {
79
+				out.RoleBindings[key] = newVal.(*authorizationapi.ClusterRoleBinding)
79 80
 			}
80
-			out.RoleBindings[key] = *newVal
81 81
 		}
82 82
 	} else {
83 83
 		out.RoleBindings = nil
... ...
@@ -274,13 +274,13 @@ func deepCopy_api_Policy(in authorizationapi.Policy, out *authorizationapi.Polic
274 274
 		out.LastModified = newVal.(util.Time)
275 275
 	}
276 276
 	if in.Roles != nil {
277
-		out.Roles = make(map[string]authorizationapi.Role)
277
+		out.Roles = make(map[string]*authorizationapi.Role)
278 278
 		for key, val := range in.Roles {
279
-			newVal := new(authorizationapi.Role)
280
-			if err := deepCopy_api_Role(val, newVal, c); err != nil {
279
+			if newVal, err := c.DeepCopy(val); err != nil {
281 280
 				return err
281
+			} else {
282
+				out.Roles[key] = newVal.(*authorizationapi.Role)
282 283
 			}
283
-			out.Roles[key] = *newVal
284 284
 		}
285 285
 	} else {
286 286
 		out.Roles = nil
... ...
@@ -310,13 +310,13 @@ func deepCopy_api_PolicyBinding(in authorizationapi.PolicyBinding, out *authoriz
310 310
 		out.PolicyRef = newVal.(api.ObjectReference)
311 311
 	}
312 312
 	if in.RoleBindings != nil {
313
-		out.RoleBindings = make(map[string]authorizationapi.RoleBinding)
313
+		out.RoleBindings = make(map[string]*authorizationapi.RoleBinding)
314 314
 		for key, val := range in.RoleBindings {
315
-			newVal := new(authorizationapi.RoleBinding)
316
-			if err := deepCopy_api_RoleBinding(val, newVal, c); err != nil {
315
+			if newVal, err := c.DeepCopy(val); err != nil {
317 316
 				return err
317
+			} else {
318
+				out.RoleBindings[key] = newVal.(*authorizationapi.RoleBinding)
318 319
 			}
319
-			out.RoleBindings[key] = *newVal
320 320
 		}
321 321
 	} else {
322 322
 		out.RoleBindings = nil
... ...
@@ -31,10 +31,16 @@ func fuzzInternalObject(t *testing.T, forVersion string, item runtime.Object, se
31 31
 	f.Funcs(
32 32
 		// Roles and RoleBindings maps are never nil
33 33
 		func(j *authorizationapi.Policy, c fuzz.Continue) {
34
-			j.Roles = make(map[string]authorizationapi.Role)
34
+			j.Roles = make(map[string]*authorizationapi.Role)
35 35
 		},
36 36
 		func(j *authorizationapi.PolicyBinding, c fuzz.Continue) {
37
-			j.RoleBindings = make(map[string]authorizationapi.RoleBinding)
37
+			j.RoleBindings = make(map[string]*authorizationapi.RoleBinding)
38
+		},
39
+		func(j *authorizationapi.ClusterPolicy, c fuzz.Continue) {
40
+			j.Roles = make(map[string]*authorizationapi.ClusterRole)
41
+		},
42
+		func(j *authorizationapi.ClusterPolicyBinding, c fuzz.Continue) {
43
+			j.RoleBindings = make(map[string]*authorizationapi.ClusterRoleBinding)
38 44
 		},
39 45
 		func(j *template.Template, c fuzz.Continue) {
40 46
 			c.Fuzz(&j.ObjectMeta)
... ...
@@ -170,121 +170,6 @@ func convert_v1_TypeMeta_To_api_TypeMeta(in *v1.TypeMeta, out *api.TypeMeta, s c
170 170
 	return nil
171 171
 }
172 172
 
173
-func convert_api_ClusterPolicyBindingList_To_v1_ClusterPolicyBindingList(in *authorizationapi.ClusterPolicyBindingList, out *apiv1.ClusterPolicyBindingList, s conversion.Scope) error {
174
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
175
-		defaulting.(func(*authorizationapi.ClusterPolicyBindingList))(in)
176
-	}
177
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
178
-		return err
179
-	}
180
-	if err := convert_api_ListMeta_To_v1_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
181
-		return err
182
-	}
183
-	if in.Items != nil {
184
-		out.Items = make([]apiv1.ClusterPolicyBinding, len(in.Items))
185
-		for i := range in.Items {
186
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
187
-				return err
188
-			}
189
-		}
190
-	} else {
191
-		out.Items = nil
192
-	}
193
-	return nil
194
-}
195
-
196
-func convert_api_ClusterPolicyList_To_v1_ClusterPolicyList(in *authorizationapi.ClusterPolicyList, out *apiv1.ClusterPolicyList, s conversion.Scope) error {
197
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
198
-		defaulting.(func(*authorizationapi.ClusterPolicyList))(in)
199
-	}
200
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
201
-		return err
202
-	}
203
-	if err := convert_api_ListMeta_To_v1_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
204
-		return err
205
-	}
206
-	if in.Items != nil {
207
-		out.Items = make([]apiv1.ClusterPolicy, len(in.Items))
208
-		for i := range in.Items {
209
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
210
-				return err
211
-			}
212
-		}
213
-	} else {
214
-		out.Items = nil
215
-	}
216
-	return nil
217
-}
218
-
219
-func convert_api_ClusterRole_To_v1_ClusterRole(in *authorizationapi.ClusterRole, out *apiv1.ClusterRole, s conversion.Scope) error {
220
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
221
-		defaulting.(func(*authorizationapi.ClusterRole))(in)
222
-	}
223
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
224
-		return err
225
-	}
226
-	if err := convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
227
-		return err
228
-	}
229
-	if in.Rules != nil {
230
-		out.Rules = make([]apiv1.PolicyRule, len(in.Rules))
231
-		for i := range in.Rules {
232
-			if err := s.Convert(&in.Rules[i], &out.Rules[i], 0); err != nil {
233
-				return err
234
-			}
235
-		}
236
-	} else {
237
-		out.Rules = nil
238
-	}
239
-	return nil
240
-}
241
-
242
-func convert_api_ClusterRoleBindingList_To_v1_ClusterRoleBindingList(in *authorizationapi.ClusterRoleBindingList, out *apiv1.ClusterRoleBindingList, s conversion.Scope) error {
243
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
244
-		defaulting.(func(*authorizationapi.ClusterRoleBindingList))(in)
245
-	}
246
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
247
-		return err
248
-	}
249
-	if err := convert_api_ListMeta_To_v1_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
250
-		return err
251
-	}
252
-	if in.Items != nil {
253
-		out.Items = make([]apiv1.ClusterRoleBinding, len(in.Items))
254
-		for i := range in.Items {
255
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
256
-				return err
257
-			}
258
-		}
259
-	} else {
260
-		out.Items = nil
261
-	}
262
-	return nil
263
-}
264
-
265
-func convert_api_ClusterRoleList_To_v1_ClusterRoleList(in *authorizationapi.ClusterRoleList, out *apiv1.ClusterRoleList, s conversion.Scope) error {
266
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
267
-		defaulting.(func(*authorizationapi.ClusterRoleList))(in)
268
-	}
269
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
270
-		return err
271
-	}
272
-	if err := convert_api_ListMeta_To_v1_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
273
-		return err
274
-	}
275
-	if in.Items != nil {
276
-		out.Items = make([]apiv1.ClusterRole, len(in.Items))
277
-		for i := range in.Items {
278
-			if err := convert_api_ClusterRole_To_v1_ClusterRole(&in.Items[i], &out.Items[i], s); err != nil {
279
-				return err
280
-			}
281
-		}
282
-	} else {
283
-		out.Items = nil
284
-	}
285
-	return nil
286
-}
287
-
288 173
 func convert_api_IsPersonalSubjectAccessReview_To_v1_IsPersonalSubjectAccessReview(in *authorizationapi.IsPersonalSubjectAccessReview, out *apiv1.IsPersonalSubjectAccessReview, s conversion.Scope) error {
289 174
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
290 175
 		defaulting.(func(*authorizationapi.IsPersonalSubjectAccessReview))(in)
... ...
@@ -295,52 +180,6 @@ func convert_api_IsPersonalSubjectAccessReview_To_v1_IsPersonalSubjectAccessRevi
295 295
 	return nil
296 296
 }
297 297
 
298
-func convert_api_PolicyBindingList_To_v1_PolicyBindingList(in *authorizationapi.PolicyBindingList, out *apiv1.PolicyBindingList, s conversion.Scope) error {
299
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
300
-		defaulting.(func(*authorizationapi.PolicyBindingList))(in)
301
-	}
302
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
303
-		return err
304
-	}
305
-	if err := convert_api_ListMeta_To_v1_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
306
-		return err
307
-	}
308
-	if in.Items != nil {
309
-		out.Items = make([]apiv1.PolicyBinding, len(in.Items))
310
-		for i := range in.Items {
311
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
312
-				return err
313
-			}
314
-		}
315
-	} else {
316
-		out.Items = nil
317
-	}
318
-	return nil
319
-}
320
-
321
-func convert_api_PolicyList_To_v1_PolicyList(in *authorizationapi.PolicyList, out *apiv1.PolicyList, s conversion.Scope) error {
322
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
323
-		defaulting.(func(*authorizationapi.PolicyList))(in)
324
-	}
325
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
326
-		return err
327
-	}
328
-	if err := convert_api_ListMeta_To_v1_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
329
-		return err
330
-	}
331
-	if in.Items != nil {
332
-		out.Items = make([]apiv1.Policy, len(in.Items))
333
-		for i := range in.Items {
334
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
335
-				return err
336
-			}
337
-		}
338
-	} else {
339
-		out.Items = nil
340
-	}
341
-	return nil
342
-}
343
-
344 298
 func convert_api_ResourceAccessReview_To_v1_ResourceAccessReview(in *authorizationapi.ResourceAccessReview, out *apiv1.ResourceAccessReview, s conversion.Scope) error {
345 299
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
346 300
 		defaulting.(func(*authorizationapi.ResourceAccessReview))(in)
... ...
@@ -357,75 +196,6 @@ func convert_api_ResourceAccessReview_To_v1_ResourceAccessReview(in *authorizati
357 357
 	return nil
358 358
 }
359 359
 
360
-func convert_api_Role_To_v1_Role(in *authorizationapi.Role, out *apiv1.Role, s conversion.Scope) error {
361
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
362
-		defaulting.(func(*authorizationapi.Role))(in)
363
-	}
364
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
365
-		return err
366
-	}
367
-	if err := convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
368
-		return err
369
-	}
370
-	if in.Rules != nil {
371
-		out.Rules = make([]apiv1.PolicyRule, len(in.Rules))
372
-		for i := range in.Rules {
373
-			if err := s.Convert(&in.Rules[i], &out.Rules[i], 0); err != nil {
374
-				return err
375
-			}
376
-		}
377
-	} else {
378
-		out.Rules = nil
379
-	}
380
-	return nil
381
-}
382
-
383
-func convert_api_RoleBindingList_To_v1_RoleBindingList(in *authorizationapi.RoleBindingList, out *apiv1.RoleBindingList, s conversion.Scope) error {
384
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
385
-		defaulting.(func(*authorizationapi.RoleBindingList))(in)
386
-	}
387
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
388
-		return err
389
-	}
390
-	if err := convert_api_ListMeta_To_v1_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
391
-		return err
392
-	}
393
-	if in.Items != nil {
394
-		out.Items = make([]apiv1.RoleBinding, len(in.Items))
395
-		for i := range in.Items {
396
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
397
-				return err
398
-			}
399
-		}
400
-	} else {
401
-		out.Items = nil
402
-	}
403
-	return nil
404
-}
405
-
406
-func convert_api_RoleList_To_v1_RoleList(in *authorizationapi.RoleList, out *apiv1.RoleList, s conversion.Scope) error {
407
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
408
-		defaulting.(func(*authorizationapi.RoleList))(in)
409
-	}
410
-	if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
411
-		return err
412
-	}
413
-	if err := convert_api_ListMeta_To_v1_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
414
-		return err
415
-	}
416
-	if in.Items != nil {
417
-		out.Items = make([]apiv1.Role, len(in.Items))
418
-		for i := range in.Items {
419
-			if err := convert_api_Role_To_v1_Role(&in.Items[i], &out.Items[i], s); err != nil {
420
-				return err
421
-			}
422
-		}
423
-	} else {
424
-		out.Items = nil
425
-	}
426
-	return nil
427
-}
428
-
429 360
 func convert_api_SubjectAccessReviewResponse_To_v1_SubjectAccessReviewResponse(in *authorizationapi.SubjectAccessReviewResponse, out *apiv1.SubjectAccessReviewResponse, s conversion.Scope) error {
430 361
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
431 362
 		defaulting.(func(*authorizationapi.SubjectAccessReviewResponse))(in)
... ...
@@ -439,121 +209,6 @@ func convert_api_SubjectAccessReviewResponse_To_v1_SubjectAccessReviewResponse(i
439 439
 	return nil
440 440
 }
441 441
 
442
-func convert_v1_ClusterPolicyBindingList_To_api_ClusterPolicyBindingList(in *apiv1.ClusterPolicyBindingList, out *authorizationapi.ClusterPolicyBindingList, s conversion.Scope) error {
443
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
444
-		defaulting.(func(*apiv1.ClusterPolicyBindingList))(in)
445
-	}
446
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
447
-		return err
448
-	}
449
-	if err := convert_v1_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
450
-		return err
451
-	}
452
-	if in.Items != nil {
453
-		out.Items = make([]authorizationapi.ClusterPolicyBinding, len(in.Items))
454
-		for i := range in.Items {
455
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
456
-				return err
457
-			}
458
-		}
459
-	} else {
460
-		out.Items = nil
461
-	}
462
-	return nil
463
-}
464
-
465
-func convert_v1_ClusterPolicyList_To_api_ClusterPolicyList(in *apiv1.ClusterPolicyList, out *authorizationapi.ClusterPolicyList, s conversion.Scope) error {
466
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
467
-		defaulting.(func(*apiv1.ClusterPolicyList))(in)
468
-	}
469
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
470
-		return err
471
-	}
472
-	if err := convert_v1_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
473
-		return err
474
-	}
475
-	if in.Items != nil {
476
-		out.Items = make([]authorizationapi.ClusterPolicy, len(in.Items))
477
-		for i := range in.Items {
478
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
479
-				return err
480
-			}
481
-		}
482
-	} else {
483
-		out.Items = nil
484
-	}
485
-	return nil
486
-}
487
-
488
-func convert_v1_ClusterRole_To_api_ClusterRole(in *apiv1.ClusterRole, out *authorizationapi.ClusterRole, s conversion.Scope) error {
489
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
490
-		defaulting.(func(*apiv1.ClusterRole))(in)
491
-	}
492
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
493
-		return err
494
-	}
495
-	if err := convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
496
-		return err
497
-	}
498
-	if in.Rules != nil {
499
-		out.Rules = make([]authorizationapi.PolicyRule, len(in.Rules))
500
-		for i := range in.Rules {
501
-			if err := s.Convert(&in.Rules[i], &out.Rules[i], 0); err != nil {
502
-				return err
503
-			}
504
-		}
505
-	} else {
506
-		out.Rules = nil
507
-	}
508
-	return nil
509
-}
510
-
511
-func convert_v1_ClusterRoleBindingList_To_api_ClusterRoleBindingList(in *apiv1.ClusterRoleBindingList, out *authorizationapi.ClusterRoleBindingList, s conversion.Scope) error {
512
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
513
-		defaulting.(func(*apiv1.ClusterRoleBindingList))(in)
514
-	}
515
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
516
-		return err
517
-	}
518
-	if err := convert_v1_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
519
-		return err
520
-	}
521
-	if in.Items != nil {
522
-		out.Items = make([]authorizationapi.ClusterRoleBinding, len(in.Items))
523
-		for i := range in.Items {
524
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
525
-				return err
526
-			}
527
-		}
528
-	} else {
529
-		out.Items = nil
530
-	}
531
-	return nil
532
-}
533
-
534
-func convert_v1_ClusterRoleList_To_api_ClusterRoleList(in *apiv1.ClusterRoleList, out *authorizationapi.ClusterRoleList, s conversion.Scope) error {
535
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
536
-		defaulting.(func(*apiv1.ClusterRoleList))(in)
537
-	}
538
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
539
-		return err
540
-	}
541
-	if err := convert_v1_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
542
-		return err
543
-	}
544
-	if in.Items != nil {
545
-		out.Items = make([]authorizationapi.ClusterRole, len(in.Items))
546
-		for i := range in.Items {
547
-			if err := convert_v1_ClusterRole_To_api_ClusterRole(&in.Items[i], &out.Items[i], s); err != nil {
548
-				return err
549
-			}
550
-		}
551
-	} else {
552
-		out.Items = nil
553
-	}
554
-	return nil
555
-}
556
-
557 442
 func convert_v1_IsPersonalSubjectAccessReview_To_api_IsPersonalSubjectAccessReview(in *apiv1.IsPersonalSubjectAccessReview, out *authorizationapi.IsPersonalSubjectAccessReview, s conversion.Scope) error {
558 443
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
559 444
 		defaulting.(func(*apiv1.IsPersonalSubjectAccessReview))(in)
... ...
@@ -564,52 +219,6 @@ func convert_v1_IsPersonalSubjectAccessReview_To_api_IsPersonalSubjectAccessRevi
564 564
 	return nil
565 565
 }
566 566
 
567
-func convert_v1_PolicyBindingList_To_api_PolicyBindingList(in *apiv1.PolicyBindingList, out *authorizationapi.PolicyBindingList, s conversion.Scope) error {
568
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
569
-		defaulting.(func(*apiv1.PolicyBindingList))(in)
570
-	}
571
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
572
-		return err
573
-	}
574
-	if err := convert_v1_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
575
-		return err
576
-	}
577
-	if in.Items != nil {
578
-		out.Items = make([]authorizationapi.PolicyBinding, len(in.Items))
579
-		for i := range in.Items {
580
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
581
-				return err
582
-			}
583
-		}
584
-	} else {
585
-		out.Items = nil
586
-	}
587
-	return nil
588
-}
589
-
590
-func convert_v1_PolicyList_To_api_PolicyList(in *apiv1.PolicyList, out *authorizationapi.PolicyList, s conversion.Scope) error {
591
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
592
-		defaulting.(func(*apiv1.PolicyList))(in)
593
-	}
594
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
595
-		return err
596
-	}
597
-	if err := convert_v1_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
598
-		return err
599
-	}
600
-	if in.Items != nil {
601
-		out.Items = make([]authorizationapi.Policy, len(in.Items))
602
-		for i := range in.Items {
603
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
604
-				return err
605
-			}
606
-		}
607
-	} else {
608
-		out.Items = nil
609
-	}
610
-	return nil
611
-}
612
-
613 567
 func convert_v1_ResourceAccessReview_To_api_ResourceAccessReview(in *apiv1.ResourceAccessReview, out *authorizationapi.ResourceAccessReview, s conversion.Scope) error {
614 568
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
615 569
 		defaulting.(func(*apiv1.ResourceAccessReview))(in)
... ...
@@ -626,75 +235,6 @@ func convert_v1_ResourceAccessReview_To_api_ResourceAccessReview(in *apiv1.Resou
626 626
 	return nil
627 627
 }
628 628
 
629
-func convert_v1_Role_To_api_Role(in *apiv1.Role, out *authorizationapi.Role, s conversion.Scope) error {
630
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
631
-		defaulting.(func(*apiv1.Role))(in)
632
-	}
633
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
634
-		return err
635
-	}
636
-	if err := convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
637
-		return err
638
-	}
639
-	if in.Rules != nil {
640
-		out.Rules = make([]authorizationapi.PolicyRule, len(in.Rules))
641
-		for i := range in.Rules {
642
-			if err := s.Convert(&in.Rules[i], &out.Rules[i], 0); err != nil {
643
-				return err
644
-			}
645
-		}
646
-	} else {
647
-		out.Rules = nil
648
-	}
649
-	return nil
650
-}
651
-
652
-func convert_v1_RoleBindingList_To_api_RoleBindingList(in *apiv1.RoleBindingList, out *authorizationapi.RoleBindingList, s conversion.Scope) error {
653
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
654
-		defaulting.(func(*apiv1.RoleBindingList))(in)
655
-	}
656
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
657
-		return err
658
-	}
659
-	if err := convert_v1_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
660
-		return err
661
-	}
662
-	if in.Items != nil {
663
-		out.Items = make([]authorizationapi.RoleBinding, len(in.Items))
664
-		for i := range in.Items {
665
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
666
-				return err
667
-			}
668
-		}
669
-	} else {
670
-		out.Items = nil
671
-	}
672
-	return nil
673
-}
674
-
675
-func convert_v1_RoleList_To_api_RoleList(in *apiv1.RoleList, out *authorizationapi.RoleList, s conversion.Scope) error {
676
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
677
-		defaulting.(func(*apiv1.RoleList))(in)
678
-	}
679
-	if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
680
-		return err
681
-	}
682
-	if err := convert_v1_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
683
-		return err
684
-	}
685
-	if in.Items != nil {
686
-		out.Items = make([]authorizationapi.Role, len(in.Items))
687
-		for i := range in.Items {
688
-			if err := convert_v1_Role_To_api_Role(&in.Items[i], &out.Items[i], s); err != nil {
689
-				return err
690
-			}
691
-		}
692
-	} else {
693
-		out.Items = nil
694
-	}
695
-	return nil
696
-}
697
-
698 629
 func convert_v1_SubjectAccessReviewResponse_To_api_SubjectAccessReviewResponse(in *apiv1.SubjectAccessReviewResponse, out *authorizationapi.SubjectAccessReviewResponse, s conversion.Scope) error {
699 630
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
700 631
 		defaulting.(func(*apiv1.SubjectAccessReviewResponse))(in)
... ...
@@ -2351,11 +1891,6 @@ func init() {
2351 2351
 		convert_api_BuildRequest_To_v1_BuildRequest,
2352 2352
 		convert_api_ClusterNetworkList_To_v1_ClusterNetworkList,
2353 2353
 		convert_api_ClusterNetwork_To_v1_ClusterNetwork,
2354
-		convert_api_ClusterPolicyBindingList_To_v1_ClusterPolicyBindingList,
2355
-		convert_api_ClusterPolicyList_To_v1_ClusterPolicyList,
2356
-		convert_api_ClusterRoleBindingList_To_v1_ClusterRoleBindingList,
2357
-		convert_api_ClusterRoleList_To_v1_ClusterRoleList,
2358
-		convert_api_ClusterRole_To_v1_ClusterRole,
2359 2354
 		convert_api_DeploymentConfigList_To_v1_DeploymentConfigList,
2360 2355
 		convert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec,
2361 2356
 		convert_api_DeploymentConfigRollback_To_v1_DeploymentConfigRollback,
... ...
@@ -2382,17 +1917,12 @@ func init() {
2382 2382
 		convert_api_ObjectMeta_To_v1_ObjectMeta,
2383 2383
 		convert_api_ObjectReference_To_v1_ObjectReference,
2384 2384
 		convert_api_Parameter_To_v1_Parameter,
2385
-		convert_api_PolicyBindingList_To_v1_PolicyBindingList,
2386
-		convert_api_PolicyList_To_v1_PolicyList,
2387 2385
 		convert_api_ProjectList_To_v1_ProjectList,
2388 2386
 		convert_api_ProjectRequest_To_v1_ProjectRequest,
2389 2387
 		convert_api_ProjectSpec_To_v1_ProjectSpec,
2390 2388
 		convert_api_ProjectStatus_To_v1_ProjectStatus,
2391 2389
 		convert_api_Project_To_v1_Project,
2392 2390
 		convert_api_ResourceAccessReview_To_v1_ResourceAccessReview,
2393
-		convert_api_RoleBindingList_To_v1_RoleBindingList,
2394
-		convert_api_RoleList_To_v1_RoleList,
2395
-		convert_api_Role_To_v1_Role,
2396 2391
 		convert_api_RouteList_To_v1_RouteList,
2397 2392
 		convert_api_SourceControlUser_To_v1_SourceControlUser,
2398 2393
 		convert_api_SourceRevision_To_v1_SourceRevision,
... ...
@@ -2409,11 +1939,6 @@ func init() {
2409 2409
 		convert_v1_BuildRequest_To_api_BuildRequest,
2410 2410
 		convert_v1_ClusterNetworkList_To_api_ClusterNetworkList,
2411 2411
 		convert_v1_ClusterNetwork_To_api_ClusterNetwork,
2412
-		convert_v1_ClusterPolicyBindingList_To_api_ClusterPolicyBindingList,
2413
-		convert_v1_ClusterPolicyList_To_api_ClusterPolicyList,
2414
-		convert_v1_ClusterRoleBindingList_To_api_ClusterRoleBindingList,
2415
-		convert_v1_ClusterRoleList_To_api_ClusterRoleList,
2416
-		convert_v1_ClusterRole_To_api_ClusterRole,
2417 2412
 		convert_v1_DeploymentConfigList_To_api_DeploymentConfigList,
2418 2413
 		convert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec,
2419 2414
 		convert_v1_DeploymentConfigRollback_To_api_DeploymentConfigRollback,
... ...
@@ -2440,17 +1965,12 @@ func init() {
2440 2440
 		convert_v1_ObjectMeta_To_api_ObjectMeta,
2441 2441
 		convert_v1_ObjectReference_To_api_ObjectReference,
2442 2442
 		convert_v1_Parameter_To_api_Parameter,
2443
-		convert_v1_PolicyBindingList_To_api_PolicyBindingList,
2444
-		convert_v1_PolicyList_To_api_PolicyList,
2445 2443
 		convert_v1_ProjectList_To_api_ProjectList,
2446 2444
 		convert_v1_ProjectRequest_To_api_ProjectRequest,
2447 2445
 		convert_v1_ProjectSpec_To_api_ProjectSpec,
2448 2446
 		convert_v1_ProjectStatus_To_api_ProjectStatus,
2449 2447
 		convert_v1_Project_To_api_Project,
2450 2448
 		convert_v1_ResourceAccessReview_To_api_ResourceAccessReview,
2451
-		convert_v1_RoleBindingList_To_api_RoleBindingList,
2452
-		convert_v1_RoleList_To_api_RoleList,
2453
-		convert_v1_Role_To_api_Role,
2454 2449
 		convert_v1_RouteList_To_api_RouteList,
2455 2450
 		convert_v1_SourceControlUser_To_api_SourceControlUser,
2456 2451
 		convert_v1_SourceRevision_To_api_SourceRevision,
... ...
@@ -170,140 +170,6 @@ func convert_v1beta3_TypeMeta_To_api_TypeMeta(in *v1beta3.TypeMeta, out *api.Typ
170 170
 	return nil
171 171
 }
172 172
 
173
-func convert_api_ClusterPolicy_To_v1beta3_ClusterPolicy(in *authorizationapi.ClusterPolicy, out *apiv1beta3.ClusterPolicy, s conversion.Scope) error {
174
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
175
-		defaulting.(func(*authorizationapi.ClusterPolicy))(in)
176
-	}
177
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
178
-		return err
179
-	}
180
-	if err := convert_api_ObjectMeta_To_v1beta3_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
181
-		return err
182
-	}
183
-	if err := s.Convert(&in.LastModified, &out.LastModified, 0); err != nil {
184
-		return err
185
-	}
186
-	if err := s.Convert(&in.Roles, &out.Roles, 0); err != nil {
187
-		return err
188
-	}
189
-	return nil
190
-}
191
-
192
-func convert_api_ClusterPolicyBindingList_To_v1beta3_ClusterPolicyBindingList(in *authorizationapi.ClusterPolicyBindingList, out *apiv1beta3.ClusterPolicyBindingList, s conversion.Scope) error {
193
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
194
-		defaulting.(func(*authorizationapi.ClusterPolicyBindingList))(in)
195
-	}
196
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
197
-		return err
198
-	}
199
-	if err := convert_api_ListMeta_To_v1beta3_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
200
-		return err
201
-	}
202
-	if in.Items != nil {
203
-		out.Items = make([]apiv1beta3.ClusterPolicyBinding, len(in.Items))
204
-		for i := range in.Items {
205
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
206
-				return err
207
-			}
208
-		}
209
-	} else {
210
-		out.Items = nil
211
-	}
212
-	return nil
213
-}
214
-
215
-func convert_api_ClusterPolicyList_To_v1beta3_ClusterPolicyList(in *authorizationapi.ClusterPolicyList, out *apiv1beta3.ClusterPolicyList, s conversion.Scope) error {
216
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
217
-		defaulting.(func(*authorizationapi.ClusterPolicyList))(in)
218
-	}
219
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
220
-		return err
221
-	}
222
-	if err := convert_api_ListMeta_To_v1beta3_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
223
-		return err
224
-	}
225
-	if in.Items != nil {
226
-		out.Items = make([]apiv1beta3.ClusterPolicy, len(in.Items))
227
-		for i := range in.Items {
228
-			if err := convert_api_ClusterPolicy_To_v1beta3_ClusterPolicy(&in.Items[i], &out.Items[i], s); err != nil {
229
-				return err
230
-			}
231
-		}
232
-	} else {
233
-		out.Items = nil
234
-	}
235
-	return nil
236
-}
237
-
238
-func convert_api_ClusterRole_To_v1beta3_ClusterRole(in *authorizationapi.ClusterRole, out *apiv1beta3.ClusterRole, s conversion.Scope) error {
239
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
240
-		defaulting.(func(*authorizationapi.ClusterRole))(in)
241
-	}
242
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
243
-		return err
244
-	}
245
-	if err := convert_api_ObjectMeta_To_v1beta3_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
246
-		return err
247
-	}
248
-	if in.Rules != nil {
249
-		out.Rules = make([]apiv1beta3.PolicyRule, len(in.Rules))
250
-		for i := range in.Rules {
251
-			if err := s.Convert(&in.Rules[i], &out.Rules[i], 0); err != nil {
252
-				return err
253
-			}
254
-		}
255
-	} else {
256
-		out.Rules = nil
257
-	}
258
-	return nil
259
-}
260
-
261
-func convert_api_ClusterRoleBindingList_To_v1beta3_ClusterRoleBindingList(in *authorizationapi.ClusterRoleBindingList, out *apiv1beta3.ClusterRoleBindingList, s conversion.Scope) error {
262
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
263
-		defaulting.(func(*authorizationapi.ClusterRoleBindingList))(in)
264
-	}
265
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
266
-		return err
267
-	}
268
-	if err := convert_api_ListMeta_To_v1beta3_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
269
-		return err
270
-	}
271
-	if in.Items != nil {
272
-		out.Items = make([]apiv1beta3.ClusterRoleBinding, len(in.Items))
273
-		for i := range in.Items {
274
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
275
-				return err
276
-			}
277
-		}
278
-	} else {
279
-		out.Items = nil
280
-	}
281
-	return nil
282
-}
283
-
284
-func convert_api_ClusterRoleList_To_v1beta3_ClusterRoleList(in *authorizationapi.ClusterRoleList, out *apiv1beta3.ClusterRoleList, s conversion.Scope) error {
285
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
286
-		defaulting.(func(*authorizationapi.ClusterRoleList))(in)
287
-	}
288
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
289
-		return err
290
-	}
291
-	if err := convert_api_ListMeta_To_v1beta3_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
292
-		return err
293
-	}
294
-	if in.Items != nil {
295
-		out.Items = make([]apiv1beta3.ClusterRole, len(in.Items))
296
-		for i := range in.Items {
297
-			if err := convert_api_ClusterRole_To_v1beta3_ClusterRole(&in.Items[i], &out.Items[i], s); err != nil {
298
-				return err
299
-			}
300
-		}
301
-	} else {
302
-		out.Items = nil
303
-	}
304
-	return nil
305
-}
306
-
307 173
 func convert_api_IsPersonalSubjectAccessReview_To_v1beta3_IsPersonalSubjectAccessReview(in *authorizationapi.IsPersonalSubjectAccessReview, out *apiv1beta3.IsPersonalSubjectAccessReview, s conversion.Scope) error {
308 174
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
309 175
 		defaulting.(func(*authorizationapi.IsPersonalSubjectAccessReview))(in)
... ...
@@ -314,52 +180,6 @@ func convert_api_IsPersonalSubjectAccessReview_To_v1beta3_IsPersonalSubjectAcces
314 314
 	return nil
315 315
 }
316 316
 
317
-func convert_api_PolicyBindingList_To_v1beta3_PolicyBindingList(in *authorizationapi.PolicyBindingList, out *apiv1beta3.PolicyBindingList, s conversion.Scope) error {
318
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
319
-		defaulting.(func(*authorizationapi.PolicyBindingList))(in)
320
-	}
321
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
322
-		return err
323
-	}
324
-	if err := convert_api_ListMeta_To_v1beta3_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
325
-		return err
326
-	}
327
-	if in.Items != nil {
328
-		out.Items = make([]apiv1beta3.PolicyBinding, len(in.Items))
329
-		for i := range in.Items {
330
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
331
-				return err
332
-			}
333
-		}
334
-	} else {
335
-		out.Items = nil
336
-	}
337
-	return nil
338
-}
339
-
340
-func convert_api_PolicyList_To_v1beta3_PolicyList(in *authorizationapi.PolicyList, out *apiv1beta3.PolicyList, s conversion.Scope) error {
341
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
342
-		defaulting.(func(*authorizationapi.PolicyList))(in)
343
-	}
344
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
345
-		return err
346
-	}
347
-	if err := convert_api_ListMeta_To_v1beta3_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
348
-		return err
349
-	}
350
-	if in.Items != nil {
351
-		out.Items = make([]apiv1beta3.Policy, len(in.Items))
352
-		for i := range in.Items {
353
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
354
-				return err
355
-			}
356
-		}
357
-	} else {
358
-		out.Items = nil
359
-	}
360
-	return nil
361
-}
362
-
363 317
 func convert_api_ResourceAccessReview_To_v1beta3_ResourceAccessReview(in *authorizationapi.ResourceAccessReview, out *apiv1beta3.ResourceAccessReview, s conversion.Scope) error {
364 318
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
365 319
 		defaulting.(func(*authorizationapi.ResourceAccessReview))(in)
... ...
@@ -376,75 +196,6 @@ func convert_api_ResourceAccessReview_To_v1beta3_ResourceAccessReview(in *author
376 376
 	return nil
377 377
 }
378 378
 
379
-func convert_api_Role_To_v1beta3_Role(in *authorizationapi.Role, out *apiv1beta3.Role, s conversion.Scope) error {
380
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
381
-		defaulting.(func(*authorizationapi.Role))(in)
382
-	}
383
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
384
-		return err
385
-	}
386
-	if err := convert_api_ObjectMeta_To_v1beta3_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
387
-		return err
388
-	}
389
-	if in.Rules != nil {
390
-		out.Rules = make([]apiv1beta3.PolicyRule, len(in.Rules))
391
-		for i := range in.Rules {
392
-			if err := s.Convert(&in.Rules[i], &out.Rules[i], 0); err != nil {
393
-				return err
394
-			}
395
-		}
396
-	} else {
397
-		out.Rules = nil
398
-	}
399
-	return nil
400
-}
401
-
402
-func convert_api_RoleBindingList_To_v1beta3_RoleBindingList(in *authorizationapi.RoleBindingList, out *apiv1beta3.RoleBindingList, s conversion.Scope) error {
403
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
404
-		defaulting.(func(*authorizationapi.RoleBindingList))(in)
405
-	}
406
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
407
-		return err
408
-	}
409
-	if err := convert_api_ListMeta_To_v1beta3_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
410
-		return err
411
-	}
412
-	if in.Items != nil {
413
-		out.Items = make([]apiv1beta3.RoleBinding, len(in.Items))
414
-		for i := range in.Items {
415
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
416
-				return err
417
-			}
418
-		}
419
-	} else {
420
-		out.Items = nil
421
-	}
422
-	return nil
423
-}
424
-
425
-func convert_api_RoleList_To_v1beta3_RoleList(in *authorizationapi.RoleList, out *apiv1beta3.RoleList, s conversion.Scope) error {
426
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
427
-		defaulting.(func(*authorizationapi.RoleList))(in)
428
-	}
429
-	if err := convert_api_TypeMeta_To_v1beta3_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
430
-		return err
431
-	}
432
-	if err := convert_api_ListMeta_To_v1beta3_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
433
-		return err
434
-	}
435
-	if in.Items != nil {
436
-		out.Items = make([]apiv1beta3.Role, len(in.Items))
437
-		for i := range in.Items {
438
-			if err := convert_api_Role_To_v1beta3_Role(&in.Items[i], &out.Items[i], s); err != nil {
439
-				return err
440
-			}
441
-		}
442
-	} else {
443
-		out.Items = nil
444
-	}
445
-	return nil
446
-}
447
-
448 379
 func convert_api_SubjectAccessReviewResponse_To_v1beta3_SubjectAccessReviewResponse(in *authorizationapi.SubjectAccessReviewResponse, out *apiv1beta3.SubjectAccessReviewResponse, s conversion.Scope) error {
449 380
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
450 381
 		defaulting.(func(*authorizationapi.SubjectAccessReviewResponse))(in)
... ...
@@ -458,140 +209,6 @@ func convert_api_SubjectAccessReviewResponse_To_v1beta3_SubjectAccessReviewRespo
458 458
 	return nil
459 459
 }
460 460
 
461
-func convert_v1beta3_ClusterPolicy_To_api_ClusterPolicy(in *apiv1beta3.ClusterPolicy, out *authorizationapi.ClusterPolicy, s conversion.Scope) error {
462
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
463
-		defaulting.(func(*apiv1beta3.ClusterPolicy))(in)
464
-	}
465
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
466
-		return err
467
-	}
468
-	if err := convert_v1beta3_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
469
-		return err
470
-	}
471
-	if err := s.Convert(&in.LastModified, &out.LastModified, 0); err != nil {
472
-		return err
473
-	}
474
-	if err := s.Convert(&in.Roles, &out.Roles, 0); err != nil {
475
-		return err
476
-	}
477
-	return nil
478
-}
479
-
480
-func convert_v1beta3_ClusterPolicyBindingList_To_api_ClusterPolicyBindingList(in *apiv1beta3.ClusterPolicyBindingList, out *authorizationapi.ClusterPolicyBindingList, s conversion.Scope) error {
481
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
482
-		defaulting.(func(*apiv1beta3.ClusterPolicyBindingList))(in)
483
-	}
484
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
485
-		return err
486
-	}
487
-	if err := convert_v1beta3_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
488
-		return err
489
-	}
490
-	if in.Items != nil {
491
-		out.Items = make([]authorizationapi.ClusterPolicyBinding, len(in.Items))
492
-		for i := range in.Items {
493
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
494
-				return err
495
-			}
496
-		}
497
-	} else {
498
-		out.Items = nil
499
-	}
500
-	return nil
501
-}
502
-
503
-func convert_v1beta3_ClusterPolicyList_To_api_ClusterPolicyList(in *apiv1beta3.ClusterPolicyList, out *authorizationapi.ClusterPolicyList, s conversion.Scope) error {
504
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
505
-		defaulting.(func(*apiv1beta3.ClusterPolicyList))(in)
506
-	}
507
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
508
-		return err
509
-	}
510
-	if err := convert_v1beta3_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
511
-		return err
512
-	}
513
-	if in.Items != nil {
514
-		out.Items = make([]authorizationapi.ClusterPolicy, len(in.Items))
515
-		for i := range in.Items {
516
-			if err := convert_v1beta3_ClusterPolicy_To_api_ClusterPolicy(&in.Items[i], &out.Items[i], s); err != nil {
517
-				return err
518
-			}
519
-		}
520
-	} else {
521
-		out.Items = nil
522
-	}
523
-	return nil
524
-}
525
-
526
-func convert_v1beta3_ClusterRole_To_api_ClusterRole(in *apiv1beta3.ClusterRole, out *authorizationapi.ClusterRole, s conversion.Scope) error {
527
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
528
-		defaulting.(func(*apiv1beta3.ClusterRole))(in)
529
-	}
530
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
531
-		return err
532
-	}
533
-	if err := convert_v1beta3_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
534
-		return err
535
-	}
536
-	if in.Rules != nil {
537
-		out.Rules = make([]authorizationapi.PolicyRule, len(in.Rules))
538
-		for i := range in.Rules {
539
-			if err := s.Convert(&in.Rules[i], &out.Rules[i], 0); err != nil {
540
-				return err
541
-			}
542
-		}
543
-	} else {
544
-		out.Rules = nil
545
-	}
546
-	return nil
547
-}
548
-
549
-func convert_v1beta3_ClusterRoleBindingList_To_api_ClusterRoleBindingList(in *apiv1beta3.ClusterRoleBindingList, out *authorizationapi.ClusterRoleBindingList, s conversion.Scope) error {
550
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
551
-		defaulting.(func(*apiv1beta3.ClusterRoleBindingList))(in)
552
-	}
553
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
554
-		return err
555
-	}
556
-	if err := convert_v1beta3_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
557
-		return err
558
-	}
559
-	if in.Items != nil {
560
-		out.Items = make([]authorizationapi.ClusterRoleBinding, len(in.Items))
561
-		for i := range in.Items {
562
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
563
-				return err
564
-			}
565
-		}
566
-	} else {
567
-		out.Items = nil
568
-	}
569
-	return nil
570
-}
571
-
572
-func convert_v1beta3_ClusterRoleList_To_api_ClusterRoleList(in *apiv1beta3.ClusterRoleList, out *authorizationapi.ClusterRoleList, s conversion.Scope) error {
573
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
574
-		defaulting.(func(*apiv1beta3.ClusterRoleList))(in)
575
-	}
576
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
577
-		return err
578
-	}
579
-	if err := convert_v1beta3_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
580
-		return err
581
-	}
582
-	if in.Items != nil {
583
-		out.Items = make([]authorizationapi.ClusterRole, len(in.Items))
584
-		for i := range in.Items {
585
-			if err := convert_v1beta3_ClusterRole_To_api_ClusterRole(&in.Items[i], &out.Items[i], s); err != nil {
586
-				return err
587
-			}
588
-		}
589
-	} else {
590
-		out.Items = nil
591
-	}
592
-	return nil
593
-}
594
-
595 461
 func convert_v1beta3_IsPersonalSubjectAccessReview_To_api_IsPersonalSubjectAccessReview(in *apiv1beta3.IsPersonalSubjectAccessReview, out *authorizationapi.IsPersonalSubjectAccessReview, s conversion.Scope) error {
596 462
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
597 463
 		defaulting.(func(*apiv1beta3.IsPersonalSubjectAccessReview))(in)
... ...
@@ -602,52 +219,6 @@ func convert_v1beta3_IsPersonalSubjectAccessReview_To_api_IsPersonalSubjectAcces
602 602
 	return nil
603 603
 }
604 604
 
605
-func convert_v1beta3_PolicyBindingList_To_api_PolicyBindingList(in *apiv1beta3.PolicyBindingList, out *authorizationapi.PolicyBindingList, s conversion.Scope) error {
606
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
607
-		defaulting.(func(*apiv1beta3.PolicyBindingList))(in)
608
-	}
609
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
610
-		return err
611
-	}
612
-	if err := convert_v1beta3_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
613
-		return err
614
-	}
615
-	if in.Items != nil {
616
-		out.Items = make([]authorizationapi.PolicyBinding, len(in.Items))
617
-		for i := range in.Items {
618
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
619
-				return err
620
-			}
621
-		}
622
-	} else {
623
-		out.Items = nil
624
-	}
625
-	return nil
626
-}
627
-
628
-func convert_v1beta3_PolicyList_To_api_PolicyList(in *apiv1beta3.PolicyList, out *authorizationapi.PolicyList, s conversion.Scope) error {
629
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
630
-		defaulting.(func(*apiv1beta3.PolicyList))(in)
631
-	}
632
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
633
-		return err
634
-	}
635
-	if err := convert_v1beta3_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
636
-		return err
637
-	}
638
-	if in.Items != nil {
639
-		out.Items = make([]authorizationapi.Policy, len(in.Items))
640
-		for i := range in.Items {
641
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
642
-				return err
643
-			}
644
-		}
645
-	} else {
646
-		out.Items = nil
647
-	}
648
-	return nil
649
-}
650
-
651 605
 func convert_v1beta3_ResourceAccessReview_To_api_ResourceAccessReview(in *apiv1beta3.ResourceAccessReview, out *authorizationapi.ResourceAccessReview, s conversion.Scope) error {
652 606
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
653 607
 		defaulting.(func(*apiv1beta3.ResourceAccessReview))(in)
... ...
@@ -664,75 +235,6 @@ func convert_v1beta3_ResourceAccessReview_To_api_ResourceAccessReview(in *apiv1b
664 664
 	return nil
665 665
 }
666 666
 
667
-func convert_v1beta3_Role_To_api_Role(in *apiv1beta3.Role, out *authorizationapi.Role, s conversion.Scope) error {
668
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
669
-		defaulting.(func(*apiv1beta3.Role))(in)
670
-	}
671
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
672
-		return err
673
-	}
674
-	if err := convert_v1beta3_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
675
-		return err
676
-	}
677
-	if in.Rules != nil {
678
-		out.Rules = make([]authorizationapi.PolicyRule, len(in.Rules))
679
-		for i := range in.Rules {
680
-			if err := s.Convert(&in.Rules[i], &out.Rules[i], 0); err != nil {
681
-				return err
682
-			}
683
-		}
684
-	} else {
685
-		out.Rules = nil
686
-	}
687
-	return nil
688
-}
689
-
690
-func convert_v1beta3_RoleBindingList_To_api_RoleBindingList(in *apiv1beta3.RoleBindingList, out *authorizationapi.RoleBindingList, s conversion.Scope) error {
691
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
692
-		defaulting.(func(*apiv1beta3.RoleBindingList))(in)
693
-	}
694
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
695
-		return err
696
-	}
697
-	if err := convert_v1beta3_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
698
-		return err
699
-	}
700
-	if in.Items != nil {
701
-		out.Items = make([]authorizationapi.RoleBinding, len(in.Items))
702
-		for i := range in.Items {
703
-			if err := s.Convert(&in.Items[i], &out.Items[i], 0); err != nil {
704
-				return err
705
-			}
706
-		}
707
-	} else {
708
-		out.Items = nil
709
-	}
710
-	return nil
711
-}
712
-
713
-func convert_v1beta3_RoleList_To_api_RoleList(in *apiv1beta3.RoleList, out *authorizationapi.RoleList, s conversion.Scope) error {
714
-	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
715
-		defaulting.(func(*apiv1beta3.RoleList))(in)
716
-	}
717
-	if err := convert_v1beta3_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
718
-		return err
719
-	}
720
-	if err := convert_v1beta3_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
721
-		return err
722
-	}
723
-	if in.Items != nil {
724
-		out.Items = make([]authorizationapi.Role, len(in.Items))
725
-		for i := range in.Items {
726
-			if err := convert_v1beta3_Role_To_api_Role(&in.Items[i], &out.Items[i], s); err != nil {
727
-				return err
728
-			}
729
-		}
730
-	} else {
731
-		out.Items = nil
732
-	}
733
-	return nil
734
-}
735
-
736 667
 func convert_v1beta3_SubjectAccessReviewResponse_To_api_SubjectAccessReviewResponse(in *apiv1beta3.SubjectAccessReviewResponse, out *authorizationapi.SubjectAccessReviewResponse, s conversion.Scope) error {
737 668
 	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
738 669
 		defaulting.(func(*apiv1beta3.SubjectAccessReviewResponse))(in)
... ...
@@ -2287,12 +1789,6 @@ func init() {
2287 2287
 		convert_api_BuildRequest_To_v1beta3_BuildRequest,
2288 2288
 		convert_api_ClusterNetworkList_To_v1beta3_ClusterNetworkList,
2289 2289
 		convert_api_ClusterNetwork_To_v1beta3_ClusterNetwork,
2290
-		convert_api_ClusterPolicyBindingList_To_v1beta3_ClusterPolicyBindingList,
2291
-		convert_api_ClusterPolicyList_To_v1beta3_ClusterPolicyList,
2292
-		convert_api_ClusterPolicy_To_v1beta3_ClusterPolicy,
2293
-		convert_api_ClusterRoleBindingList_To_v1beta3_ClusterRoleBindingList,
2294
-		convert_api_ClusterRoleList_To_v1beta3_ClusterRoleList,
2295
-		convert_api_ClusterRole_To_v1beta3_ClusterRole,
2296 2290
 		convert_api_DeploymentConfigList_To_v1beta3_DeploymentConfigList,
2297 2291
 		convert_api_DeploymentConfigRollbackSpec_To_v1beta3_DeploymentConfigRollbackSpec,
2298 2292
 		convert_api_DeploymentConfigRollback_To_v1beta3_DeploymentConfigRollback,
... ...
@@ -2316,17 +1812,12 @@ func init() {
2316 2316
 		convert_api_ObjectMeta_To_v1beta3_ObjectMeta,
2317 2317
 		convert_api_ObjectReference_To_v1beta3_ObjectReference,
2318 2318
 		convert_api_Parameter_To_v1beta3_Parameter,
2319
-		convert_api_PolicyBindingList_To_v1beta3_PolicyBindingList,
2320
-		convert_api_PolicyList_To_v1beta3_PolicyList,
2321 2319
 		convert_api_ProjectList_To_v1beta3_ProjectList,
2322 2320
 		convert_api_ProjectRequest_To_v1beta3_ProjectRequest,
2323 2321
 		convert_api_ProjectSpec_To_v1beta3_ProjectSpec,
2324 2322
 		convert_api_ProjectStatus_To_v1beta3_ProjectStatus,
2325 2323
 		convert_api_Project_To_v1beta3_Project,
2326 2324
 		convert_api_ResourceAccessReview_To_v1beta3_ResourceAccessReview,
2327
-		convert_api_RoleBindingList_To_v1beta3_RoleBindingList,
2328
-		convert_api_RoleList_To_v1beta3_RoleList,
2329
-		convert_api_Role_To_v1beta3_Role,
2330 2325
 		convert_api_RouteList_To_v1beta3_RouteList,
2331 2326
 		convert_api_SourceControlUser_To_v1beta3_SourceControlUser,
2332 2327
 		convert_api_SourceRevision_To_v1beta3_SourceRevision,
... ...
@@ -2343,12 +1834,6 @@ func init() {
2343 2343
 		convert_v1beta3_BuildRequest_To_api_BuildRequest,
2344 2344
 		convert_v1beta3_ClusterNetworkList_To_api_ClusterNetworkList,
2345 2345
 		convert_v1beta3_ClusterNetwork_To_api_ClusterNetwork,
2346
-		convert_v1beta3_ClusterPolicyBindingList_To_api_ClusterPolicyBindingList,
2347
-		convert_v1beta3_ClusterPolicyList_To_api_ClusterPolicyList,
2348
-		convert_v1beta3_ClusterPolicy_To_api_ClusterPolicy,
2349
-		convert_v1beta3_ClusterRoleBindingList_To_api_ClusterRoleBindingList,
2350
-		convert_v1beta3_ClusterRoleList_To_api_ClusterRoleList,
2351
-		convert_v1beta3_ClusterRole_To_api_ClusterRole,
2352 2346
 		convert_v1beta3_DeploymentConfigList_To_api_DeploymentConfigList,
2353 2347
 		convert_v1beta3_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec,
2354 2348
 		convert_v1beta3_DeploymentConfigRollback_To_api_DeploymentConfigRollback,
... ...
@@ -2372,17 +1857,12 @@ func init() {
2372 2372
 		convert_v1beta3_ObjectMeta_To_api_ObjectMeta,
2373 2373
 		convert_v1beta3_ObjectReference_To_api_ObjectReference,
2374 2374
 		convert_v1beta3_Parameter_To_api_Parameter,
2375
-		convert_v1beta3_PolicyBindingList_To_api_PolicyBindingList,
2376
-		convert_v1beta3_PolicyList_To_api_PolicyList,
2377 2375
 		convert_v1beta3_ProjectList_To_api_ProjectList,
2378 2376
 		convert_v1beta3_ProjectRequest_To_api_ProjectRequest,
2379 2377
 		convert_v1beta3_ProjectSpec_To_api_ProjectSpec,
2380 2378
 		convert_v1beta3_ProjectStatus_To_api_ProjectStatus,
2381 2379
 		convert_v1beta3_Project_To_api_Project,
2382 2380
 		convert_v1beta3_ResourceAccessReview_To_api_ResourceAccessReview,
2383
-		convert_v1beta3_RoleBindingList_To_api_RoleBindingList,
2384
-		convert_v1beta3_RoleList_To_api_RoleList,
2385
-		convert_v1beta3_Role_To_api_Role,
2386 2381
 		convert_v1beta3_RouteList_To_api_RouteList,
2387 2382
 		convert_v1beta3_SourceControlUser_To_api_SourceControlUser,
2388 2383
 		convert_v1beta3_SourceRevision_To_api_SourceRevision,
... ...
@@ -28,10 +28,10 @@ func ToPolicy(in *ClusterPolicy) *Policy {
28 28
 	return ret
29 29
 }
30 30
 
31
-func ToRoleMap(in map[string]ClusterRole) map[string]Role {
32
-	ret := map[string]Role{}
31
+func ToRoleMap(in map[string]*ClusterRole) map[string]*Role {
32
+	ret := map[string]*Role{}
33 33
 	for key, role := range in {
34
-		ret[key] = *ToRole(&role)
34
+		ret[key] = ToRole(role)
35 35
 	}
36 36
 
37 37
 	return ret
... ...
@@ -80,10 +80,10 @@ func ToClusterPolicy(in *Policy) *ClusterPolicy {
80 80
 	return ret
81 81
 }
82 82
 
83
-func ToClusterRoleMap(in map[string]Role) map[string]ClusterRole {
84
-	ret := map[string]ClusterRole{}
83
+func ToClusterRoleMap(in map[string]*Role) map[string]*ClusterRole {
84
+	ret := map[string]*ClusterRole{}
85 85
 	for key, role := range in {
86
-		ret[key] = *ToClusterRole(&role)
86
+		ret[key] = ToClusterRole(role)
87 87
 	}
88 88
 
89 89
 	return ret
... ...
@@ -142,10 +142,10 @@ func ToPolicyRef(in kapi.ObjectReference) kapi.ObjectReference {
142 142
 	return ret
143 143
 }
144 144
 
145
-func ToRoleBindingMap(in map[string]ClusterRoleBinding) map[string]RoleBinding {
146
-	ret := map[string]RoleBinding{}
145
+func ToRoleBindingMap(in map[string]*ClusterRoleBinding) map[string]*RoleBinding {
146
+	ret := map[string]*RoleBinding{}
147 147
 	for key, RoleBinding := range in {
148
-		ret[key] = *ToRoleBinding(&RoleBinding)
148
+		ret[key] = ToRoleBinding(RoleBinding)
149 149
 	}
150 150
 
151 151
 	return ret
... ...
@@ -210,10 +210,10 @@ func ToClusterPolicyRef(in kapi.ObjectReference) kapi.ObjectReference {
210 210
 	return ret
211 211
 }
212 212
 
213
-func ToClusterRoleBindingMap(in map[string]RoleBinding) map[string]ClusterRoleBinding {
214
-	ret := map[string]ClusterRoleBinding{}
213
+func ToClusterRoleBindingMap(in map[string]*RoleBinding) map[string]*ClusterRoleBinding {
214
+	ret := map[string]*ClusterRoleBinding{}
215 215
 	for key, RoleBinding := range in {
216
-		ret[key] = *ToClusterRoleBinding(&RoleBinding)
216
+		ret[key] = ToClusterRoleBinding(RoleBinding)
217 217
 	}
218 218
 
219 219
 	return ret
... ...
@@ -37,15 +37,15 @@ func (r PolicyRule) String() string {
37 37
 	return fmt.Sprintf("PolicyRule{Verbs:%v, Resources:%v, ResourceNames:%v, Restrictions:%v}", r.Verbs.List(), r.Resources.List(), r.ResourceNames.List(), r.AttributeRestrictions)
38 38
 }
39 39
 
40
-func getRoleBindingValues(roleBindingMap map[string]RoleBinding) []RoleBinding {
41
-	ret := []RoleBinding{}
40
+func getRoleBindingValues(roleBindingMap map[string]*RoleBinding) []*RoleBinding {
41
+	ret := []*RoleBinding{}
42 42
 	for _, currBinding := range roleBindingMap {
43 43
 		ret = append(ret, currBinding)
44 44
 	}
45 45
 
46 46
 	return ret
47 47
 }
48
-func SortRoleBindings(roleBindingMap map[string]RoleBinding, reverse bool) []RoleBinding {
48
+func SortRoleBindings(roleBindingMap map[string]*RoleBinding, reverse bool) []*RoleBinding {
49 49
 	roleBindings := getRoleBindingValues(roleBindingMap)
50 50
 	if reverse {
51 51
 		sort.Sort(sort.Reverse(RoleBindingSorter(roleBindings)))
... ...
@@ -68,7 +68,7 @@ func (s PolicyBindingSorter) Swap(i, j int) {
68 68
 	s[i], s[j] = s[j], s[i]
69 69
 }
70 70
 
71
-type RoleBindingSorter []RoleBinding
71
+type RoleBindingSorter []*RoleBinding
72 72
 
73 73
 func (s RoleBindingSorter) Len() int {
74 74
 	return len(s)
... ...
@@ -160,7 +160,7 @@ type Policy struct {
160 160
 	LastModified util.Time
161 161
 
162 162
 	// Roles holds all the Roles held by this Policy, mapped by Role.Name
163
-	Roles map[string]Role
163
+	Roles map[string]*Role
164 164
 }
165 165
 
166 166
 // PolicyBinding is a object that holds all the RoleBindings for a particular namespace.  There is
... ...
@@ -175,7 +175,7 @@ type PolicyBinding struct {
175 175
 	// PolicyRef is a reference to the Policy that contains all the Roles that this PolicyBinding's RoleBindings may reference
176 176
 	PolicyRef kapi.ObjectReference
177 177
 	// RoleBindings holds all the RoleBindings held by this PolicyBinding, mapped by RoleBinding.Name
178
-	RoleBindings map[string]RoleBinding
178
+	RoleBindings map[string]*RoleBinding
179 179
 }
180 180
 
181 181
 // ResourceAccessReviewResponse describes who can perform the action
... ...
@@ -308,7 +308,7 @@ type ClusterPolicy struct {
308 308
 	LastModified util.Time
309 309
 
310 310
 	// Roles holds all the ClusterRoles held by this ClusterPolicy, mapped by Role.Name
311
-	Roles map[string]ClusterRole
311
+	Roles map[string]*ClusterRole
312 312
 }
313 313
 
314 314
 // ClusterPolicyBinding is a object that holds all the ClusterRoleBindings for a particular namespace.  There is
... ...
@@ -323,7 +323,7 @@ type ClusterPolicyBinding struct {
323 323
 	// ClusterPolicyRef is a reference to the ClusterPolicy that contains all the ClusterRoles that this ClusterPolicyBinding's RoleBindings may reference
324 324
 	PolicyRef kapi.ObjectReference
325 325
 	// RoleBindings holds all the RoleBindings held by this ClusterPolicyBinding, mapped by RoleBinding.Name
326
-	RoleBindings map[string]ClusterRoleBinding
326
+	RoleBindings map[string]*ClusterRoleBinding
327 327
 }
328 328
 
329 329
 // ClusterPolicyList is a collection of ClusterPolicies
... ...
@@ -90,7 +90,7 @@ func convert_api_PolicyRule_To_v1_PolicyRule(in *newer.PolicyRule, out *PolicyRu
90 90
 
91 91
 func convert_v1_Policy_To_api_Policy(in *Policy, out *newer.Policy, s conversion.Scope) error {
92 92
 	out.LastModified = in.LastModified
93
-	out.Roles = make(map[string]newer.Role)
93
+	out.Roles = make(map[string]*newer.Role)
94 94
 	return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
95 95
 }
96 96
 
... ...
@@ -124,7 +124,7 @@ func convert_api_RoleBinding_To_v1_RoleBinding(in *newer.RoleBinding, out *RoleB
124 124
 
125 125
 func convert_v1_PolicyBinding_To_api_PolicyBinding(in *PolicyBinding, out *newer.PolicyBinding, s conversion.Scope) error {
126 126
 	out.LastModified = in.LastModified
127
-	out.RoleBindings = make(map[string]newer.RoleBinding)
127
+	out.RoleBindings = make(map[string]*newer.RoleBinding)
128 128
 	return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
129 129
 }
130 130
 
... ...
@@ -137,7 +137,7 @@ func convert_api_PolicyBinding_To_v1_PolicyBinding(in *newer.PolicyBinding, out
137 137
 // and now the globals
138 138
 func convert_v1_ClusterPolicy_To_api_ClusterPolicy(in *ClusterPolicy, out *newer.ClusterPolicy, s conversion.Scope) error {
139 139
 	out.LastModified = in.LastModified
140
-	out.Roles = make(map[string]newer.ClusterRole)
140
+	out.Roles = make(map[string]*newer.ClusterRole)
141 141
 	return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
142 142
 }
143 143
 
... ...
@@ -171,7 +171,7 @@ func convert_api_ClusterRoleBinding_To_v1_ClusterRoleBinding(in *newer.ClusterRo
171 171
 
172 172
 func convert_v1_ClusterPolicyBinding_To_api_ClusterPolicyBinding(in *ClusterPolicyBinding, out *newer.ClusterPolicyBinding, s conversion.Scope) error {
173 173
 	out.LastModified = in.LastModified
174
-	out.RoleBindings = make(map[string]newer.ClusterRoleBinding)
174
+	out.RoleBindings = make(map[string]*newer.ClusterRoleBinding)
175 175
 	return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
176 176
 }
177 177
 
... ...
@@ -183,18 +183,18 @@ func convert_api_ClusterPolicyBinding_To_v1_ClusterPolicyBinding(in *newer.Clust
183 183
 
184 184
 func init() {
185 185
 	err := api.Scheme.AddConversionFuncs(
186
-		func(in *[]NamedRole, out *map[string]newer.Role, s conversion.Scope) error {
186
+		func(in *[]NamedRole, out *map[string]*newer.Role, s conversion.Scope) error {
187 187
 			for _, curr := range *in {
188 188
 				newRole := &newer.Role{}
189 189
 				if err := s.Convert(&curr.Role, newRole, 0); err != nil {
190 190
 					return err
191 191
 				}
192
-				(*out)[curr.Name] = *newRole
192
+				(*out)[curr.Name] = newRole
193 193
 			}
194 194
 
195 195
 			return nil
196 196
 		},
197
-		func(in *map[string]newer.Role, out *[]NamedRole, s conversion.Scope) error {
197
+		func(in *map[string]*newer.Role, out *[]NamedRole, s conversion.Scope) error {
198 198
 			allKeys := make([]string, 0, len(*in))
199 199
 			for key := range *in {
200 200
 				allKeys = append(allKeys, key)
... ...
@@ -204,7 +204,7 @@ func init() {
204 204
 			for _, key := range allKeys {
205 205
 				newRole := (*in)[key]
206 206
 				oldRole := &Role{}
207
-				if err := s.Convert(&newRole, oldRole, 0); err != nil {
207
+				if err := s.Convert(newRole, oldRole, 0); err != nil {
208 208
 					return err
209 209
 				}
210 210
 
... ...
@@ -215,18 +215,18 @@ func init() {
215 215
 			return nil
216 216
 		},
217 217
 
218
-		func(in *[]NamedRoleBinding, out *map[string]newer.RoleBinding, s conversion.Scope) error {
218
+		func(in *[]NamedRoleBinding, out *map[string]*newer.RoleBinding, s conversion.Scope) error {
219 219
 			for _, curr := range *in {
220 220
 				newRoleBinding := &newer.RoleBinding{}
221 221
 				if err := s.Convert(&curr.RoleBinding, newRoleBinding, 0); err != nil {
222 222
 					return err
223 223
 				}
224
-				(*out)[curr.Name] = *newRoleBinding
224
+				(*out)[curr.Name] = newRoleBinding
225 225
 			}
226 226
 
227 227
 			return nil
228 228
 		},
229
-		func(in *map[string]newer.RoleBinding, out *[]NamedRoleBinding, s conversion.Scope) error {
229
+		func(in *map[string]*newer.RoleBinding, out *[]NamedRoleBinding, s conversion.Scope) error {
230 230
 			allKeys := make([]string, 0, len(*in))
231 231
 			for key := range *in {
232 232
 				allKeys = append(allKeys, key)
... ...
@@ -236,7 +236,7 @@ func init() {
236 236
 			for _, key := range allKeys {
237 237
 				newRoleBinding := (*in)[key]
238 238
 				oldRoleBinding := &RoleBinding{}
239
-				if err := s.Convert(&newRoleBinding, oldRoleBinding, 0); err != nil {
239
+				if err := s.Convert(newRoleBinding, oldRoleBinding, 0); err != nil {
240 240
 					return err
241 241
 				}
242 242
 
... ...
@@ -247,18 +247,18 @@ func init() {
247 247
 			return nil
248 248
 		},
249 249
 
250
-		func(in *[]NamedClusterRole, out *map[string]newer.ClusterRole, s conversion.Scope) error {
250
+		func(in *[]NamedClusterRole, out *map[string]*newer.ClusterRole, s conversion.Scope) error {
251 251
 			for _, curr := range *in {
252 252
 				newRole := &newer.ClusterRole{}
253 253
 				if err := s.Convert(&curr.Role, newRole, 0); err != nil {
254 254
 					return err
255 255
 				}
256
-				(*out)[curr.Name] = *newRole
256
+				(*out)[curr.Name] = newRole
257 257
 			}
258 258
 
259 259
 			return nil
260 260
 		},
261
-		func(in *map[string]newer.ClusterRole, out *[]NamedClusterRole, s conversion.Scope) error {
261
+		func(in *map[string]*newer.ClusterRole, out *[]NamedClusterRole, s conversion.Scope) error {
262 262
 			allKeys := make([]string, 0, len(*in))
263 263
 			for key := range *in {
264 264
 				allKeys = append(allKeys, key)
... ...
@@ -268,7 +268,7 @@ func init() {
268 268
 			for _, key := range allKeys {
269 269
 				newRole := (*in)[key]
270 270
 				oldRole := &ClusterRole{}
271
-				if err := s.Convert(&newRole, oldRole, 0); err != nil {
271
+				if err := s.Convert(newRole, oldRole, 0); err != nil {
272 272
 					return err
273 273
 				}
274 274
 
... ...
@@ -278,18 +278,18 @@ func init() {
278 278
 
279 279
 			return nil
280 280
 		},
281
-		func(in *[]NamedClusterRoleBinding, out *map[string]newer.ClusterRoleBinding, s conversion.Scope) error {
281
+		func(in *[]NamedClusterRoleBinding, out *map[string]*newer.ClusterRoleBinding, s conversion.Scope) error {
282 282
 			for _, curr := range *in {
283 283
 				newRoleBinding := &newer.ClusterRoleBinding{}
284 284
 				if err := s.Convert(&curr.RoleBinding, newRoleBinding, 0); err != nil {
285 285
 					return err
286 286
 				}
287
-				(*out)[curr.Name] = *newRoleBinding
287
+				(*out)[curr.Name] = newRoleBinding
288 288
 			}
289 289
 
290 290
 			return nil
291 291
 		},
292
-		func(in *map[string]newer.ClusterRoleBinding, out *[]NamedClusterRoleBinding, s conversion.Scope) error {
292
+		func(in *map[string]*newer.ClusterRoleBinding, out *[]NamedClusterRoleBinding, s conversion.Scope) error {
293 293
 			allKeys := make([]string, 0, len(*in))
294 294
 			for key := range *in {
295 295
 				allKeys = append(allKeys, key)
... ...
@@ -299,7 +299,7 @@ func init() {
299 299
 			for _, key := range allKeys {
300 300
 				newRoleBinding := (*in)[key]
301 301
 				oldRoleBinding := &ClusterRoleBinding{}
302
-				if err := s.Convert(&newRoleBinding, oldRoleBinding, 0); err != nil {
302
+				if err := s.Convert(newRoleBinding, oldRoleBinding, 0); err != nil {
303 303
 					return err
304 304
 				}
305 305
 
... ...
@@ -91,7 +91,7 @@ func convert_api_PolicyRule_To_v1beta3_PolicyRule(in *newer.PolicyRule, out *Pol
91 91
 
92 92
 func convert_v1beta3_Policy_To_api_Policy(in *Policy, out *newer.Policy, s conversion.Scope) error {
93 93
 	out.LastModified = in.LastModified
94
-	out.Roles = make(map[string]newer.Role)
94
+	out.Roles = make(map[string]*newer.Role)
95 95
 	return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
96 96
 }
97 97
 
... ...
@@ -125,7 +125,7 @@ func convert_api_RoleBinding_To_v1beta3_RoleBinding(in *newer.RoleBinding, out *
125 125
 
126 126
 func convert_v1beta3_PolicyBinding_To_api_PolicyBinding(in *PolicyBinding, out *newer.PolicyBinding, s conversion.Scope) error {
127 127
 	out.LastModified = in.LastModified
128
-	out.RoleBindings = make(map[string]newer.RoleBinding)
128
+	out.RoleBindings = make(map[string]*newer.RoleBinding)
129 129
 	return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
130 130
 }
131 131
 
... ...
@@ -138,7 +138,7 @@ func convert_api_PolicyBinding_To_v1beta3_PolicyBinding(in *newer.PolicyBinding,
138 138
 // and now the globals
139 139
 func convert_v1beta3_ClusterPolicy_To_api_ClusterPolicy(in *ClusterPolicy, out *newer.ClusterPolicy, s conversion.Scope) error {
140 140
 	out.LastModified = in.LastModified
141
-	out.Roles = make(map[string]newer.ClusterRole)
141
+	out.Roles = make(map[string]*newer.ClusterRole)
142 142
 	return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
143 143
 }
144 144
 
... ...
@@ -172,7 +172,7 @@ func convert_api_ClusterRoleBinding_To_v1beta3_ClusterRoleBinding(in *newer.Clus
172 172
 
173 173
 func convert_v1beta3_ClusterPolicyBinding_To_api_ClusterPolicyBinding(in *ClusterPolicyBinding, out *newer.ClusterPolicyBinding, s conversion.Scope) error {
174 174
 	out.LastModified = in.LastModified
175
-	out.RoleBindings = make(map[string]newer.ClusterRoleBinding)
175
+	out.RoleBindings = make(map[string]*newer.ClusterRoleBinding)
176 176
 	return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
177 177
 }
178 178
 
... ...
@@ -202,19 +202,19 @@ func init() {
202 202
 		convert_v1beta3_ClusterPolicyBinding_To_api_ClusterPolicyBinding,
203 203
 		convert_api_ClusterPolicyBinding_To_v1beta3_ClusterPolicyBinding,
204 204
 
205
-		func(in *[]NamedRoleBinding, out *map[string]newer.RoleBinding, s conversion.Scope) error {
205
+		func(in *[]NamedRoleBinding, out *map[string]*newer.RoleBinding, s conversion.Scope) error {
206 206
 			for _, curr := range *in {
207 207
 				newRoleBinding := &newer.RoleBinding{}
208 208
 				if err := s.Convert(&curr.RoleBinding, newRoleBinding, 0); err != nil {
209 209
 					return err
210 210
 				}
211
-				(*out)[curr.Name] = *newRoleBinding
211
+				(*out)[curr.Name] = newRoleBinding
212 212
 			}
213 213
 
214 214
 			return nil
215 215
 		},
216 216
 
217
-		func(in *map[string]newer.RoleBinding, out *[]NamedRoleBinding, s conversion.Scope) error {
217
+		func(in *map[string]*newer.RoleBinding, out *[]NamedRoleBinding, s conversion.Scope) error {
218 218
 			allKeys := make([]string, 0, len(*in))
219 219
 			for key := range *in {
220 220
 				allKeys = append(allKeys, key)
... ...
@@ -224,7 +224,7 @@ func init() {
224 224
 			for _, key := range allKeys {
225 225
 				newRoleBinding := (*in)[key]
226 226
 				oldRoleBinding := &RoleBinding{}
227
-				if err := s.Convert(&newRoleBinding, oldRoleBinding, 0); err != nil {
227
+				if err := s.Convert(newRoleBinding, oldRoleBinding, 0); err != nil {
228 228
 					return err
229 229
 				}
230 230
 
... ...
@@ -235,23 +235,23 @@ func init() {
235 235
 			return nil
236 236
 		},
237 237
 
238
-		func(in *[]NamedClusterRole, out *map[string]newer.ClusterRole, s conversion.Scope) error {
238
+		func(in *[]NamedClusterRole, out *map[string]*newer.ClusterRole, s conversion.Scope) error {
239 239
 			for _, curr := range *in {
240 240
 				newRole := &newer.ClusterRole{}
241 241
 				if err := s.Convert(&curr.Role, newRole, 0); err != nil {
242 242
 					return err
243 243
 				}
244 244
 				if *out == nil {
245
-					m := make(map[string]newer.ClusterRole)
245
+					m := make(map[string]*newer.ClusterRole)
246 246
 					*out = m
247 247
 				}
248
-				(*out)[curr.Name] = *newRole
248
+				(*out)[curr.Name] = newRole
249 249
 			}
250 250
 
251 251
 			return nil
252 252
 		},
253 253
 
254
-		func(in *map[string]newer.ClusterRole, out *[]NamedClusterRole, s conversion.Scope) error {
254
+		func(in *map[string]*newer.ClusterRole, out *[]NamedClusterRole, s conversion.Scope) error {
255 255
 			allKeys := make([]string, 0, len(*in))
256 256
 			for key := range *in {
257 257
 				allKeys = append(allKeys, key)
... ...
@@ -261,7 +261,7 @@ func init() {
261 261
 			for _, key := range allKeys {
262 262
 				newRole := (*in)[key]
263 263
 				oldRole := &ClusterRole{}
264
-				if err := s.Convert(&newRole, oldRole, 0); err != nil {
264
+				if err := s.Convert(newRole, oldRole, 0); err != nil {
265 265
 					return err
266 266
 				}
267 267
 
... ...
@@ -272,19 +272,19 @@ func init() {
272 272
 			return nil
273 273
 		},
274 274
 
275
-		func(in *[]NamedRole, out *map[string]newer.Role, s conversion.Scope) error {
275
+		func(in *[]NamedRole, out *map[string]*newer.Role, s conversion.Scope) error {
276 276
 			for _, curr := range *in {
277 277
 				newRole := &newer.Role{}
278 278
 				if err := s.Convert(&curr.Role, newRole, 0); err != nil {
279 279
 					return err
280 280
 				}
281
-				(*out)[curr.Name] = *newRole
281
+				(*out)[curr.Name] = newRole
282 282
 			}
283 283
 
284 284
 			return nil
285 285
 		},
286 286
 
287
-		func(in *map[string]newer.Role, out *[]NamedRole, s conversion.Scope) error {
287
+		func(in *map[string]*newer.Role, out *[]NamedRole, s conversion.Scope) error {
288 288
 			allKeys := make([]string, 0, len(*in))
289 289
 			for key := range *in {
290 290
 				allKeys = append(allKeys, key)
... ...
@@ -294,7 +294,7 @@ func init() {
294 294
 			for _, key := range allKeys {
295 295
 				newRole := (*in)[key]
296 296
 				oldRole := &Role{}
297
-				if err := s.Convert(&newRole, oldRole, 0); err != nil {
297
+				if err := s.Convert(newRole, oldRole, 0); err != nil {
298 298
 					return err
299 299
 				}
300 300
 
... ...
@@ -305,18 +305,18 @@ func init() {
305 305
 			return nil
306 306
 		},
307 307
 
308
-		func(in *[]NamedClusterRoleBinding, out *map[string]newer.ClusterRoleBinding, s conversion.Scope) error {
308
+		func(in *[]NamedClusterRoleBinding, out *map[string]*newer.ClusterRoleBinding, s conversion.Scope) error {
309 309
 			for _, curr := range *in {
310 310
 				newRoleBinding := &newer.ClusterRoleBinding{}
311 311
 				if err := s.Convert(&curr.RoleBinding, newRoleBinding, 0); err != nil {
312 312
 					return err
313 313
 				}
314
-				(*out)[curr.Name] = *newRoleBinding
314
+				(*out)[curr.Name] = newRoleBinding
315 315
 			}
316 316
 
317 317
 			return nil
318 318
 		},
319
-		func(in *map[string]newer.ClusterRoleBinding, out *[]NamedClusterRoleBinding, s conversion.Scope) error {
319
+		func(in *map[string]*newer.ClusterRoleBinding, out *[]NamedClusterRoleBinding, s conversion.Scope) error {
320 320
 			allKeys := make([]string, 0, len(*in))
321 321
 			for key := range *in {
322 322
 				allKeys = append(allKeys, key)
... ...
@@ -326,7 +326,7 @@ func init() {
326 326
 			for _, key := range allKeys {
327 327
 				newRoleBinding := (*in)[key]
328 328
 				oldRoleBinding := &ClusterRoleBinding{}
329
-				if err := s.Convert(&newRoleBinding, oldRoleBinding, 0); err != nil {
329
+				if err := s.Convert(newRoleBinding, oldRoleBinding, 0); err != nil {
330 330
 					return err
331 331
 				}
332 332
 
... ...
@@ -72,7 +72,7 @@ func ValidatePolicy(policy *authorizationapi.Policy, isNamespaced bool) fielderr
72 72
 			allErrs = append(allErrs, fielderrors.NewFieldInvalid("roles."+roleKey+".metadata.name", role.Name, "must be "+roleKey))
73 73
 		}
74 74
 
75
-		allErrs = append(allErrs, ValidateRole(&role, isNamespaced).Prefix("roles."+roleKey)...)
75
+		allErrs = append(allErrs, ValidateRole(role, isNamespaced).Prefix("roles."+roleKey)...)
76 76
 	}
77 77
 
78 78
 	return allErrs
... ...
@@ -134,7 +134,7 @@ func ValidatePolicyBinding(policyBinding *authorizationapi.PolicyBinding, isName
134 134
 			allErrs = append(allErrs, fielderrors.NewFieldInvalid("roleBindings."+roleBindingKey+".metadata.name", roleBinding.Name, "must be "+roleBindingKey))
135 135
 		}
136 136
 
137
-		allErrs = append(allErrs, ValidateRoleBinding(&roleBinding, isNamespaced).Prefix("roleBindings."+roleBindingKey)...)
137
+		allErrs = append(allErrs, ValidateRoleBinding(roleBinding, isNamespaced).Prefix("roleBindings."+roleBindingKey)...)
138 138
 	}
139 139
 
140 140
 	return allErrs
... ...
@@ -49,7 +49,7 @@ func TestValidatePolicy(t *testing.T) {
49 49
 		"mismatched name": {
50 50
 			A: authorizationapi.Policy{
51 51
 				ObjectMeta: kapi.ObjectMeta{Namespace: kapi.NamespaceDefault, Name: authorizationapi.PolicyName},
52
-				Roles: map[string]authorizationapi.Role{
52
+				Roles: map[string]*authorizationapi.Role{
53 53
 					"any1": {
54 54
 						ObjectMeta: kapi.ObjectMeta{Namespace: kapi.NamespaceDefault, Name: "any"},
55 55
 					},
... ...
@@ -121,7 +121,7 @@ func TestValidatePolicyBinding(t *testing.T) {
121 121
 			A: authorizationapi.PolicyBinding{
122 122
 				ObjectMeta: kapi.ObjectMeta{Namespace: kapi.NamespaceDefault, Name: authorizationapi.GetPolicyBindingName(authorizationapi.PolicyName)},
123 123
 				PolicyRef:  kapi.ObjectReference{Namespace: authorizationapi.PolicyName},
124
-				RoleBindings: map[string]authorizationapi.RoleBinding{
124
+				RoleBindings: map[string]*authorizationapi.RoleBinding{
125 125
 					"any": {
126 126
 						ObjectMeta: kapi.ObjectMeta{Namespace: kapi.NamespaceDefault, Name: "any"},
127 127
 						RoleRef:    kapi.ObjectReference{Namespace: authorizationapi.PolicyName},
... ...
@@ -135,7 +135,7 @@ func TestValidatePolicyBinding(t *testing.T) {
135 135
 			A: authorizationapi.PolicyBinding{
136 136
 				ObjectMeta: kapi.ObjectMeta{Namespace: kapi.NamespaceDefault, Name: authorizationapi.GetPolicyBindingName(authorizationapi.PolicyName)},
137 137
 				PolicyRef:  kapi.ObjectReference{Namespace: authorizationapi.PolicyName},
138
-				RoleBindings: map[string]authorizationapi.RoleBinding{
138
+				RoleBindings: map[string]*authorizationapi.RoleBinding{
139 139
 					"any1": {
140 140
 						ObjectMeta: kapi.ObjectMeta{Namespace: kapi.NamespaceDefault, Name: "any"},
141 141
 						RoleRef:    kapi.ObjectReference{Namespace: authorizationapi.PolicyName, Name: "valid"},
... ...
@@ -81,7 +81,7 @@ func TestDeniedWithError(t *testing.T) {
81 81
 	test.policies = append(test.policies, newAdzePolicies()...)
82 82
 	test.clusterBindings = newDefaultClusterPolicyBindings()
83 83
 	test.bindings = append(test.bindings, newAdzeBindings()...)
84
-	test.bindings[0].RoleBindings["missing"] = authorizationapi.RoleBinding{
84
+	test.bindings[0].RoleBindings["missing"] = &authorizationapi.RoleBinding{
85 85
 		ObjectMeta: kapi.ObjectMeta{
86 86
 			Name: "missing",
87 87
 		},
... ...
@@ -109,7 +109,7 @@ func TestAllowedWithMissingBinding(t *testing.T) {
109 109
 	test.policies = append(test.policies, newAdzePolicies()...)
110 110
 	test.clusterBindings = newDefaultClusterPolicyBindings()
111 111
 	test.bindings = append(test.bindings, newAdzeBindings()...)
112
-	test.bindings[0].RoleBindings["missing"] = authorizationapi.RoleBinding{
112
+	test.bindings[0].RoleBindings["missing"] = &authorizationapi.RoleBinding{
113 113
 		ObjectMeta: kapi.ObjectMeta{
114 114
 			Name: "missing",
115 115
 		},
... ...
@@ -440,7 +440,7 @@ func newDefaultClusterPolicyBindings() []authorizationapi.ClusterPolicyBinding {
440 440
 		ObjectMeta: kapi.ObjectMeta{
441 441
 			Name: authorizationapi.ClusterPolicyBindingName,
442 442
 		},
443
-		RoleBindings: map[string]authorizationapi.ClusterRoleBinding{
443
+		RoleBindings: map[string]*authorizationapi.ClusterRoleBinding{
444 444
 			"extra-cluster-admins": {
445 445
 				ObjectMeta: kapi.ObjectMeta{
446 446
 					Name: "cluster-admins",
... ...
@@ -475,7 +475,7 @@ func newAdzePolicies() []authorizationapi.Policy {
475 475
 				Name:      authorizationapi.PolicyName,
476 476
 				Namespace: "adze",
477 477
 			},
478
-			Roles: map[string]authorizationapi.Role{
478
+			Roles: map[string]*authorizationapi.Role{
479 479
 				"restrictedViewer": {
480 480
 					ObjectMeta: kapi.ObjectMeta{
481 481
 						Name:      "admin",
... ...
@@ -497,7 +497,7 @@ func newAdzeBindings() []authorizationapi.PolicyBinding {
497 497
 				Name:      authorizationapi.ClusterPolicyBindingName,
498 498
 				Namespace: "adze",
499 499
 			},
500
-			RoleBindings: map[string]authorizationapi.RoleBinding{
500
+			RoleBindings: map[string]*authorizationapi.RoleBinding{
501 501
 				"projectAdmins": {
502 502
 					ObjectMeta: kapi.ObjectMeta{
503 503
 						Name:      "projectAdmins",
... ...
@@ -535,7 +535,7 @@ func newAdzeBindings() []authorizationapi.PolicyBinding {
535 535
 				Name:      authorizationapi.GetPolicyBindingName("adze"),
536 536
 				Namespace: "adze",
537 537
 			},
538
-			RoleBindings: map[string]authorizationapi.RoleBinding{
538
+			RoleBindings: map[string]*authorizationapi.RoleBinding{
539 539
 				"restrictedViewers": {
540 540
 					ObjectMeta: kapi.ObjectMeta{
541 541
 						Name:      "restrictedViewers",
... ...
@@ -444,7 +444,7 @@ func newMalletPolicies() []authorizationapi.Policy {
444 444
 				Name:      authorizationapi.PolicyName,
445 445
 				Namespace: "mallet",
446 446
 			},
447
-			Roles: map[string]authorizationapi.Role{},
447
+			Roles: map[string]*authorizationapi.Role{},
448 448
 		}}
449 449
 }
450 450
 func newMalletBindings() []authorizationapi.PolicyBinding {
... ...
@@ -454,7 +454,7 @@ func newMalletBindings() []authorizationapi.PolicyBinding {
454 454
 				Name:      authorizationapi.ClusterPolicyBindingName,
455 455
 				Namespace: "mallet",
456 456
 			},
457
-			RoleBindings: map[string]authorizationapi.RoleBinding{
457
+			RoleBindings: map[string]*authorizationapi.RoleBinding{
458 458
 				"projectAdmins": {
459 459
 					ObjectMeta: kapi.ObjectMeta{
460 460
 						Name:      "projectAdmins",
... ...
@@ -496,7 +496,7 @@ func newInvalidExtensionPolicies() []authorizationapi.Policy {
496 496
 				Name:      authorizationapi.PolicyName,
497 497
 				Namespace: "mallet",
498 498
 			},
499
-			Roles: map[string]authorizationapi.Role{
499
+			Roles: map[string]*authorizationapi.Role{
500 500
 				"badExtension": {
501 501
 					ObjectMeta: kapi.ObjectMeta{
502 502
 						Name:      "failure",
... ...
@@ -524,7 +524,7 @@ func newInvalidExtensionBindings() []authorizationapi.PolicyBinding {
524 524
 				Name:      "mallet",
525 525
 				Namespace: "mallet",
526 526
 			},
527
-			RoleBindings: map[string]authorizationapi.RoleBinding{
527
+			RoleBindings: map[string]*authorizationapi.RoleBinding{
528 528
 				"borked": {
529 529
 					ObjectMeta: kapi.ObjectMeta{
530 530
 						Name:      "borked",
... ...
@@ -549,11 +549,12 @@ func GetBootstrapPolicy() *authorizationapi.ClusterPolicy {
549 549
 			UID:               util.NewUUID(),
550 550
 		},
551 551
 		LastModified: util.Now(),
552
-		Roles:        make(map[string]authorizationapi.ClusterRole),
552
+		Roles:        make(map[string]*authorizationapi.ClusterRole),
553 553
 	}
554 554
 
555
-	for _, role := range bootstrappolicy.GetBootstrapClusterRoles() {
556
-		policy.Roles[role.Name] = role
555
+	roles := bootstrappolicy.GetBootstrapClusterRoles()
556
+	for i := range roles {
557
+		policy.Roles[roles[i].Name] = &roles[i]
557 558
 	}
558 559
 
559 560
 	return policy
... ...
@@ -567,11 +568,12 @@ func GetBootstrapPolicyBinding() *authorizationapi.ClusterPolicyBinding {
567 567
 			UID:               util.NewUUID(),
568 568
 		},
569 569
 		LastModified: util.Now(),
570
-		RoleBindings: make(map[string]authorizationapi.ClusterRoleBinding),
570
+		RoleBindings: make(map[string]*authorizationapi.ClusterRoleBinding),
571 571
 	}
572 572
 
573
-	for _, roleBinding := range bootstrappolicy.GetBootstrapClusterRoleBindings() {
574
-		policyBinding.RoleBindings[roleBinding.Name] = roleBinding
573
+	bindings := bootstrappolicy.GetBootstrapClusterRoleBindings()
574
+	for i := range bindings {
575
+		policyBinding.RoleBindings[bindings[i].Name] = &bindings[i]
575 576
 	}
576 577
 
577 578
 	return policyBinding
... ...
@@ -103,7 +103,7 @@ func NewEmptyPolicyBinding(namespace, policyNamespace, policyBindingName string)
103 103
 	binding.CreationTimestamp = util.Now()
104 104
 	binding.LastModified = util.Now()
105 105
 	binding.PolicyRef = kapi.ObjectReference{Name: authorizationapi.PolicyName, Namespace: policyNamespace}
106
-	binding.RoleBindings = make(map[string]authorizationapi.RoleBinding)
106
+	binding.RoleBindings = make(map[string]*authorizationapi.RoleBinding)
107 107
 
108 108
 	return binding
109 109
 }
... ...
@@ -49,7 +49,7 @@ func (m *VirtualStorage) List(ctx kapi.Context, label labels.Selector, field fie
49 49
 	for _, policy := range policyList.Items {
50 50
 		for _, role := range policy.Roles {
51 51
 			if label.Matches(labels.Set(role.Labels)) {
52
-				roleList.Items = append(roleList.Items, role)
52
+				roleList.Items = append(roleList.Items, *role)
53 53
 			}
54 54
 		}
55 55
 	}
... ...
@@ -71,7 +71,7 @@ func (m *VirtualStorage) Get(ctx kapi.Context, name string) (runtime.Object, err
71 71
 		return nil, kapierrors.NewNotFound("Role", name)
72 72
 	}
73 73
 
74
-	return &role, nil
74
+	return role, nil
75 75
 }
76 76
 
77 77
 // Delete(ctx api.Context, name string) (runtime.Object, error)
... ...
@@ -113,7 +113,7 @@ func (m *VirtualStorage) Create(ctx kapi.Context, obj runtime.Object) (runtime.O
113 113
 	}
114 114
 
115 115
 	role.ResourceVersion = policy.ResourceVersion
116
-	policy.Roles[role.Name] = *role
116
+	policy.Roles[role.Name] = role
117 117
 	policy.LastModified = util.Now()
118 118
 
119 119
 	if err := m.PolicyStorage.UpdatePolicy(ctx, policy); err != nil {
... ...
@@ -151,7 +151,7 @@ func (m *VirtualStorage) Update(ctx kapi.Context, obj runtime.Object) (runtime.O
151 151
 	}
152 152
 
153 153
 	role.ResourceVersion = policy.ResourceVersion
154
-	policy.Roles[role.Name] = *role
154
+	policy.Roles[role.Name] = role
155 155
 	policy.LastModified = util.Now()
156 156
 
157 157
 	if err := m.PolicyStorage.UpdatePolicy(ctx, policy); err != nil {
... ...
@@ -183,7 +183,7 @@ func (m *VirtualStorage) EnsurePolicy(ctx kapi.Context) (*authorizationapi.Polic
183 183
 	}
184 184
 
185 185
 	if policy.Roles == nil {
186
-		policy.Roles = make(map[string]authorizationapi.Role)
186
+		policy.Roles = make(map[string]*authorizationapi.Role)
187 187
 	}
188 188
 
189 189
 	return policy, nil
... ...
@@ -195,7 +195,7 @@ func NewEmptyPolicy(namespace string) *authorizationapi.Policy {
195 195
 	policy.Namespace = namespace
196 196
 	policy.CreationTimestamp = util.Now()
197 197
 	policy.LastModified = util.Now()
198
-	policy.Roles = make(map[string]authorizationapi.Role)
198
+	policy.Roles = make(map[string]*authorizationapi.Role)
199 199
 
200 200
 	return policy
201 201
 }
... ...
@@ -18,7 +18,7 @@ func testNewClusterPolicies() []authorizationapi.ClusterPolicy {
18 18
 	return []authorizationapi.ClusterPolicy{
19 19
 		{
20 20
 			ObjectMeta: kapi.ObjectMeta{Name: authorizationapi.PolicyName},
21
-			Roles: map[string]authorizationapi.ClusterRole{
21
+			Roles: map[string]*authorizationapi.ClusterRole{
22 22
 				"cluster-admin": {
23 23
 					ObjectMeta: kapi.ObjectMeta{Name: "cluster-admin"},
24 24
 					Rules:      []authorizationapi.PolicyRule{{Verbs: util.NewStringSet("*"), Resources: util.NewStringSet("*")}},
... ...
@@ -35,7 +35,7 @@ func testNewLocalPolicies() []authorizationapi.Policy {
35 35
 	return []authorizationapi.Policy{
36 36
 		{
37 37
 			ObjectMeta: kapi.ObjectMeta{Name: authorizationapi.PolicyName, Namespace: "unittest"},
38
-			Roles:      map[string]authorizationapi.Role{},
38
+			Roles:      map[string]*authorizationapi.Role{},
39 39
 		},
40 40
 	}
41 41
 }
... ...
@@ -63,7 +63,7 @@ func (m *VirtualStorage) List(ctx kapi.Context, label labels.Selector, field fie
63 63
 	for _, policyBinding := range policyBindingList.Items {
64 64
 		for _, roleBinding := range policyBinding.RoleBindings {
65 65
 			if label.Matches(labels.Set(roleBinding.Labels)) {
66
-				roleBindingList.Items = append(roleBindingList.Items, roleBinding)
66
+				roleBindingList.Items = append(roleBindingList.Items, *roleBinding)
67 67
 			}
68 68
 		}
69 69
 	}
... ...
@@ -84,7 +84,7 @@ func (m *VirtualStorage) Get(ctx kapi.Context, name string) (runtime.Object, err
84 84
 	if !exists {
85 85
 		return nil, kapierrors.NewNotFound("RoleBinding", name)
86 86
 	}
87
-	return &binding, nil
87
+	return binding, nil
88 88
 }
89 89
 
90 90
 func (m *VirtualStorage) Delete(ctx kapi.Context, name string, options *kapi.DeleteOptions) (runtime.Object, error) {
... ...
@@ -145,7 +145,7 @@ func (m *VirtualStorage) createRoleBinding(ctx kapi.Context, obj runtime.Object,
145 145
 	}
146 146
 
147 147
 	roleBinding.ResourceVersion = policyBinding.ResourceVersion
148
-	policyBinding.RoleBindings[roleBinding.Name] = *roleBinding
148
+	policyBinding.RoleBindings[roleBinding.Name] = roleBinding
149 149
 	policyBinding.LastModified = util.Now()
150 150
 
151 151
 	if err := m.BindingRegistry.UpdatePolicyBinding(ctx, policyBinding); err != nil {
... ...
@@ -200,7 +200,7 @@ func (m *VirtualStorage) updateRoleBinding(ctx kapi.Context, obj runtime.Object,
200 200
 	}
201 201
 
202 202
 	roleBinding.ResourceVersion = policyBinding.ResourceVersion
203
-	policyBinding.RoleBindings[roleBinding.Name] = *roleBinding
203
+	policyBinding.RoleBindings[roleBinding.Name] = roleBinding
204 204
 	policyBinding.LastModified = util.Now()
205 205
 
206 206
 	if err := m.BindingRegistry.UpdatePolicyBinding(ctx, policyBinding); err != nil {
... ...
@@ -240,7 +240,7 @@ func (m *VirtualStorage) getReferencedRole(roleRef kapi.ObjectReference) (*autho
240 240
 		return nil, kapierrors.NewNotFound("Role", roleRef.Name)
241 241
 	}
242 242
 
243
-	return &role, nil
243
+	return role, nil
244 244
 }
245 245
 
246 246
 func (m *VirtualStorage) confirmNoEscalation(ctx kapi.Context, roleBinding *authorizationapi.RoleBinding) error {
... ...
@@ -299,7 +299,7 @@ func (m *VirtualStorage) ensurePolicyBindingToMaster(ctx kapi.Context, policyNam
299 299
 	}
300 300
 
301 301
 	if policyBinding.RoleBindings == nil {
302
-		policyBinding.RoleBindings = make(map[string]authorizationapi.RoleBinding)
302
+		policyBinding.RoleBindings = make(map[string]*authorizationapi.RoleBinding)
303 303
 	}
304 304
 
305 305
 	return policyBinding, nil
... ...
@@ -319,7 +319,7 @@ func (m *VirtualStorage) getPolicyBindingForPolicy(ctx kapi.Context, policyNames
319 319
 	}
320 320
 
321 321
 	if policyBinding.RoleBindings == nil {
322
-		policyBinding.RoleBindings = make(map[string]authorizationapi.RoleBinding)
322
+		policyBinding.RoleBindings = make(map[string]*authorizationapi.RoleBinding)
323 323
 	}
324 324
 
325 325
 	return policyBinding, nil
... ...
@@ -22,7 +22,7 @@ func testNewClusterPolicies() []authorizationapi.ClusterPolicy {
22 22
 	return []authorizationapi.ClusterPolicy{
23 23
 		{
24 24
 			ObjectMeta: kapi.ObjectMeta{Name: authorizationapi.PolicyName},
25
-			Roles: map[string]authorizationapi.ClusterRole{
25
+			Roles: map[string]*authorizationapi.ClusterRole{
26 26
 				"cluster-admin": {
27 27
 					ObjectMeta: kapi.ObjectMeta{Name: "cluster-admin"},
28 28
 					Rules:      []authorizationapi.PolicyRule{{Verbs: util.NewStringSet("*"), Resources: util.NewStringSet("*")}},
... ...
@@ -40,7 +40,7 @@ func testNewClusterBindings() []authorizationapi.ClusterPolicyBinding {
40 40
 	return []authorizationapi.ClusterPolicyBinding{
41 41
 		{
42 42
 			ObjectMeta: kapi.ObjectMeta{Name: authorizationapi.ClusterPolicyBindingName},
43
-			RoleBindings: map[string]authorizationapi.ClusterRoleBinding{
43
+			RoleBindings: map[string]*authorizationapi.ClusterRoleBinding{
44 44
 				"cluster-admins": {
45 45
 					ObjectMeta: kapi.ObjectMeta{Name: "cluster-admins"},
46 46
 					RoleRef:    kapi.ObjectReference{Name: "cluster-admin"},
... ...
@@ -54,7 +54,7 @@ func testNewLocalBindings() []authorizationapi.PolicyBinding {
54 54
 	return []authorizationapi.PolicyBinding{
55 55
 		{
56 56
 			ObjectMeta:   kapi.ObjectMeta{Name: authorizationapi.GetPolicyBindingName("unittest"), Namespace: "unittest"},
57
-			RoleBindings: map[string]authorizationapi.RoleBinding{},
57
+			RoleBindings: map[string]*authorizationapi.RoleBinding{},
58 58
 		},
59 59
 	}
60 60
 }
... ...
@@ -28,8 +28,8 @@ func NewDefaultRuleResolver(policyGetter PolicyGetter, bindingLister BindingList
28 28
 }
29 29
 
30 30
 type AuthorizationRuleResolver interface {
31
-	GetRoleBindings(ctx kapi.Context) ([]authorizationapi.RoleBinding, error)
32
-	GetRole(roleBinding authorizationapi.RoleBinding) (*authorizationapi.Role, error)
31
+	GetRoleBindings(ctx kapi.Context) ([]*authorizationapi.RoleBinding, error)
32
+	GetRole(roleBinding *authorizationapi.RoleBinding) (*authorizationapi.Role, error)
33 33
 	// GetEffectivePolicyRules returns the list of rules that apply to a given user in a given namespace and error.  If an error is returned, the slice of
34 34
 	// PolicyRules may not be complete, but it contains all retrievable rules.  This is done because policy rules are purely additive and policy determinations
35 35
 	// can be made on the basis of those rules that are found.
... ...
@@ -83,13 +83,13 @@ func (a *DefaultRuleResolver) getPolicyBindings(ctx kapi.Context) ([]authorizati
83 83
 	return policyBindingList.Items, nil
84 84
 }
85 85
 
86
-func (a *DefaultRuleResolver) GetRoleBindings(ctx kapi.Context) ([]authorizationapi.RoleBinding, error) {
86
+func (a *DefaultRuleResolver) GetRoleBindings(ctx kapi.Context) ([]*authorizationapi.RoleBinding, error) {
87 87
 	policyBindings, err := a.getPolicyBindings(ctx)
88 88
 	if err != nil {
89 89
 		return nil, err
90 90
 	}
91 91
 
92
-	ret := make([]authorizationapi.RoleBinding, 0, len(policyBindings))
92
+	ret := make([]*authorizationapi.RoleBinding, 0, len(policyBindings))
93 93
 	for _, policyBinding := range policyBindings {
94 94
 		for _, value := range policyBinding.RoleBindings {
95 95
 			ret = append(ret, value)
... ...
@@ -99,7 +99,7 @@ func (a *DefaultRuleResolver) GetRoleBindings(ctx kapi.Context) ([]authorization
99 99
 	return ret, nil
100 100
 }
101 101
 
102
-func (a *DefaultRuleResolver) GetRole(roleBinding authorizationapi.RoleBinding) (*authorizationapi.Role, error) {
102
+func (a *DefaultRuleResolver) GetRole(roleBinding *authorizationapi.RoleBinding) (*authorizationapi.Role, error) {
103 103
 	namespace := roleBinding.RoleRef.Namespace
104 104
 	name := roleBinding.RoleRef.Name
105 105
 
... ...
@@ -117,7 +117,7 @@ func (a *DefaultRuleResolver) GetRole(roleBinding authorizationapi.RoleBinding)
117 117
 		return nil, fmt.Errorf("role %#v not found", roleBinding.RoleRef)
118 118
 	}
119 119
 
120
-	return &role, nil
120
+	return role, nil
121 121
 }
122 122
 
123 123
 // GetEffectivePolicyRules returns the list of rules that apply to a given user in a given namespace and error.  If an error is returned, the slice of
... ...
@@ -99,7 +99,7 @@ func (a LocalRoleBindingAccessor) GetExistingRoleBindingsForRole(roleNamespace,
99 99
 	for _, currBinding := range existingBindings.RoleBindings {
100 100
 		if currBinding.RoleRef.Name == role {
101 101
 			t := currBinding
102
-			ret = append(ret, &t)
102
+			ret = append(ret, t)
103 103
 		}
104 104
 	}
105 105
 
... ...
@@ -155,7 +155,7 @@ func (a ClusterRoleBindingAccessor) GetExistingRoleBindingsForRole(roleNamespace
155 155
 	for _, currBinding := range existingBindings.RoleBindings {
156 156
 		if currBinding.RoleRef.Name == role {
157 157
 			t := currBinding
158
-			ret = append(ret, &t)
158
+			ret = append(ret, t)
159 159
 		}
160 160
 	}
161 161
 
... ...
@@ -118,7 +118,7 @@ func (o *RemoveFromProjectOptions) Run() error {
118 118
 			currBinding.Groups.Delete(o.Groups...)
119 119
 			currBinding.Users.Delete(o.Users...)
120 120
 
121
-			_, err = o.Client.RoleBindings(o.BindingNamespace).Update(&currBinding)
121
+			_, err = o.Client.RoleBindings(o.BindingNamespace).Update(currBinding)
122 122
 			if err != nil {
123 123
 				return err
124 124
 			}