Upgrade AdmissionReview e2e test image to also support v1

This commit is contained in:
Joe Betz
2019-08-11 13:15:33 -07:00
parent f4e39afea0
commit 4f7543e42a
18 changed files with 353 additions and 105 deletions

View File

@@ -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
},
}
}