Add new Events API group

This commit is contained in:
gmarek
2017-09-13 16:46:26 +02:00
committed by Marek Grabowski
parent 2a724dfc9c
commit 69e2a9cb48
37 changed files with 1046 additions and 17 deletions

View File

@@ -19,10 +19,12 @@ package fuzzer
import (
"reflect"
"strconv"
"time"
fuzz "github.com/google/gofuzz"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
@@ -483,5 +485,12 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
c.FuzzNoCustom(s)
s.Allocatable = s.Capacity
},
func(e *core.Event, c fuzz.Continue) {
c.FuzzNoCustom(e)
e.EventTime = metav1.MicroTime{Time: time.Unix(1, 1000)}
if e.Series != nil {
e.Series.LastObservedTime = metav1.MicroTime{Time: time.Unix(3, 3000)}
}
},
}
}