Upgrade AdmissionReview e2e test image to also support v1
This commit is contained in:
@@ -17,10 +17,23 @@ limitations under the License.
|
||||
package fuzzer
|
||||
|
||||
import (
|
||||
fuzz "github.com/google/gofuzz"
|
||||
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
)
|
||||
|
||||
// Funcs returns the fuzzer functions for the admission api group.
|
||||
var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
return []interface{}{}
|
||||
return []interface{}{
|
||||
func(s *runtime.RawExtension, c fuzz.Continue) {
|
||||
u := &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"apiVersion": "unknown.group/unknown",
|
||||
"kind": "Something",
|
||||
"somekey": "somevalue",
|
||||
}}
|
||||
s.Object = u
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user