mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Merge pull request #31543 from deads2k/rbac-06-change-role-ref
Automatic merge from submit-queue Change rbac roleref to reflect the information we want @liggitt @ericchiang This is a version of https://github.com/kubernetes/kubernetes/pull/31359 which updates the `RoleRef` to be (I think) the type that we want, with a group, resource, and name. This is **not** backwards compatible with any existing data. I'm ok with doing this since rbac was considered alpha, but its something to consider. If we want this instead, I'll close the previous pull (or update it with this content).
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/apis/autoscaling"
|
||||
"k8s.io/kubernetes/pkg/apis/batch"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
"k8s.io/kubernetes/pkg/apis/rbac"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
@@ -498,6 +499,14 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source)
|
||||
}
|
||||
}
|
||||
},
|
||||
func(r *rbac.RoleRef, c fuzz.Continue) {
|
||||
c.FuzzNoCustom(r) // fuzz self without calling this function again
|
||||
|
||||
// match defaulter
|
||||
if len(r.APIGroup) == 0 {
|
||||
r.APIGroup = rbac.GroupName
|
||||
}
|
||||
},
|
||||
func(r *runtime.RawExtension, c fuzz.Continue) {
|
||||
// Pick an arbitrary type and fuzz it
|
||||
types := []runtime.Object{&api.Pod{}, &extensions.Deployment{}, &api.Service{}}
|
||||
|
||||
Reference in New Issue
Block a user