diff --git a/Gopkg.lock b/Gopkg.lock index aee4eba493..4427aae777 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1291,12 +1291,52 @@ [[projects]] branch = "release-7.0" - digest = "1:5064f9f20f6bf1159e22248e1032530f6a97866edb768e37390b42dd579226cf" + digest = "1:6e37d35d68d68b1368b803617d346633830eb13b50120f68ead2c029c05eeea0" name = "k8s.io/client-go" packages = [ "discovery", "discovery/fake", "dynamic", + "informers", + "informers/admissionregistration", + "informers/admissionregistration/v1alpha1", + "informers/admissionregistration/v1beta1", + "informers/apps", + "informers/apps/v1", + "informers/apps/v1beta1", + "informers/apps/v1beta2", + "informers/autoscaling", + "informers/autoscaling/v1", + "informers/autoscaling/v2beta1", + "informers/batch", + "informers/batch/v1", + "informers/batch/v1beta1", + "informers/batch/v2alpha1", + "informers/certificates", + "informers/certificates/v1beta1", + "informers/core", + "informers/core/v1", + "informers/events", + "informers/events/v1beta1", + "informers/extensions", + "informers/extensions/v1beta1", + "informers/internalinterfaces", + "informers/networking", + "informers/networking/v1", + "informers/policy", + "informers/policy/v1beta1", + "informers/rbac", + "informers/rbac/v1", + "informers/rbac/v1alpha1", + "informers/rbac/v1beta1", + "informers/scheduling", + "informers/scheduling/v1alpha1", + "informers/settings", + "informers/settings/v1alpha1", + "informers/storage", + "informers/storage/v1", + "informers/storage/v1alpha1", + "informers/storage/v1beta1", "kubernetes", "kubernetes/fake", "kubernetes/scheme", @@ -1356,6 +1396,30 @@ "kubernetes/typed/storage/v1alpha1/fake", "kubernetes/typed/storage/v1beta1", "kubernetes/typed/storage/v1beta1/fake", + "listers/admissionregistration/v1alpha1", + "listers/admissionregistration/v1beta1", + "listers/apps/v1", + "listers/apps/v1beta1", + "listers/apps/v1beta2", + "listers/autoscaling/v1", + "listers/autoscaling/v2beta1", + "listers/batch/v1", + "listers/batch/v1beta1", + "listers/batch/v2alpha1", + "listers/certificates/v1beta1", + "listers/core/v1", + "listers/events/v1beta1", + "listers/extensions/v1beta1", + "listers/networking/v1", + "listers/policy/v1beta1", + "listers/rbac/v1", + "listers/rbac/v1alpha1", + "listers/rbac/v1beta1", + "listers/scheduling/v1alpha1", + "listers/settings/v1alpha1", + "listers/storage/v1", + "listers/storage/v1alpha1", + "listers/storage/v1beta1", "pkg/apis/clientauthentication", "pkg/apis/clientauthentication/v1alpha1", "pkg/version", @@ -1515,6 +1579,7 @@ "gopkg.in/src-d/go-git.v4/plumbing/transport/ssh", "k8s.io/api/core/v1", "k8s.io/apimachinery/pkg/api/errors", + "k8s.io/apimachinery/pkg/api/meta", "k8s.io/apimachinery/pkg/apis/meta/v1", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "k8s.io/apimachinery/pkg/fields", @@ -1530,6 +1595,8 @@ "k8s.io/client-go/discovery", "k8s.io/client-go/discovery/fake", "k8s.io/client-go/dynamic", + "k8s.io/client-go/informers", + "k8s.io/client-go/informers/core/v1", "k8s.io/client-go/kubernetes", "k8s.io/client-go/kubernetes/fake", "k8s.io/client-go/kubernetes/scheme", diff --git a/common/common.go b/common/common.go index 606e7e1eb7..f09f788692 100644 --- a/common/common.go +++ b/common/common.go @@ -60,6 +60,9 @@ const ( // EnvVarSensorControllerConfigMap is the name of the configmap to use for the sensor-controller EnvVarSensorControllerConfigMap = "SENSOR_CONFIG_MAP" + + // AnnotationSensorResourceSpecHashName is the annotation of a sensor resource spec hash + AnnotationSensorResourceSpecHashName = sensor.FullName + "/resource-spec-hash" ) // SENSOR CONSTANTS @@ -125,6 +128,9 @@ const ( // LabelGatewayEventSourceID is the label for gateway configuration ID LabelGatewayEventSourceID = "event-source-id" + // AnnotationGatewayResourceSpecHashName is the annotation of a gateway resource spec hash + AnnotationGatewayResourceSpecHashName = gateway.FullName + "/resource-spec-hash" + // Server Connection Timeout, 10 seconds ServerConnTimeout = 10 ) diff --git a/common/util.go b/common/util.go index e430c86a6e..66c6f6168f 100644 --- a/common/util.go +++ b/common/util.go @@ -17,7 +17,9 @@ limitations under the License. package common import ( + "encoding/json" "fmt" + "hash/fnv" "os" "time" @@ -108,3 +110,19 @@ func LoggerConf() zerolog.ConsoleWriter { func GetLoggerContext(opt zerolog.ConsoleWriter) zerolog.Context { return zerolog.New(opt).With().Timestamp() } + +// Hasher hashes a string +func Hasher(value string) string { + h := fnv.New32a() + _, _ = h.Write([]byte(value)) + return fmt.Sprintf("%v", h.Sum32()) +} + +// GetObjectHash returns hash of a given object +func GetObjectHash(obj metav1.Object) (string, error) { + b, err := json.Marshal(obj) + if err != nil { + return "", fmt.Errorf("failed to marshal resource") + } + return Hasher(string(b)), nil +} diff --git a/common/util_test.go b/common/util_test.go index e4f0cd1b12..622d959fb8 100644 --- a/common/util_test.go +++ b/common/util_test.go @@ -17,14 +17,31 @@ limitations under the License. package common import ( - "github.com/smartystreets/goconvey/convey" "testing" + "github.com/smartystreets/goconvey/convey" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/kubernetes/fake" ) +func TestGetObjectHash(t *testing.T) { + convey.Convey("Given a value, hash it", t, func() { + hash, err := GetObjectHash(&corev1.Pod{}) + convey.So(hash, convey.ShouldNotBeEmpty) + convey.So(err, convey.ShouldBeEmpty) + }) +} + +func TestHasher(t *testing.T) { + convey.Convey("Given a value, hash it", t, func() { + hash := Hasher("test") + convey.So(hash, convey.ShouldNotBeEmpty) + }) +} + func TestDefaultConfigMapName(t *testing.T) { res := DefaultConfigMapName("sensor-controller") assert.Equal(t, "sensor-controller-configmap", res) diff --git a/controllers/common/informer.go b/controllers/common/informer.go new file mode 100644 index 0000000000..73d7de5a65 --- /dev/null +++ b/controllers/common/informer.go @@ -0,0 +1,86 @@ +package common + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/informers" + informersv1 "k8s.io/client-go/informers/core/v1" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" +) + +// ArgoEventInformerFactory holds values to create SharedInformerFactory of argo-events +type ArgoEventInformerFactory struct { + OwnerGroupVersionKind schema.GroupVersionKind + OwnerInformer cache.SharedIndexInformer + informers.SharedInformerFactory + Queue workqueue.RateLimitingInterface +} + +// NewPodInformer returns a PodInformer of argo-events +func (c *ArgoEventInformerFactory) NewPodInformer() informersv1.PodInformer { + podInformer := c.SharedInformerFactory.Core().V1().Pods() + podInformer.Informer().AddEventHandler( + cache.ResourceEventHandlerFuncs{ + DeleteFunc: func(obj interface{}) { + owner, err := c.getOwner(obj) + if err != nil { + return + } + key, err := cache.MetaNamespaceKeyFunc(owner) + if err == nil { + c.Queue.Add(key) + } + }, + }, + ) + return podInformer +} + +// NewServiceInformer returns a ServiceInformer of argo-events +func (c *ArgoEventInformerFactory) NewServiceInformer() informersv1.ServiceInformer { + svcInformer := c.SharedInformerFactory.Core().V1().Services() + svcInformer.Informer().AddEventHandler( + cache.ResourceEventHandlerFuncs{ + DeleteFunc: func(obj interface{}) { + owner, err := c.getOwner(obj) + if err != nil { + return + } + key, err := cache.MetaNamespaceKeyFunc(owner) + if err == nil { + c.Queue.Add(key) + } + }, + }, + ) + return svcInformer +} + +func (c *ArgoEventInformerFactory) getOwner(obj interface{}) (interface{}, error) { + m, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + for _, owner := range m.GetOwnerReferences() { + + if owner.APIVersion == c.OwnerGroupVersionKind.GroupVersion().String() && + owner.Kind == c.OwnerGroupVersionKind.Kind { + key := owner.Name + if len(m.GetNamespace()) > 0 { + key = m.GetNamespace() + "/" + key + } + obj, exists, err := c.OwnerInformer.GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, fmt.Errorf("failed to get object from cache") + } + return obj, nil + } + } + return nil, fmt.Errorf("no owner found") +} diff --git a/controllers/common/informer_test.go b/controllers/common/informer_test.go new file mode 100644 index 0000000000..7b7f177b02 --- /dev/null +++ b/controllers/common/informer_test.go @@ -0,0 +1,191 @@ +package common + +import ( + "fmt" + "math/rand" + "testing" + "time" + + "github.com/smartystreets/goconvey/convey" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" +) + +func getFakePodSharedIndexInformer(clientset kubernetes.Interface) cache.SharedIndexInformer { + // NewListWatchFromClient doesn't work with fake client. + // ref: https://github.com/kubernetes/client-go/issues/352 + return cache.NewSharedIndexInformer(&cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return clientset.CoreV1().Pods("").List(options) + }, + WatchFunc: clientset.CoreV1().Pods("").Watch, + }, &corev1.Pod{}, 1*time.Second, cache.Indexers{}) +} + +func getInformerFactory(clientset kubernetes.Interface, queue workqueue.RateLimitingInterface, done chan struct{}) *ArgoEventInformerFactory { + informerFactory := informers.NewSharedInformerFactory(clientset, 0) + ownerInformer := getFakePodSharedIndexInformer(clientset) + go ownerInformer.Run(done) + return &ArgoEventInformerFactory{ + OwnerGroupVersionKind: schema.GroupVersionKind{Version: "v1", Kind: "Pod"}, + OwnerInformer: ownerInformer, + SharedInformerFactory: informerFactory, + Queue: queue, + } +} + +func getCommonPodSpec() corev1.PodSpec { + return corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "whalesay", + Image: "docker/whalesay:latest", + }, + }, + } +} + +func getPod(owner *corev1.Pod) *corev1.Pod { + var ownerReferneces = []metav1.OwnerReference{} + if owner != nil { + ownerReferneces = append(ownerReferneces, *metav1.NewControllerRef(owner, owner.GroupVersionKind())) + } + return &corev1.Pod{ + TypeMeta: metav1.TypeMeta{ + Kind: "Pod", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("pod-%d", rand.Uint32()), + OwnerReferences: ownerReferneces, + }, + Spec: getCommonPodSpec(), + } +} + +func getService(owner *corev1.Pod) *corev1.Service { + var ownerReferneces = []metav1.OwnerReference{} + if owner != nil { + ownerReferneces = append(ownerReferneces, *metav1.NewControllerRef(owner, owner.GroupVersionKind())) + } + return &corev1.Service{ + TypeMeta: metav1.TypeMeta{ + Kind: "Service", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("svc-%d", rand.Uint32()), + OwnerReferences: ownerReferneces, + }, + Spec: corev1.ServiceSpec{}, + } +} + +func TestNewPodInformer(t *testing.T) { + done := make(chan struct{}) + queue := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + defer queue.ShutDown() + namespace := "namespace" + clientset := fake.NewSimpleClientset() + factory := getInformerFactory(clientset, queue, done) + convey.Convey("Given an informer factory", t, func() { + convey.Convey("Get a new gateway pod informer and make sure its not nil", func() { + podInformer := factory.NewPodInformer() + convey.So(podInformer, convey.ShouldNotBeNil) + + convey.Convey("Handle event", func() { + go podInformer.Informer().Run(done) + ownerPod := getPod(nil) + ownerPod, err := clientset.CoreV1().Pods(namespace).Create(ownerPod) + convey.So(err, convey.ShouldBeNil) + cache.WaitForCacheSync(done, factory.OwnerInformer.HasSynced) + + convey.Convey("Not enqueue owner key on creation", func() { + pod := getPod(ownerPod) + pod, err := clientset.CoreV1().Pods(namespace).Create(pod) + convey.So(err, convey.ShouldBeNil) + cache.WaitForCacheSync(done, podInformer.Informer().HasSynced) + + convey.So(queue.Len(), convey.ShouldEqual, 0) + + convey.Convey("Not enqueue owner key on update", func() { + pod.Labels = map[string]string{"foo": "bar"} + _, err = clientset.CoreV1().Pods(namespace).Update(pod) + convey.So(err, convey.ShouldBeNil) + cache.WaitForCacheSync(done, podInformer.Informer().HasSynced) + + convey.So(queue.Len(), convey.ShouldEqual, 0) + }) + + convey.Convey("Enqueue owner key on deletion", func() { + err := clientset.CoreV1().Pods(namespace).Delete(pod.Name, &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) + cache.WaitForCacheSync(done, podInformer.Informer().HasSynced) + + convey.So(queue.Len(), convey.ShouldEqual, 1) + key, _ := queue.Get() + queue.Done(key) + convey.So(key, convey.ShouldEqual, fmt.Sprintf("%s/%s", namespace, ownerPod.Name)) + }) + }) + }) + }) + }) +} + +func TestNewServiceInformer(t *testing.T) { + done := make(chan struct{}) + queue := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + defer queue.ShutDown() + namespace := "namespace" + clientset := fake.NewSimpleClientset() + factory := getInformerFactory(clientset, queue, done) + convey.Convey("Given an informer factory", t, func() { + convey.Convey("Get a new gateway service informer and make sure its not nil", func() { + svcInformer := factory.NewServiceInformer() + convey.So(svcInformer, convey.ShouldNotBeNil) + + convey.Convey("Handle event", func() { + go svcInformer.Informer().Run(done) + ownerPod := getPod(nil) + ownerPod, err := clientset.CoreV1().Pods(namespace).Create(ownerPod) + convey.So(err, convey.ShouldBeNil) + cache.WaitForCacheSync(done, factory.OwnerInformer.HasSynced) + + convey.Convey("Not enqueue owner key on creation", func() { + service := getService(ownerPod) + service, err := clientset.CoreV1().Services(namespace).Create(service) + convey.So(err, convey.ShouldBeNil) + cache.WaitForCacheSync(done, svcInformer.Informer().HasSynced) + convey.So(queue.Len(), convey.ShouldEqual, 0) + + convey.Convey("Not enqueue owner key on update", func() { + service.Labels = map[string]string{"foo": "bar"} + service, err = clientset.CoreV1().Services(namespace).Update(service) + convey.So(err, convey.ShouldBeNil) + cache.WaitForCacheSync(done, svcInformer.Informer().HasSynced) + convey.So(queue.Len(), convey.ShouldEqual, 0) + }) + + convey.Convey("Enqueue owner key on deletion", func() { + err := clientset.CoreV1().Services(namespace).Delete(service.Name, &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) + cache.WaitForCacheSync(done, svcInformer.Informer().HasSynced) + + convey.So(queue.Len(), convey.ShouldEqual, 1) + key, _ := queue.Get() + queue.Done(key) + convey.So(key, convey.ShouldEqual, fmt.Sprintf("%s/%s", namespace, ownerPod.Name)) + }) + }) + }) + }) + }) +} diff --git a/controllers/common/util.go b/controllers/common/util.go new file mode 100644 index 0000000000..112335890c --- /dev/null +++ b/controllers/common/util.go @@ -0,0 +1,50 @@ +package common + +import ( + "github.com/argoproj/argo-events/common" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// ChildResourceContext holds necessary information for child resource setup +type ChildResourceContext struct { + SchemaGroupVersionKind schema.GroupVersionKind + LabelOwnerName string + LabelKeyOwnerControllerInstanceID string + AnnotationOwnerResourceHashName string + InstanceID string +} + +// SetObjectMeta sets ObjectMeta of child resource +func (ctx *ChildResourceContext) SetObjectMeta(owner, obj metav1.Object) error { + references := obj.GetOwnerReferences() + references = append(references, + *metav1.NewControllerRef(owner, ctx.SchemaGroupVersionKind), + ) + obj.SetOwnerReferences(references) + + if obj.GetName() == "" && obj.GetGenerateName() == "" { + obj.SetGenerateName(owner.GetName()) + } + + labels := obj.GetLabels() + if labels == nil { + labels = make(map[string]string) + } + labels[ctx.LabelOwnerName] = owner.GetName() + labels[ctx.LabelKeyOwnerControllerInstanceID] = ctx.InstanceID + obj.SetLabels(labels) + + hash, err := common.GetObjectHash(obj) + if err != nil { + return err + } + annotations := obj.GetAnnotations() + if annotations == nil { + annotations = make(map[string]string) + } + annotations[ctx.AnnotationOwnerResourceHashName] = hash + obj.SetAnnotations(annotations) + + return nil +} diff --git a/controllers/common/util_test.go b/controllers/common/util_test.go new file mode 100644 index 0000000000..012e07eb9c --- /dev/null +++ b/controllers/common/util_test.go @@ -0,0 +1,39 @@ +package common + +import ( + "testing" + + "github.com/smartystreets/goconvey/convey" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func TestSetObjectMeta(t *testing.T) { + convey.Convey("Given an object, set meta", t, func() { + groupVersionKind := schema.GroupVersionKind{ + Group: "grp", + Version: "ver", + Kind: "kind", + } + ctx := ChildResourceContext{ + SchemaGroupVersionKind: groupVersionKind, + LabelOwnerName: "foo", + LabelKeyOwnerControllerInstanceID: "id", + AnnotationOwnerResourceHashName: "hash", + InstanceID: "ID", + } + owner := corev1.Pod{} + pod := corev1.Pod{} + ref := metav1.NewControllerRef(&owner, groupVersionKind) + + err := ctx.SetObjectMeta(&owner, &pod) + convey.So(err, convey.ShouldBeEmpty) + convey.So(pod.Labels["foo"], convey.ShouldEqual, "") + convey.So(pod.Labels["id"], convey.ShouldEqual, "ID") + convey.So(pod.Annotations, convey.ShouldContainKey, "hash") + convey.So(pod.Name, convey.ShouldEqual, "") + convey.So(pod.GenerateName, convey.ShouldEqual, "") + convey.So(pod.OwnerReferences, convey.ShouldContain, *ref) + }) +} diff --git a/controllers/gateway/controller.go b/controllers/gateway/controller.go index e7cfeee23b..da32589cb2 100644 --- a/controllers/gateway/controller.go +++ b/controllers/gateway/controller.go @@ -23,7 +23,11 @@ import ( "time" "github.com/rs/zerolog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/informers" + informersv1 "k8s.io/client-go/informers/core/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" @@ -31,12 +35,16 @@ import ( base "github.com/argoproj/argo-events" "github.com/argoproj/argo-events/common" + ccommon "github.com/argoproj/argo-events/controllers/common" "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1" clientset "github.com/argoproj/argo-events/pkg/client/gateway/clientset/versioned" ) const ( - gatewayResyncPeriod = 20 * time.Minute + gatewayResyncPeriod = 20 * time.Minute + gatewayResourceResyncPeriod = 30 * time.Minute + rateLimiterBaseDelay = 5 * time.Second + rateLimiterMaxDelay = 1000 * time.Second ) // GatewayControllerConfig contain the configuration settings for the gateway-controller @@ -65,12 +73,15 @@ type GatewayController struct { gatewayClientset clientset.Interface // gateway-controller informer and queue - informer cache.SharedIndexInformer - queue workqueue.RateLimitingInterface + podInformer informersv1.PodInformer + svcInformer informersv1.ServiceInformer + informer cache.SharedIndexInformer + queue workqueue.RateLimitingInterface } // NewGatewayController creates a new Controller func NewGatewayController(rest *rest.Config, configMap, namespace string) *GatewayController { + rateLimiter := workqueue.NewItemExponentialFailureRateLimiter(rateLimiterBaseDelay, rateLimiterMaxDelay) return &GatewayController{ ConfigMap: configMap, Namespace: namespace, @@ -78,7 +89,7 @@ func NewGatewayController(rest *rest.Config, configMap, namespace string) *Gatew log: common.GetLoggerContext(common.LoggerConf()).Str("controller-namespace", namespace).Logger(), kubeClientset: kubernetes.NewForConfigOrDie(rest), gatewayClientset: clientset.NewForConfigOrDie(rest), - queue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), + queue: workqueue.NewRateLimitingQueue(rateLimiter), } } @@ -115,7 +126,7 @@ func (c *GatewayController) processNextItem() bool { common.LabelGatewayName: gateway.Name, common.LabelEventType: string(common.EscalationEventType), } - if err := common.GenerateK8sEvent(c.kubeClientset, fmt.Sprintf("controller failed to operate on gateway %s, err: %+v", gateway.Name, err), common.StateChangeEventType, + if err := common.GenerateK8sEvent(c.kubeClientset, fmt.Sprintf("controller failed to operate on gateway %s", gateway.Name), common.StateChangeEventType, "controller operation failed", gateway.Name, gateway.Namespace, c.Config.InstanceID, gateway.Kind, labels); err != nil { ctx.log.Error().Err(err).Msg("failed to create K8s event to escalate controller operation failure") } @@ -166,7 +177,34 @@ func (c *GatewayController) Run(ctx context.Context, gwThreads, eventThreads int go c.informer.Run(ctx.Done()) if !cache.WaitForCacheSync(ctx.Done(), c.informer.HasSynced) { - c.log.Panic().Msg("timed out waiting for the caches to sync") + c.log.Panic().Msg("timed out waiting for the caches to sync for gateways") + return + } + + listOptionsFunc := func(options *metav1.ListOptions) { + labelSelector := labels.NewSelector().Add(c.instanceIDReq()) + options.LabelSelector = labelSelector.String() + } + factory := ccommon.ArgoEventInformerFactory{ + OwnerGroupVersionKind: v1alpha1.SchemaGroupVersionKind, + OwnerInformer: c.informer, + SharedInformerFactory: informers.NewFilteredSharedInformerFactory(c.kubeClientset, gatewayResourceResyncPeriod, c.Config.Namespace, listOptionsFunc), + Queue: c.queue, + } + + c.podInformer = factory.NewPodInformer() + go c.podInformer.Informer().Run(ctx.Done()) + + if !cache.WaitForCacheSync(ctx.Done(), c.podInformer.Informer().HasSynced) { + c.log.Panic().Msg("timed out waiting for the caches to sync for gateway pods") + return + } + + c.svcInformer = factory.NewServiceInformer() + go c.svcInformer.Informer().Run(ctx.Done()) + + if !cache.WaitForCacheSync(ctx.Done(), c.svcInformer.Informer().HasSynced) { + c.log.Panic().Msg("timed out waiting for the caches to sync for gateway services") return } diff --git a/controllers/gateway/controller_test.go b/controllers/gateway/controller_test.go index b02fc38bdf..be9ee2bee0 100644 --- a/controllers/gateway/controller_test.go +++ b/controllers/gateway/controller_test.go @@ -19,15 +19,42 @@ package gateway import ( "fmt" "testing" + "time" "github.com/argoproj/argo-events/common" fakegateway "github.com/argoproj/argo-events/pkg/client/gateway/clientset/versioned/fake" "github.com/smartystreets/goconvey/convey" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" ) +func getFakePodSharedIndexInformer(clientset kubernetes.Interface) cache.SharedIndexInformer { + // NewListWatchFromClient doesn't work with fake client. + // ref: https://github.com/kubernetes/client-go/issues/352 + return cache.NewSharedIndexInformer(&cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return clientset.CoreV1().Pods("").List(options) + }, + WatchFunc: clientset.CoreV1().Pods("").Watch, + }, &corev1.Pod{}, 1*time.Second, cache.Indexers{}) +} + func getGatewayController() *GatewayController { + clientset := fake.NewSimpleClientset() + done := make(chan struct{}) + informer := getFakePodSharedIndexInformer(clientset) + go informer.Run(done) + factory := informers.NewSharedInformerFactory(clientset, 0) + podInformer := factory.Core().V1().Pods() + go podInformer.Informer().Run(done) + svcInformer := factory.Core().V1().Services() + go svcInformer.Informer().Run(done) return &GatewayController{ ConfigMap: configmapName, Namespace: common.DefaultControllerNamespace, @@ -35,8 +62,11 @@ func getGatewayController() *GatewayController { Namespace: common.DefaultControllerNamespace, InstanceID: "argo-events", }, - kubeClientset: fake.NewSimpleClientset(), + kubeClientset: clientset, gatewayClientset: fakegateway.NewSimpleClientset(), + podInformer: podInformer, + svcInformer: svcInformer, + informer: informer, queue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), } } diff --git a/controllers/gateway/informer.go b/controllers/gateway/informer.go index d7ee0883c7..608156160e 100644 --- a/controllers/gateway/informer.go +++ b/controllers/gateway/informer.go @@ -20,11 +20,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" "k8s.io/client-go/tools/cache" "github.com/argoproj/argo-events/common" gatewayinformers "github.com/argoproj/argo-events/pkg/client/gateway/informers/externalversions" - "k8s.io/apimachinery/pkg/selection" ) func (c *GatewayController) instanceIDReq() labels.Requirement { diff --git a/controllers/gateway/informer_test.go b/controllers/gateway/informer_test.go index 02aacc3ce4..bc9e58fe47 100644 --- a/controllers/gateway/informer_test.go +++ b/controllers/gateway/informer_test.go @@ -37,7 +37,7 @@ func TestInformer(t *testing.T) { convey.Convey("Given a gateway controller", t, func() { controller := getGatewayController() - convey.Convey("Get a new informer and make sure its not nil", func() { + convey.Convey("Get a new gateway informer and make sure its not nil", func() { i := controller.newGatewayInformer() convey.So(i, convey.ShouldNotBeNil) }) diff --git a/controllers/gateway/operator.go b/controllers/gateway/operator.go index 51078f553e..2934e8934d 100644 --- a/controllers/gateway/operator.go +++ b/controllers/gateway/operator.go @@ -17,11 +17,12 @@ limitations under the License. package gateway import ( - "fmt" - "github.com/argoproj/argo-events/pkg/apis/gateway" "time" + "github.com/pkg/errors" + "github.com/argoproj/argo-events/common" + "github.com/argoproj/argo-events/pkg/apis/gateway" "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1" zlog "github.com/rs/zerolog" corev1 "k8s.io/api/core/v1" @@ -39,15 +40,19 @@ type gwOperationCtx struct { log zlog.Logger // reference to the gateway-controller-controller controller *GatewayController + // gwrctx is the context to handle child resource + gwrctx gwResourceCtx } // newGatewayOperationCtx creates and initializes a new gOperationCtx object func newGatewayOperationCtx(gw *v1alpha1.Gateway, controller *GatewayController) *gwOperationCtx { + gw = gw.DeepCopy() return &gwOperationCtx{ - gw: gw.DeepCopy(), + gw: gw, updated: false, log: common.GetLoggerContext(common.LoggerConf()).Str("name", gw.Name).Str("namespace", gw.Namespace).Logger(), controller: controller, + gwrctx: NewGatewayResourceContext(gw, controller), } } @@ -86,76 +91,226 @@ func (goc *gwOperationCtx) operate() error { // check the state of a gateway and take actions accordingly switch goc.gw.Status.Phase { case v1alpha1.NodePhaseNew: - // perform one-time gateway validation - // non nil err indicates failed validation - // we do not want to requeue a gateway in this case - // since validation will fail every time - err := Validate(goc.gw) + err := goc.createGatewayResources() if err != nil { - goc.log.Error().Err(err).Msg("gateway validation failed") - goc.markGatewayPhase(v1alpha1.NodePhaseError, "validation failed") - return nil + return err } - // Gateway pod has two components, - // 1) Gateway Server - Listen events from event source and dispatches the event to gateway client - // 2) Gateway Client - Listens for events from gateway server, convert them into cloudevents specification - // compliant events and dispatch them to watchers. - - gatewayPod := goc.gw.Spec.DeploySpec + // Gateway is in error + case v1alpha1.NodePhaseError: + goc.log.Error().Str("gateway-name", goc.gw.Name).Msg("gateway is in error state. please check escalated K8 event for the error") - gatewayPod.ObjectMeta.OwnerReferences = []metav1.OwnerReference{ - *metav1.NewControllerRef(goc.gw, v1alpha1.SchemaGroupVersionKind), + err := goc.updateGatewayResources() + if err != nil { + return err } - if goc.gw.Spec.DeploySpec.Name == "" && goc.gw.Spec.DeploySpec.GenerateName == "" { - gatewayPod.GenerateName = goc.gw.Name + + // Gateway is already running, do nothing + case v1alpha1.NodePhaseRunning: + goc.log.Info().Str("gateway-name", goc.gw.Name).Msg("gateway is running") + + err := goc.updateGatewayResources() + if err != nil { + return err } - gatewayPod.Spec.Containers = *goc.getContainersForGatewayPod() - // we can now create the gateway pod. - // depending on user configuration gateway will be exposed outside the cluster or intra-cluster. - _, err = goc.controller.kubeClientset.CoreV1().Pods(goc.gw.Namespace).Create(gatewayPod) + default: + goc.log.Panic().Str("gateway-name", goc.gw.Name).Str("phase", string(goc.gw.Status.Phase)).Msg("unknown gateway phase.") + } + return nil +} + +func (goc *gwOperationCtx) createGatewayResources() error { + err := Validate(goc.gw) + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("gateway validation failed") + err = errors.Wrap(err, "failed to validate gateway") + goc.markGatewayPhase(v1alpha1.NodePhaseError, err.Error()) + return err + } + // Gateway pod has two components, + // 1) Gateway Server - Listen events from event source and dispatches the event to gateway client + // 2) Gateway Client - Listens for events from gateway server, convert them into cloudevents specification + // compliant events and dispatch them to watchers. + pod, err := goc.createGatewayPod() + if err != nil { + err = errors.Wrap(err, "failed to create gateway pod") + goc.markGatewayPhase(v1alpha1.NodePhaseError, err.Error()) + return err + } + goc.log.Info().Str("pod-name", pod.Name).Msg("gateway pod is created") + + // expose gateway if service is configured + if goc.gw.Spec.ServiceSpec != nil { + svc, err := goc.createGatewayService() if err != nil { - goc.log.Error().Err(err).Msg("failed gateway pod") - goc.markGatewayPhase(v1alpha1.NodePhaseError, fmt.Sprintf("failed gateway pod. err: %s", err)) + err = errors.Wrap(err, "failed to create gateway service") + goc.markGatewayPhase(v1alpha1.NodePhaseError, err.Error()) return err } - goc.log.Info().Str("pod-name", goc.gw.Name).Msg("gateway pod created") + goc.log.Info().Str("svc-name", svc.Name).Msg("gateway service is created") + } - // expose gateway if service is configured - if goc.gw.Spec.ServiceSpec != nil { - svc, err := goc.createGatewayService() - if err != nil { - goc.log.Error().Err(err).Msg("failed to create service for gateway") - goc.markGatewayPhase(v1alpha1.NodePhaseError, fmt.Sprintf("failed to create gateway service. err: %s", err)) - return err - } - goc.log.Info().Str("svc-name", svc.ObjectMeta.Name).Msg("gateway service is created") + goc.log.Info().Str("gateway-name", goc.gw.Name).Msg("marking gateway as active") + goc.markGatewayPhase(v1alpha1.NodePhaseRunning, "gateway is active") + return nil +} + +func (goc *gwOperationCtx) createGatewayPod() (*corev1.Pod, error) { + pod, err := goc.gwrctx.newGatewayPod() + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to initialize pod for gateway") + return nil, err + } + pod, err = goc.gwrctx.createGatewayPod(pod) + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to create pod for gateway") + return nil, err + } + return pod, nil +} + +func (goc *gwOperationCtx) createGatewayService() (*corev1.Service, error) { + svc, err := goc.gwrctx.newGatewayService() + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to initialize service for gateway") + return nil, err + } + svc, err = goc.gwrctx.createGatewayService(svc) + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to create service for gateway") + return nil, err + } + return svc, nil +} + +func (goc *gwOperationCtx) updateGatewayResources() error { + err := Validate(goc.gw) + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("gateway validation failed") + err = errors.Wrap(err, "failed to validate gateway") + if goc.gw.Status.Phase != v1alpha1.NodePhaseError { + goc.markGatewayPhase(v1alpha1.NodePhaseError, err.Error()) } - goc.markGatewayPhase(v1alpha1.NodePhaseRunning, "gateway is active") + return err + } - // Gateway is in error - case v1alpha1.NodePhaseError: - goc.log.Error().Msg("gateway is in error state. please check escalated K8 event for the error") + _, podChanged, err := goc.updateGatewayPod() + if err != nil { + err = errors.Wrap(err, "failed to update gateway pod") + goc.markGatewayPhase(v1alpha1.NodePhaseError, err.Error()) + return err + } - // Gateway is already running, do nothing - case v1alpha1.NodePhaseRunning: - goc.log.Info().Msg("gateway is running") + _, svcChanged, err := goc.updateGatewayService() + if err != nil { + err = errors.Wrap(err, "failed to update gateway service") + goc.markGatewayPhase(v1alpha1.NodePhaseError, err.Error()) + return err + } - default: - goc.log.Panic().Str("phase", string(goc.gw.Status.Phase)).Msg("unknown gateway phase.") + if goc.gw.Status.Phase != v1alpha1.NodePhaseRunning && (podChanged || svcChanged) { + goc.markGatewayPhase(v1alpha1.NodePhaseRunning, "gateway is active") } + return nil } -// Creates a service that exposes gateway. -func (goc *gwOperationCtx) createGatewayService() (*corev1.Service, error) { - gatewayService := goc.gw.Spec.ServiceSpec - gatewayService.ObjectMeta.OwnerReferences = []metav1.OwnerReference{ - *metav1.NewControllerRef(goc.gw, v1alpha1.SchemaGroupVersionKind), +func (goc *gwOperationCtx) updateGatewayPod() (*corev1.Pod, bool, error) { + // Check if gateway spec has changed for pod. + existingPod, err := goc.gwrctx.getGatewayPod() + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to get pod for gateway") + return nil, false, err + } + + // create a new pod spec + newPod, err := goc.gwrctx.newGatewayPod() + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to initialize pod for gateway") + return nil, false, err + } + + // check if pod spec remained unchanged + if existingPod != nil { + if existingPod.Annotations != nil && existingPod.Annotations[common.AnnotationGatewayResourceSpecHashName] == newPod.Annotations[common.AnnotationGatewayResourceSpecHashName] { + goc.log.Debug().Str("gateway-name", goc.gw.Name).Str("pod-name", existingPod.Name).Msg("gateway pod spec unchanged") + return nil, false, nil + } + + // By now we are sure that the spec changed, so lets go ahead and delete the exisitng gateway pod. + goc.log.Info().Str("pod-name", existingPod.Name).Msg("gateway pod spec changed") + + err := goc.gwrctx.deleteGatewayPod(existingPod) + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to delete pod for gateway") + return nil, false, err + } + + goc.log.Info().Str("pod-name", existingPod.Name).Msg("gateway pod is deleted") + } + + // Create new pod for updated gateway spec. + createdPod, err := goc.gwrctx.createGatewayPod(newPod) + if err != nil { + goc.log.Error().Err(err).Msg("failed to create pod for gateway") + return nil, false, err } - svc, err := goc.controller.kubeClientset.CoreV1().Services(goc.gw.Namespace).Create(gatewayService) - return svc, err + goc.log.Info().Str("gateway-name", goc.gw.Name).Str("pod-name", newPod.Name).Msg("gateway pod is created") + + return createdPod, true, nil +} + +func (goc *gwOperationCtx) updateGatewayService() (*corev1.Service, bool, error) { + // Check if gateway spec has changed for service. + existingSvc, err := goc.gwrctx.getGatewayService() + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to get service for gateway") + return nil, false, err + } + + // create a new service spec + newSvc, err := goc.gwrctx.newGatewayService() + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to initialize service for gateway") + return nil, false, err + } + + if existingSvc != nil { + // updated spec doesn't have service defined, delete existing service. + if newSvc == nil { + if err := goc.gwrctx.deleteGatewayService(existingSvc); err != nil { + return nil, false, err + } + return nil, true, nil + } + + // check if service spec remained unchanged + if existingSvc.Annotations[common.AnnotationGatewayResourceSpecHashName] == newSvc.Annotations[common.AnnotationGatewayResourceSpecHashName] { + goc.log.Debug().Str("gateway-name", goc.gw.Name).Str("service-name", existingSvc.Name).Msg("gateway service spec unchanged") + return nil, false, nil + } + + // service spec changed, delete existing service and create new one + goc.log.Info().Str("gateway-name", goc.gw.Name).Str("service-name", existingSvc.Name).Msg("gateway service spec changed") + + if err := goc.gwrctx.deleteGatewayService(existingSvc); err != nil { + return nil, false, err + } + } else if newSvc == nil { + // gateway service doesn't exist originally + return nil, false, nil + } + + // change createGatewayService to take a service spec + createdSvc, err := goc.gwrctx.createGatewayService(newSvc) + if err != nil { + goc.log.Error().Err(err).Str("gateway-name", goc.gw.Name).Msg("failed to create service for gateway") + return nil, false, err + } + goc.log.Info().Str("svc-name", newSvc.Name).Msg("gateway service is created") + + return createdSvc, true, nil } // mark the overall gateway phase @@ -167,12 +322,12 @@ func (goc *gwOperationCtx) markGatewayPhase(phase v1alpha1.NodePhase, message st if goc.gw.ObjectMeta.Labels == nil { goc.gw.ObjectMeta.Labels = make(map[string]string) } - if goc.gw.ObjectMeta.Annotations == nil { - goc.gw.ObjectMeta.Annotations = make(map[string]string) + if goc.gw.Annotations == nil { + goc.gw.Annotations = make(map[string]string) } - goc.gw.ObjectMeta.Labels[common.LabelSensorKeyPhase] = string(phase) + goc.gw.ObjectMeta.Labels[common.LabelGatewayKeyPhase] = string(phase) // add annotations so a resource sensor can watch this gateway. - goc.gw.ObjectMeta.Annotations[common.LabelGatewayKeyPhase] = string(phase) + goc.gw.Annotations[common.LabelGatewayKeyPhase] = string(phase) } if goc.gw.Status.StartedAt.IsZero() { goc.gw.Status.StartedAt = metav1.Time{Time: time.Now().UTC()} @@ -181,40 +336,3 @@ func (goc *gwOperationCtx) markGatewayPhase(phase v1alpha1.NodePhase, message st goc.gw.Status.Message = message goc.updated = true } - -// containers required for gateway deployment -func (goc *gwOperationCtx) getContainersForGatewayPod() *[]corev1.Container { - // env variables - envVars := []corev1.EnvVar{ - { - Name: common.EnvVarGatewayNamespace, - Value: goc.gw.Namespace, - }, - { - Name: common.EnvVarGatewayEventSourceConfigMap, - Value: goc.gw.Spec.ConfigMap, - }, - { - Name: common.EnvVarGatewayName, - Value: goc.gw.Name, - }, - { - Name: common.EnvVarGatewayControllerInstanceID, - Value: goc.controller.Config.InstanceID, - }, - { - Name: common.EnvVarGatewayControllerName, - Value: common.DefaultGatewayControllerDeploymentName, - }, - { - Name: common.EnvVarGatewayServerPort, - Value: goc.gw.Spec.ProcessorPort, - }, - } - containers := make([]corev1.Container, len(goc.gw.Spec.DeploySpec.Spec.Containers)) - for i, container := range goc.gw.Spec.DeploySpec.Spec.Containers { - container.Env = append(container.Env, envVars...) - containers[i] = container - } - return &containers -} diff --git a/controllers/gateway/operator_test.go b/controllers/gateway/operator_test.go index 597c4f9e16..fafc3f8dac 100644 --- a/controllers/gateway/operator_test.go +++ b/controllers/gateway/operator_test.go @@ -23,6 +23,7 @@ import ( "github.com/ghodss/yaml" "github.com/smartystreets/goconvey/convey" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/cache" ) var testGatewayStr = `apiVersion: argoproj.io/v1alpha1 @@ -77,7 +78,14 @@ func getGateway() (*v1alpha1.Gateway, error) { return &gateway, err } +func waitForAllInformers(done chan struct{}, controller *GatewayController) { + cache.WaitForCacheSync(done, controller.informer.HasSynced) + cache.WaitForCacheSync(done, controller.podInformer.Informer().HasSynced) + cache.WaitForCacheSync(done, controller.svcInformer.Informer().HasSynced) +} + func TestGatewayOperateLifecycle(t *testing.T) { + done := make(chan struct{}) convey.Convey("Given a gateway resource spec, parse it", t, func() { fakeController := getGatewayController() gateway, err := getGateway() @@ -96,48 +104,210 @@ func TestGatewayOperateLifecycle(t *testing.T) { convey.So(goc, convey.ShouldNotBeNil) convey.Convey("Operate on new gateway", func() { + goc.markGatewayPhase(v1alpha1.NodePhaseNew, "test") err := goc.operate() + waitForAllInformers(done, fakeController) convey.Convey("Operation must succeed", func() { convey.So(err, convey.ShouldBeNil) convey.Convey("A gateway pod and service must be created", func() { - pod, err := goc.controller.kubeClientset.CoreV1().Pods(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) + pod, err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Get("webhook-gateway", metav1.GetOptions{}) convey.So(err, convey.ShouldBeNil) convey.So(pod, convey.ShouldNotBeNil) - svc, err := goc.controller.kubeClientset.CoreV1().Services(gateway.Namespace).Get("webhook-gateway-svc", metav1.GetOptions{}) + svc, err := fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Get("webhook-gateway-svc", metav1.GetOptions{}) convey.So(err, convey.ShouldBeNil) convey.So(svc, convey.ShouldNotBeNil) + + convey.Convey("Go to running state", func() { + gateway, err := fakeController.gatewayClientset.ArgoprojV1alpha1().Gateways(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gateway.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseRunning) + }) }) }) }) convey.Convey("Operate on gateway in running state", func() { + // Operate it once to create pod and service + goc.markGatewayPhase(v1alpha1.NodePhaseNew, "test") err := goc.operate() convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, fakeController) + + goc.markGatewayPhase(v1alpha1.NodePhaseRunning, "test") + + convey.Convey("Operation must succeed", func() { + err := goc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, fakeController) + + convey.Convey("Untouch pod and service", func() { + gatewayPod, err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Get("webhook-gateway", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewayPod, convey.ShouldNotBeNil) + + gatewaySvc, err := fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Get("webhook-gateway-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewaySvc, convey.ShouldNotBeNil) + + convey.Convey("Stay in running state", func() { + gateway, err := fakeController.gatewayClientset.ArgoprojV1alpha1().Gateways(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gateway.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseRunning) + }) + }) + }) + + convey.Convey("Delete pod and service", func() { + err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Delete("webhook-gateway", &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) + + err = fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Delete("webhook-gateway-svc", &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) + + waitForAllInformers(done, fakeController) + + convey.Convey("Operation must succeed", func() { + err := goc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, fakeController) + + convey.Convey("Create pod and service", func() { + gatewayPod, err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Get("webhook-gateway", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewayPod, convey.ShouldNotBeNil) + + gatewaySvc, err := fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Get("webhook-gateway-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewaySvc, convey.ShouldNotBeNil) + + convey.Convey("Stay in running state", func() { + gateway, err := fakeController.gatewayClientset.ArgoprojV1alpha1().Gateways(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gateway.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseRunning) + }) + }) + }) + }) + + convey.Convey("Change pod and service spec", func() { + goc.gwrctx.gw.Spec.DeploySpec.Spec.RestartPolicy = "Never" + goc.gwrctx.gw.Spec.ServiceSpec.Spec.ClusterIP = "127.0.0.1" + + convey.Convey("Operation must succeed", func() { + err := goc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, fakeController) + + convey.Convey("Delete pod and service", func() { + gatewayPod, err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Get("webhook-gateway", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewayPod.Spec.RestartPolicy, convey.ShouldEqual, "Never") + + gatewaySvc, err := fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Get("webhook-gateway-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewaySvc.Spec.ClusterIP, convey.ShouldEqual, "127.0.0.1") + + convey.Convey("Stay in running state", func() { + gateway, err := fakeController.gatewayClientset.ArgoprojV1alpha1().Gateways(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gateway.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseRunning) + }) + }) + }) + }) }) - convey.Convey("Mark gateway state as error and operate", func() { - goc.markGatewayPhase(v1alpha1.NodePhaseError, "gateway is in error state") + convey.Convey("Operate on gateway in error state", func() { + // Operate it once to create pod and service + goc.markGatewayPhase(v1alpha1.NodePhaseNew, "test") err := goc.operate() convey.So(err, convey.ShouldBeNil) - gateway, err := goc.controller.gatewayClientset.ArgoprojV1alpha1().Gateways(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) - convey.So(err, convey.ShouldBeNil) - convey.So(gateway.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseError) - }) + waitForAllInformers(done, fakeController) + goc.markGatewayPhase(v1alpha1.NodePhaseError, "test") - convey.Convey("Delete gateway and make sure both pod and service gets deleted", func() { - err := fakeController.gatewayClientset.ArgoprojV1alpha1().Gateways(gateway.Namespace).Delete(gateway.Name, &metav1.DeleteOptions{}) - convey.So(err, convey.ShouldBeNil) + convey.Convey("Operation must succeed", func() { + err := goc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, fakeController) + + convey.Convey("Untouch pod and service", func() { + gatewayPod, err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Get("webhook-gateway", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewayPod, convey.ShouldNotBeNil) + + gatewaySvc, err := fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Get("webhook-gateway-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewaySvc, convey.ShouldNotBeNil) + + convey.Convey("Stay in error state", func() { + gateway, err := fakeController.gatewayClientset.ArgoprojV1alpha1().Gateways(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gateway.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseError) + }) + }) + }) + + convey.Convey("Delete pod and service", func() { + err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Delete("webhook-gateway", &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) - gatewayPod, err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) - convey.So(err, convey.ShouldNotBeNil) - convey.So(gatewayPod, convey.ShouldBeNil) + err = fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Delete("webhook-gateway-svc", &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) + + waitForAllInformers(done, fakeController) + + convey.Convey("Operation must succeed", func() { + err := goc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, fakeController) + + convey.Convey("Create pod and service", func() { + gatewayPod, err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Get("webhook-gateway", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewayPod, convey.ShouldNotBeNil) + + gatewaySvc, err := fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Get("webhook-gateway-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewaySvc, convey.ShouldNotBeNil) + + convey.Convey("Go to running state", func() { + gateway, err := fakeController.gatewayClientset.ArgoprojV1alpha1().Gateways(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gateway.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseRunning) + }) + }) + }) + }) + + convey.Convey("Change pod and service spec", func() { + goc.gwrctx.gw.Spec.DeploySpec.Spec.RestartPolicy = "Never" + goc.gwrctx.gw.Spec.ServiceSpec.Spec.ClusterIP = "127.0.0.1" + + convey.Convey("Operation must succeed", func() { + err := goc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, fakeController) - gatewaySvc, err := fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Get("wenhook-gateway-svc", metav1.GetOptions{}) - convey.So(err, convey.ShouldNotBeNil) - convey.So(gatewaySvc, convey.ShouldBeNil) + convey.Convey("Delete pod and service", func() { + gatewayPod, err := fakeController.kubeClientset.CoreV1().Pods(gateway.Namespace).Get("webhook-gateway", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewayPod.Spec.RestartPolicy, convey.ShouldEqual, "Never") + + gatewaySvc, err := fakeController.kubeClientset.CoreV1().Services(gateway.Namespace).Get("webhook-gateway-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gatewaySvc.Spec.ClusterIP, convey.ShouldEqual, "127.0.0.1") + + convey.Convey("Go to running state", func() { + gateway, err := fakeController.gatewayClientset.ArgoprojV1alpha1().Gateways(gateway.Namespace).Get(gateway.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(gateway.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseRunning) + }) + }) + }) + }) }) }) }) diff --git a/controllers/gateway/resource.go b/controllers/gateway/resource.go new file mode 100644 index 0000000000..6e96250433 --- /dev/null +++ b/controllers/gateway/resource.go @@ -0,0 +1,169 @@ +package gateway + +import ( + "github.com/argoproj/argo-events/common" + controllerscommon "github.com/argoproj/argo-events/controllers/common" + "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" +) + +type gwResourceCtx struct { + // gw is the gateway-controller object + gw *v1alpha1.Gateway + // reference to the gateway-controller-controller + controller *GatewayController + + controllerscommon.ChildResourceContext +} + +// NewGatewayResourceContext returns new gwResourceCtx +func NewGatewayResourceContext(gw *v1alpha1.Gateway, controller *GatewayController) gwResourceCtx { + return gwResourceCtx{ + gw: gw, + controller: controller, + ChildResourceContext: controllerscommon.ChildResourceContext{ + SchemaGroupVersionKind: v1alpha1.SchemaGroupVersionKind, + LabelOwnerName: common.LabelGatewayName, + LabelKeyOwnerControllerInstanceID: common.LabelKeyGatewayControllerInstanceID, + AnnotationOwnerResourceHashName: common.AnnotationGatewayResourceSpecHashName, + InstanceID: controller.Config.InstanceID, + }, + } +} + +// gatewayResourceLabelSelector returns label selector of the gateway of the context +func (grc *gwResourceCtx) gatewayResourceLabelSelector() (labels.Selector, error) { + req, err := labels.NewRequirement(common.LabelGatewayName, selection.Equals, []string{grc.gw.Name}) + if err != nil { + return nil, err + } + return labels.NewSelector().Add(*req), nil +} + +// createGatewayService creates a given service +func (grc *gwResourceCtx) createGatewayService(svc *corev1.Service) (*corev1.Service, error) { + return grc.controller.kubeClientset.CoreV1().Services(grc.gw.Namespace).Create(svc) +} + +// deleteGatewayService deletes a given service +func (grc *gwResourceCtx) deleteGatewayService(svc *corev1.Service) error { + return grc.controller.kubeClientset.CoreV1().Services(grc.gw.Namespace).Delete(svc.Name, &metav1.DeleteOptions{}) +} + +// getGatewayService returns the service of gateway +func (grc *gwResourceCtx) getGatewayService() (*corev1.Service, error) { + selector, err := grc.gatewayResourceLabelSelector() + if err != nil { + return nil, err + } + svcs, err := grc.controller.svcInformer.Lister().Services(grc.gw.Namespace).List(selector) + if err != nil { + return nil, err + } + if len(svcs) == 0 { + return nil, nil + } + return svcs[0], nil +} + +// newGatewayService returns a new service that exposes gateway. +func (grc *gwResourceCtx) newGatewayService() (*corev1.Service, error) { + servicTemplateSpec := grc.gw.Spec.ServiceSpec.DeepCopy() + if servicTemplateSpec == nil { + return nil, nil + } + service := &corev1.Service{ + ObjectMeta: servicTemplateSpec.ObjectMeta, + Spec: servicTemplateSpec.Spec, + } + if service.Namespace == "" { + service.Namespace = grc.gw.Namespace + } + if service.Name == "" { + service.Name = common.DefaultServiceName(grc.gw.Name) + } + err := grc.SetObjectMeta(grc.gw, service) + return service, err +} + +// getGatewayPod returns the pod of gateway +func (grc *gwResourceCtx) getGatewayPod() (*corev1.Pod, error) { + selector, err := grc.gatewayResourceLabelSelector() + if err != nil { + return nil, err + } + pods, err := grc.controller.podInformer.Lister().Pods(grc.gw.Namespace).List(selector) + if err != nil { + return nil, err + } + if len(pods) == 0 { + return nil, nil + } + return pods[0], nil +} + +// createGatewayPod creates a given pod +func (grc *gwResourceCtx) createGatewayPod(pod *corev1.Pod) (*corev1.Pod, error) { + return grc.controller.kubeClientset.CoreV1().Pods(grc.gw.Namespace).Create(pod) +} + +// deleteGatewayPod deletes a given pod +func (grc *gwResourceCtx) deleteGatewayPod(pod *corev1.Pod) error { + return grc.controller.kubeClientset.CoreV1().Pods(grc.gw.Namespace).Delete(pod.Name, &metav1.DeleteOptions{}) +} + +// newGatewayPod returns a new pod of gateway +func (grc *gwResourceCtx) newGatewayPod() (*corev1.Pod, error) { + podTemplateSpec := grc.gw.Spec.DeploySpec.DeepCopy() + pod := &corev1.Pod{ + ObjectMeta: podTemplateSpec.ObjectMeta, + Spec: podTemplateSpec.Spec, + } + if pod.Namespace == "" { + pod.Namespace = grc.gw.Namespace + } + if pod.Name == "" { + pod.Name = grc.gw.Name + } + grc.setupContainersForGatewayPod(pod) + err := grc.SetObjectMeta(grc.gw, pod) + return pod, err +} + +// containers required for gateway deployment +func (grc *gwResourceCtx) setupContainersForGatewayPod(pod *corev1.Pod) { + // env variables + envVars := []corev1.EnvVar{ + { + Name: common.EnvVarGatewayNamespace, + Value: grc.gw.Namespace, + }, + { + Name: common.EnvVarGatewayEventSourceConfigMap, + Value: grc.gw.Spec.ConfigMap, + }, + { + Name: common.EnvVarGatewayName, + Value: grc.gw.Name, + }, + { + Name: common.EnvVarGatewayControllerInstanceID, + Value: grc.controller.Config.InstanceID, + }, + { + Name: common.EnvVarGatewayControllerName, + Value: common.DefaultGatewayControllerDeploymentName, + }, + { + Name: common.EnvVarGatewayServerPort, + Value: grc.gw.Spec.ProcessorPort, + }, + } + for i, container := range pod.Spec.Containers { + container.Env = append(container.Env, envVars...) + pod.Spec.Containers[i] = container + } +} diff --git a/controllers/sensor/controller.go b/controllers/sensor/controller.go index 3809b022c8..4051978ba5 100644 --- a/controllers/sensor/controller.go +++ b/controllers/sensor/controller.go @@ -23,19 +23,28 @@ import ( "log" "time" - base "github.com/argoproj/argo-events" - "github.com/argoproj/argo-events/common" - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" - sensorclientset "github.com/argoproj/argo-events/pkg/client/sensor/clientset/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/informers" + informersv1 "k8s.io/client-go/informers/core/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" + + base "github.com/argoproj/argo-events" + "github.com/argoproj/argo-events/common" + ccommon "github.com/argoproj/argo-events/controllers/common" + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" + clientset "github.com/argoproj/argo-events/pkg/client/sensor/clientset/versioned" ) const ( - sensorResyncPeriod = 20 * time.Minute + sensorResyncPeriod = 20 * time.Minute + sensorResourceResyncPeriod = 30 * time.Minute + rateLimiterBaseDelay = 5 * time.Second + rateLimiterMaxDelay = 1000 * time.Second ) // SensorControllerConfig contain the configuration settings for the sensor-controller @@ -60,22 +69,25 @@ type SensorController struct { // kubernetes config and apis kubeConfig *rest.Config kubeClientset kubernetes.Interface - sensorClientset sensorclientset.Interface + sensorClientset clientset.Interface // sensor informer and queue - informer cache.SharedIndexInformer - queue workqueue.RateLimitingInterface + podInformer informersv1.PodInformer + svcInformer informersv1.ServiceInformer + informer cache.SharedIndexInformer + queue workqueue.RateLimitingInterface } // NewSensorController creates a new Controller func NewSensorController(rest *rest.Config, configMap, namespace string) *SensorController { + rateLimiter := workqueue.NewItemExponentialFailureRateLimiter(rateLimiterBaseDelay, rateLimiterMaxDelay) return &SensorController{ ConfigMap: configMap, Namespace: namespace, kubeConfig: rest, kubeClientset: kubernetes.NewForConfigOrDie(rest), - sensorClientset: sensorclientset.NewForConfigOrDie(rest), - queue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), + sensorClientset: clientset.NewForConfigOrDie(rest), + queue: workqueue.NewRateLimitingQueue(rateLimiter), } } @@ -113,7 +125,7 @@ func (c *SensorController) processNextItem() bool { common.LabelEventType: string(common.EscalationEventType), common.LabelOperation: "controller_operation", } - if err := common.GenerateK8sEvent(c.kubeClientset, fmt.Sprintf("failed to operate on sensor %s, err :%+v", sensor.Name, err), common.EscalationEventType, + if err := common.GenerateK8sEvent(c.kubeClientset, fmt.Sprintf("failed to operate on sensor %s", sensor.Name), common.EscalationEventType, "sensor operation failed", sensor.Name, sensor.Namespace, c.Config.InstanceID, sensor.Kind, labels); err != nil { ctx.log.Error().Err(err).Msg("failed to create K8s event to escalate sensor operation failure") } @@ -166,6 +178,33 @@ func (c *SensorController) Run(ctx context.Context, ssThreads, eventThreads int) return } + listOptionsFunc := func(options *metav1.ListOptions) { + labelSelector := labels.NewSelector().Add(c.instanceIDReq()) + options.LabelSelector = labelSelector.String() + } + factory := ccommon.ArgoEventInformerFactory{ + OwnerGroupVersionKind: v1alpha1.SchemaGroupVersionKind, + OwnerInformer: c.informer, + SharedInformerFactory: informers.NewFilteredSharedInformerFactory(c.kubeClientset, sensorResourceResyncPeriod, c.Config.Namespace, listOptionsFunc), + Queue: c.queue, + } + + c.podInformer = factory.NewPodInformer() + go c.podInformer.Informer().Run(ctx.Done()) + + if !cache.WaitForCacheSync(ctx.Done(), c.podInformer.Informer().HasSynced) { + log.Panic("timed out waiting for the caches to sync for sensor pods") + return + } + + c.svcInformer = factory.NewServiceInformer() + go c.svcInformer.Informer().Run(ctx.Done()) + + if !cache.WaitForCacheSync(ctx.Done(), c.svcInformer.Informer().HasSynced) { + log.Panic("timed out waiting for the caches to sync for sensor services") + return + } + for i := 0; i < ssThreads; i++ { go wait.Until(c.runWorker, time.Second, ctx.Done()) } diff --git a/controllers/sensor/controller_test.go b/controllers/sensor/controller_test.go index 19ecd449c5..a3e09f92da 100644 --- a/controllers/sensor/controller_test.go +++ b/controllers/sensor/controller_test.go @@ -19,11 +19,18 @@ package sensor import ( "fmt" "testing" + "time" "github.com/argoproj/argo-events/common" fakesensor "github.com/argoproj/argo-events/pkg/client/sensor/clientset/versioned/fake" "github.com/smartystreets/goconvey/convey" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" ) @@ -32,7 +39,27 @@ var ( SensorControllerInstanceID = "argo-events" ) +func getFakePodSharedIndexInformer(clientset kubernetes.Interface) cache.SharedIndexInformer { + // NewListWatchFromClient doesn't work with fake client. + // ref: https://github.com/kubernetes/client-go/issues/352 + return cache.NewSharedIndexInformer(&cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return clientset.CoreV1().Pods("").List(options) + }, + WatchFunc: clientset.CoreV1().Pods("").Watch, + }, &corev1.Pod{}, 1*time.Second, cache.Indexers{}) +} + func getSensorController() *SensorController { + clientset := fake.NewSimpleClientset() + done := make(chan struct{}) + informer := getFakePodSharedIndexInformer(clientset) + go informer.Run(done) + factory := informers.NewSharedInformerFactory(clientset, 0) + podInformer := factory.Core().V1().Pods() + go podInformer.Informer().Run(done) + svcInformer := factory.Core().V1().Services() + go svcInformer.Informer().Run(done) return &SensorController{ ConfigMap: SensorControllerConfigmap, Namespace: common.DefaultControllerNamespace, @@ -40,8 +67,11 @@ func getSensorController() *SensorController { Namespace: common.DefaultControllerNamespace, InstanceID: SensorControllerInstanceID, }, - kubeClientset: fake.NewSimpleClientset(), + kubeClientset: clientset, sensorClientset: fakesensor.NewSimpleClientset(), + podInformer: podInformer, + svcInformer: svcInformer, + informer: informer, queue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), } } diff --git a/controllers/sensor/operator.go b/controllers/sensor/operator.go index f6b111ec8e..8e8168a570 100644 --- a/controllers/sensor/operator.go +++ b/controllers/sensor/operator.go @@ -19,15 +19,14 @@ package sensor import ( "time" + "github.com/pkg/errors" + "github.com/argoproj/argo-events/common" - pc "github.com/argoproj/argo-events/pkg/apis/common" "github.com/argoproj/argo-events/pkg/apis/sensor" "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" "github.com/rs/zerolog" corev1 "k8s.io/api/core/v1" - apierr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" ) // the context of an operation on a sensor. @@ -41,6 +40,8 @@ type sOperationCtx struct { log zerolog.Logger // reference to the sensor-controller controller *SensorController + // srctx is the context to handle child resource + srctx sResourceCtx } // newSensorOperationCtx creates and initializes a new sOperationCtx object @@ -50,6 +51,7 @@ func newSensorOperationCtx(s *v1alpha1.Sensor, controller *SensorController) *sO updated: false, log: common.GetLoggerContext(common.LoggerConf()).Str("sensor-name", s.Name).Str("sensor-namespace", s.Namespace).Logger(), controller: controller, + srctx: NewSensorResourceContext(s, controller), } } @@ -90,128 +92,220 @@ func (soc *sOperationCtx) operate() error { switch soc.s.Status.Phase { case v1alpha1.NodePhaseNew: - // perform one-time sensor validation - // non nil err indicates failed validation - // we do not want to requeue a sensor in this case - // since validation will fail every time - err := ValidateSensor(soc.s) + err := soc.createSensorResources() if err != nil { - soc.log.Error().Err(err).Msg("failed to validate sensor") - soc.markSensorPhase(v1alpha1.NodePhaseError, true, err.Error()) - return nil + return err } - // Initialize all event dependency nodes - for _, dependency := range soc.s.Spec.Dependencies { - InitializeNode(soc.s, dependency.Name, v1alpha1.NodeTypeEventDependency, &soc.log) - } + case v1alpha1.NodePhaseActive: + soc.log.Info().Msg("sensor is running") - // Initialize all dependency groups - if soc.s.Spec.DependencyGroups != nil { - for _, group := range soc.s.Spec.DependencyGroups { - InitializeNode(soc.s, group.Name, v1alpha1.NodeTypeDependencyGroup, &soc.log) - } + err := soc.updateSensorResources() + if err != nil { + return err } - // Initialize all trigger nodes - for _, trigger := range soc.s.Spec.Triggers { - InitializeNode(soc.s, trigger.Name, v1alpha1.NodeTypeTrigger, &soc.log) - } - - // add default env variables - soc.s.Spec.DeploySpec.Containers[0].Env = append(soc.s.Spec.DeploySpec.Containers[0].Env, []corev1.EnvVar{ - { - Name: common.SensorName, - Value: soc.s.Name, - }, - { - Name: common.SensorNamespace, - Value: soc.s.Namespace, - }, - { - Name: common.EnvVarSensorControllerInstanceID, - Value: soc.controller.Config.InstanceID, - }, - }..., - ) - - // create a sensor pod - // default label on sensor - if soc.s.ObjectMeta.Labels == nil { - soc.s.ObjectMeta.Labels = make(map[string]string) - } - soc.s.ObjectMeta.Labels[common.LabelSensorName] = soc.s.Name + case v1alpha1.NodePhaseError: + soc.log.Info().Msg("sensor is in error state. check sensor resource status information and corresponding escalated K8 event for the error") - sensorPod := &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: soc.s.Name, - Namespace: soc.s.Namespace, - Labels: soc.s.Labels, - OwnerReferences: []metav1.OwnerReference{ - *metav1.NewControllerRef(soc.s, v1alpha1.SchemaGroupVersionKind), - }, - }, - Spec: *soc.s.Spec.DeploySpec, + err := soc.updateSensorResources() + if err != nil { + return err } - _, err = soc.controller.kubeClientset.CoreV1().Pods(soc.s.Namespace).Create(sensorPod) + } + return nil +} + +func (soc *sOperationCtx) createSensorResources() error { + err := ValidateSensor(soc.s) + if err != nil { + soc.log.Error().Err(err).Msg("failed to validate sensor") + errors.Wrap(err, "failed to validate sensor") + soc.markSensorPhase(v1alpha1.NodePhaseError, false, err.Error()) + return err + } + + soc.initializeAllNodes() + pod, err := soc.createSensorPod() + if err != nil { + errors.Wrap(err, "failed to create sensor pod") + soc.markSensorPhase(v1alpha1.NodePhaseError, false, err.Error()) + return err + } + soc.markAllNodePhases() + soc.log.Info().Str("pod-name", pod.Name).Msg("sensor pod is created") + + // expose sensor if service is configured + if soc.srctx.getServiceTemplateSpec() != nil { + svc, err := soc.createSensorService() if err != nil { - soc.log.Error().Err(err).Msg("failed to create sensor pod") + errors.Wrap(err, "failed to create sensor service") + soc.markSensorPhase(v1alpha1.NodePhaseError, false, err.Error()) return err } - soc.log.Info().Msg("sensor pod created") - - // Create a ClusterIP service to expose sensor in cluster if the event protocol type is HTTP - if _, err = soc.controller.kubeClientset.CoreV1().Services(soc.s.Namespace).Get(common.DefaultServiceName(soc.s.Name), metav1.GetOptions{}); err != nil && apierr.IsNotFound(err) && soc.s.Spec.EventProtocol.Type == pc.HTTP { - // Create sensor service - sensorSvc := &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: common.DefaultServiceName(soc.s.Name), - Namespace: soc.s.Namespace, - OwnerReferences: []metav1.OwnerReference{ - *metav1.NewControllerRef(soc.s, v1alpha1.SchemaGroupVersionKind), - }, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Port: intstr.Parse(soc.s.Spec.EventProtocol.Http.Port).IntVal, - TargetPort: intstr.FromInt(int(intstr.Parse(soc.s.Spec.EventProtocol.Http.Port).IntVal)), - }, - }, - Type: corev1.ServiceTypeClusterIP, - Selector: soc.s.Labels, - }, - } - _, err = soc.controller.kubeClientset.CoreV1().Services(soc.s.Namespace).Create(sensorSvc) - if err != nil { - soc.log.Error().Err(err).Msg("failed to create sensor service") - return err - } + soc.log.Info().Str("svc-name", svc.Name).Msg("sensor service is created") + } + + // if we get here - we know the signals are running + soc.log.Info().Msg("marking sensor as active") + soc.markSensorPhase(v1alpha1.NodePhaseActive, false, "listening for events") + return nil +} + +func (soc *sOperationCtx) createSensorPod() (*corev1.Pod, error) { + pod, err := soc.srctx.newSensorPod() + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to initialize pod for sensor") + return nil, err + } + pod, err = soc.srctx.createSensorPod(pod) + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to create pod for sensor") + return nil, err + } + return pod, nil +} +func (soc *sOperationCtx) createSensorService() (*corev1.Service, error) { + svc, err := soc.srctx.newSensorService() + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to initialize service for sensor") + return nil, err + } + svc, err = soc.srctx.createSensorService(svc) + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to create service for sensor") + return nil, err + } + return svc, nil +} + +func (soc *sOperationCtx) updateSensorResources() error { + err := ValidateSensor(soc.s) + if err != nil { + soc.log.Error().Err(err).Msg("failed to validate sensor") + err = errors.Wrap(err, "failed to validate sensor") + if soc.s.Status.Phase != v1alpha1.NodePhaseError { + soc.markSensorPhase(v1alpha1.NodePhaseError, false, err.Error()) + } + return err + } + + _, podChanged, err := soc.updateSensorPod() + if err != nil { + err = errors.Wrap(err, "failed to update sensor pod") + soc.markSensorPhase(v1alpha1.NodePhaseError, false, err.Error()) + return err + } + + _, svcChanged, err := soc.updateSensorService() + if err != nil { + err = errors.Wrap(err, "failed to update sensor service") + soc.markSensorPhase(v1alpha1.NodePhaseError, false, err.Error()) + return err + } + + if soc.s.Status.Phase != v1alpha1.NodePhaseActive && (podChanged || svcChanged) { + soc.markSensorPhase(v1alpha1.NodePhaseActive, false, "sensor is active") + } + + return nil +} + +func (soc *sOperationCtx) updateSensorPod() (*corev1.Pod, bool, error) { + // Check if sensor spec has changed for pod. + existingPod, err := soc.srctx.getSensorPod() + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to get pod for sensor") + return nil, false, err + } + + // create a new pod spec + newPod, err := soc.srctx.newSensorPod() + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to initialize pod for sensor") + return nil, false, err + } + + // check if pod spec remained unchanged + if existingPod != nil { + if existingPod.Annotations != nil && existingPod.Annotations[common.AnnotationSensorResourceSpecHashName] == newPod.Annotations[common.AnnotationSensorResourceSpecHashName] { + soc.log.Debug().Str("sensor-name", soc.s.Name).Str("pod-name", existingPod.Name).Msg("sensor pod spec unchanged") + return nil, false, nil } - // Mark all event dependency nodes as active - for _, dependency := range soc.s.Spec.Dependencies { - MarkNodePhase(soc.s, dependency.Name, v1alpha1.NodeTypeEventDependency, v1alpha1.NodePhaseActive, nil, &soc.log, "node is active") + // By now we are sure that the spec changed, so lets go ahead and delete the exisitng sensor pod. + soc.log.Info().Str("pod-name", existingPod.Name).Msg("sensor pod spec changed") + + err := soc.srctx.deleteSensorPod(existingPod) + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to delete pod for sensor") + return nil, false, err } - // Mark all dependency groups as active - if soc.s.Spec.DependencyGroups != nil { - for _, group := range soc.s.Spec.DependencyGroups { - MarkNodePhase(soc.s, group.Name, v1alpha1.NodeTypeDependencyGroup, v1alpha1.NodePhaseActive, nil, &soc.log, "node is active") + soc.log.Info().Str("pod-name", existingPod.Name).Msg("sensor pod is deleted") + } + + // Create new pod for updated sensor spec. + createdPod, err := soc.srctx.createSensorPod(newPod) + if err != nil { + soc.log.Error().Err(err).Msg("failed to create pod for sensor") + return nil, false, err + } + soc.log.Info().Str("sensor-name", soc.s.Name).Str("pod-name", newPod.Name).Msg("sensor pod is created") + + return createdPod, true, nil +} + +func (soc *sOperationCtx) updateSensorService() (*corev1.Service, bool, error) { + // Check if sensor spec has changed for service. + existingSvc, err := soc.srctx.getSensorService() + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to get service for sensor") + return nil, false, err + } + + // create a new service spec + newSvc, err := soc.srctx.newSensorService() + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to initialize service for sensor") + return nil, false, err + } + + if existingSvc != nil { + // updated spec doesn't have service defined, delete existing service. + if newSvc == nil { + if err := soc.srctx.deleteSensorService(existingSvc); err != nil { + return nil, false, err } + return nil, true, nil + } + + // check if service spec remained unchanged + if existingSvc.Annotations[common.AnnotationSensorResourceSpecHashName] == newSvc.Annotations[common.AnnotationSensorResourceSpecHashName] { + soc.log.Debug().Str("sensor-name", soc.s.Name).Str("service-name", existingSvc.Name).Msg("sensor service spec unchanged") + return nil, false, nil } - // if we get here - we know the signals are running - soc.log.Info().Msg("marking sensor as active") - soc.markSensorPhase(v1alpha1.NodePhaseActive, false, "listening for events") + // service spec changed, delete existing service and create new one + soc.log.Info().Str("sensor-name", soc.s.Name).Str("service-name", existingSvc.Name).Msg("sensor service spec changed") - case v1alpha1.NodePhaseActive: - soc.log.Info().Msg("sensor is already running") + if err := soc.srctx.deleteSensorService(existingSvc); err != nil { + return nil, false, err + } + } else if newSvc == nil { + // sensor service doesn't exist originally + return nil, false, nil + } - case v1alpha1.NodePhaseError: - soc.log.Info().Msg("sensor is in error state. check sensor resource status information and corresponding escalated K8 event for the error") + // change createSensorService to take a service spec + createdSvc, err := soc.srctx.createSensorService(newSvc) + if err != nil { + soc.log.Error().Err(err).Str("sensor-name", soc.s.Name).Msg("failed to create service for sensor") + return nil, false, err } - return nil + soc.log.Info().Str("svc-name", newSvc.Name).Msg("sensor service is created") + + return createdSvc, true, nil } // mark the overall sensor phase @@ -252,3 +346,36 @@ func (soc *sOperationCtx) markSensorPhase(phase v1alpha1.NodePhase, markComplete } soc.updated = true } + +func (soc *sOperationCtx) initializeAllNodes() { + // Initialize all event dependency nodes + for _, dependency := range soc.s.Spec.Dependencies { + InitializeNode(soc.s, dependency.Name, v1alpha1.NodeTypeEventDependency, &soc.log) + } + + // Initialize all dependency groups + if soc.s.Spec.DependencyGroups != nil { + for _, group := range soc.s.Spec.DependencyGroups { + InitializeNode(soc.s, group.Name, v1alpha1.NodeTypeDependencyGroup, &soc.log) + } + } + + // Initialize all trigger nodes + for _, trigger := range soc.s.Spec.Triggers { + InitializeNode(soc.s, trigger.Name, v1alpha1.NodeTypeTrigger, &soc.log) + } +} + +func (soc *sOperationCtx) markAllNodePhases() { + // Mark all event dependency nodes as active + for _, dependency := range soc.s.Spec.Dependencies { + MarkNodePhase(soc.s, dependency.Name, v1alpha1.NodeTypeEventDependency, v1alpha1.NodePhaseActive, nil, &soc.log, "node is active") + } + + // Mark all dependency groups as active + if soc.s.Spec.DependencyGroups != nil { + for _, group := range soc.s.Spec.DependencyGroups { + MarkNodePhase(soc.s, group.Name, v1alpha1.NodeTypeDependencyGroup, v1alpha1.NodePhaseActive, nil, &soc.log, "node is active") + } + } +} diff --git a/controllers/sensor/operator_test.go b/controllers/sensor/operator_test.go index 368998d33d..c8b75216d8 100644 --- a/controllers/sensor/operator_test.go +++ b/controllers/sensor/operator_test.go @@ -17,12 +17,13 @@ limitations under the License. package sensor import ( - "github.com/argoproj/argo-events/common" + "testing" + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" "github.com/ghodss/yaml" "github.com/smartystreets/goconvey/convey" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "testing" + "k8s.io/client-go/tools/cache" ) var sensorStr = ` @@ -78,7 +79,14 @@ func getSensor() (*v1alpha1.Sensor, error) { return sensor, err } +func waitForAllInformers(done chan struct{}, controller *SensorController) { + cache.WaitForCacheSync(done, controller.informer.HasSynced) + cache.WaitForCacheSync(done, controller.podInformer.Informer().HasSynced) + cache.WaitForCacheSync(done, controller.svcInformer.Informer().HasSynced) +} + func TestSensorOperations(t *testing.T) { + done := make(chan struct{}) convey.Convey("Given a sensor, parse it", t, func() { sensor, err := getSensor() convey.So(err, convey.ShouldBeNil) @@ -94,6 +102,7 @@ func TestSensorOperations(t *testing.T) { convey.So(sensor, convey.ShouldNotBeNil) convey.Convey("Operate on a new sensor", func() { + soc.markSensorPhase(v1alpha1.NodePhaseNew, false, "test") err := soc.operate() convey.So(err, convey.ShouldBeNil) @@ -116,25 +125,200 @@ func TestSensorOperations(t *testing.T) { }) convey.Convey("Sensor pod and service should be created", func() { - sensorDeployment, err := controller.kubeClientset.CoreV1().Pods(soc.s.Namespace).Get(soc.s.Name, metav1.GetOptions{}) + sensorDeployment, err := controller.kubeClientset.CoreV1().Pods(soc.s.Namespace).Get("artifact-sensor", metav1.GetOptions{}) convey.So(err, convey.ShouldBeNil) convey.So(sensorDeployment, convey.ShouldNotBeNil) - sensorSvc, err := controller.kubeClientset.CoreV1().Services(soc.s.Namespace).Get(common.DefaultServiceName(soc.s.Name), metav1.GetOptions{}) + sensorSvc, err := controller.kubeClientset.CoreV1().Services(sensor.Namespace).Get("artifact-sensor-svc", metav1.GetOptions{}) convey.So(err, convey.ShouldBeNil) convey.So(sensorSvc, convey.ShouldNotBeNil) + + convey.Convey("Go to active state", func() { + sensor, err := controller.sensorClientset.ArgoprojV1alpha1().Sensors(sensor.Namespace).Get(sensor.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensor.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseActive) + }) }) + }) - convey.Convey("Operate on a running sensor", func() { - convey.So(soc.s.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseActive) + convey.Convey("Operate on sensor in active state", func() { + // Operate it once to create pod and service + soc.markSensorPhase(v1alpha1.NodePhaseNew, false, "test") + err := soc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, controller) + + soc.markSensorPhase(v1alpha1.NodePhaseActive, false, "test") + + convey.Convey("Operation must succeed", func() { err := soc.operate() convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, controller) + + convey.Convey("Untouch pod and service", func() { + sensorPod, err := controller.kubeClientset.CoreV1().Pods(sensor.Namespace).Get("artifact-sensor", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorPod, convey.ShouldNotBeNil) + + sensorSvc, err := controller.kubeClientset.CoreV1().Services(sensor.Namespace).Get("artifact-sensor-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorSvc, convey.ShouldNotBeNil) + + convey.Convey("Stay in active state", func() { + sensor, err := controller.sensorClientset.ArgoprojV1alpha1().Sensors(sensor.Namespace).Get(sensor.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensor.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseActive) + }) + }) }) - convey.Convey("Operate on a failed sensor", func() { - sensor.Status.Phase = v1alpha1.NodePhaseError + convey.Convey("Delete pod and service", func() { + err := controller.kubeClientset.CoreV1().Pods(sensor.Namespace).Delete("artifact-sensor", &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) + + err = controller.kubeClientset.CoreV1().Services(sensor.Namespace).Delete("artifact-sensor-svc", &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) + + waitForAllInformers(done, controller) + + convey.Convey("Operation must succeed", func() { + err := soc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, controller) + + convey.Convey("Create pod and service", func() { + sensorPod, err := controller.kubeClientset.CoreV1().Pods(sensor.Namespace).Get("artifact-sensor", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorPod, convey.ShouldNotBeNil) + + sensorSvc, err := controller.kubeClientset.CoreV1().Services(sensor.Namespace).Get("artifact-sensor-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorSvc, convey.ShouldNotBeNil) + + convey.Convey("Stay in active state", func() { + sensor, err := controller.sensorClientset.ArgoprojV1alpha1().Sensors(sensor.Namespace).Get(sensor.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensor.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseActive) + }) + }) + }) + }) + + convey.Convey("Change pod and service spec", func() { + soc.srctx.s.Spec.DeploySpec.Spec.RestartPolicy = "Never" + soc.srctx.s.Spec.EventProtocol.Http.Port = "1234" + + convey.Convey("Operation must succeed", func() { + err := soc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, controller) + + convey.Convey("Delete pod and service", func() { + sensorPod, err := controller.kubeClientset.CoreV1().Pods(sensor.Namespace).Get("artifact-sensor", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorPod.Spec.RestartPolicy, convey.ShouldEqual, "Never") + + sensorSvc, err := controller.kubeClientset.CoreV1().Services(sensor.Namespace).Get("artifact-sensor-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorSvc.Spec.Ports[0].TargetPort.IntVal, convey.ShouldEqual, 1234) + + convey.Convey("Stay in active state", func() { + sensor, err := controller.sensorClientset.ArgoprojV1alpha1().Sensors(sensor.Namespace).Get(sensor.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensor.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseActive) + }) + }) + }) + }) + }) + + convey.Convey("Operate on sensor in error state", func() { + // Operate it once to create pod and service + soc.markSensorPhase(v1alpha1.NodePhaseNew, false, "test") + err := soc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, controller) + soc.markSensorPhase(v1alpha1.NodePhaseError, false, "test") + + convey.Convey("Operation must succeed", func() { err := soc.operate() convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, controller) + + convey.Convey("Untouch pod and service", func() { + sensorPod, err := controller.kubeClientset.CoreV1().Pods(sensor.Namespace).Get("artifact-sensor", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorPod, convey.ShouldNotBeNil) + + sensorSvc, err := controller.kubeClientset.CoreV1().Services(sensor.Namespace).Get("artifact-sensor-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorSvc, convey.ShouldNotBeNil) + + convey.Convey("Stay in error state", func() { + sensor, err := controller.sensorClientset.ArgoprojV1alpha1().Sensors(sensor.Namespace).Get(sensor.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensor.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseError) + }) + }) + }) + + convey.Convey("Delete pod and service", func() { + err := controller.kubeClientset.CoreV1().Pods(sensor.Namespace).Delete("artifact-sensor", &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) + + err = controller.kubeClientset.CoreV1().Services(sensor.Namespace).Delete("artifact-sensor-svc", &metav1.DeleteOptions{}) + convey.So(err, convey.ShouldBeNil) + + waitForAllInformers(done, controller) + + convey.Convey("Operation must succeed", func() { + err := soc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, controller) + + convey.Convey("Create pod and service", func() { + sensorPod, err := controller.kubeClientset.CoreV1().Pods(sensor.Namespace).Get("artifact-sensor", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorPod, convey.ShouldNotBeNil) + + sensorSvc, err := controller.kubeClientset.CoreV1().Services(sensor.Namespace).Get("artifact-sensor-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorSvc, convey.ShouldNotBeNil) + + convey.Convey("Go to active state", func() { + sensor, err := controller.sensorClientset.ArgoprojV1alpha1().Sensors(sensor.Namespace).Get(sensor.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensor.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseActive) + }) + }) + }) + }) + + convey.Convey("Change pod and service spec", func() { + soc.srctx.s.Spec.DeploySpec.Spec.RestartPolicy = "Never" + soc.srctx.s.Spec.EventProtocol.Http.Port = "1234" + + convey.Convey("Operation must succeed", func() { + err := soc.operate() + convey.So(err, convey.ShouldBeNil) + waitForAllInformers(done, controller) + + convey.Convey("Delete pod and service", func() { + sensorPod, err := controller.kubeClientset.CoreV1().Pods(sensor.Namespace).Get("artifact-sensor", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorPod.Spec.RestartPolicy, convey.ShouldEqual, "Never") + + sensorSvc, err := controller.kubeClientset.CoreV1().Services(sensor.Namespace).Get("artifact-sensor-svc", metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensorSvc.Spec.Ports[0].TargetPort.IntVal, convey.ShouldEqual, 1234) + + convey.Convey("Go to active state", func() { + sensor, err := controller.sensorClientset.ArgoprojV1alpha1().Sensors(sensor.Namespace).Get(sensor.Name, metav1.GetOptions{}) + convey.So(err, convey.ShouldBeNil) + convey.So(sensor.Status.Phase, convey.ShouldEqual, v1alpha1.NodePhaseActive) + }) + }) + }) }) }) }) diff --git a/controllers/sensor/resource.go b/controllers/sensor/resource.go new file mode 100644 index 0000000000..567547fc71 --- /dev/null +++ b/controllers/sensor/resource.go @@ -0,0 +1,182 @@ +package sensor + +import ( + "github.com/argoproj/argo-events/common" + controllerscommon "github.com/argoproj/argo-events/controllers/common" + pc "github.com/argoproj/argo-events/pkg/apis/common" + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/util/intstr" +) + +type sResourceCtx struct { + // s is the gateway-controller object + s *v1alpha1.Sensor + // reference to the gateway-controller-controller + controller *SensorController + + controllerscommon.ChildResourceContext +} + +// NewSensorResourceContext returns new sResourceCtx +func NewSensorResourceContext(s *v1alpha1.Sensor, controller *SensorController) sResourceCtx { + return sResourceCtx{ + s: s, + controller: controller, + ChildResourceContext: controllerscommon.ChildResourceContext{ + SchemaGroupVersionKind: v1alpha1.SchemaGroupVersionKind, + LabelOwnerName: common.LabelSensorName, + LabelKeyOwnerControllerInstanceID: common.LabelKeySensorControllerInstanceID, + AnnotationOwnerResourceHashName: common.AnnotationSensorResourceSpecHashName, + InstanceID: controller.Config.InstanceID, + }, + } +} + +// sensorResourceLabelSelector returns label selector of the sensor of the context +func (src *sResourceCtx) sensorResourceLabelSelector() (labels.Selector, error) { + req, err := labels.NewRequirement(common.LabelSensorName, selection.Equals, []string{src.s.Name}) + if err != nil { + return nil, err + } + return labels.NewSelector().Add(*req), nil +} + +// createSensorService creates a service +func (src *sResourceCtx) createSensorService(svc *corev1.Service) (*corev1.Service, error) { + return src.controller.kubeClientset.CoreV1().Services(src.s.Namespace).Create(svc) +} + +// deleteSensorService deletes a given service +func (src *sResourceCtx) deleteSensorService(svc *corev1.Service) error { + return src.controller.kubeClientset.CoreV1().Services(src.s.Namespace).Delete(svc.Name, &metav1.DeleteOptions{}) +} + +// getSensorService returns the service of sensor +func (src *sResourceCtx) getSensorService() (*corev1.Service, error) { + selector, err := src.sensorResourceLabelSelector() + if err != nil { + return nil, err + } + svcs, err := src.controller.svcInformer.Lister().Services(src.s.Namespace).List(selector) + if err != nil { + return nil, err + } + if len(svcs) == 0 { + return nil, nil + } + return svcs[0], nil +} + +// newSensorService returns a new service that exposes sensor. +func (src *sResourceCtx) newSensorService() (*corev1.Service, error) { + serviceTemplateSpec := src.getServiceTemplateSpec() + if serviceTemplateSpec == nil { + return nil, nil + } + service := &corev1.Service{ + ObjectMeta: serviceTemplateSpec.ObjectMeta, + Spec: serviceTemplateSpec.Spec, + } + if service.Namespace == "" { + service.Namespace = src.s.Namespace + } + if service.Name == "" { + service.Name = common.DefaultServiceName(src.s.Name) + } + err := src.SetObjectMeta(src.s, service) + return service, err +} + +// getSensorPod returns the pod of sensor +func (src *sResourceCtx) getSensorPod() (*corev1.Pod, error) { + selector, err := src.sensorResourceLabelSelector() + if err != nil { + return nil, err + } + pods, err := src.controller.podInformer.Lister().Pods(src.s.Namespace).List(selector) + if err != nil { + return nil, err + } + if len(pods) == 0 { + return nil, nil + } + return pods[0], nil +} + +// createSensorPod creates a pod of sensor +func (src *sResourceCtx) createSensorPod(pod *corev1.Pod) (*corev1.Pod, error) { + return src.controller.kubeClientset.CoreV1().Pods(src.s.Namespace).Create(pod) +} + +// deleteSensorPod deletes a given pod +func (src *sResourceCtx) deleteSensorPod(pod *corev1.Pod) error { + return src.controller.kubeClientset.CoreV1().Pods(src.s.Namespace).Delete(pod.Name, &metav1.DeleteOptions{}) +} + +// newSensorPod returns a new pod of sensor +func (src *sResourceCtx) newSensorPod() (*corev1.Pod, error) { + podTemplateSpec := src.s.Spec.DeploySpec.DeepCopy() + pod := &corev1.Pod{ + ObjectMeta: podTemplateSpec.ObjectMeta, + Spec: podTemplateSpec.Spec, + } + if pod.Namespace == "" { + pod.Namespace = src.s.Namespace + } + if pod.Name == "" { + pod.Name = src.s.Name + } + src.setupContainersForSensorPod(pod) + err := src.SetObjectMeta(src.s, pod) + return pod, err +} + +// containers required for sensor deployment +func (src *sResourceCtx) setupContainersForSensorPod(pod *corev1.Pod) { + // env variables + envVars := []corev1.EnvVar{ + { + Name: common.SensorName, + Value: src.s.Name, + }, + { + Name: common.SensorNamespace, + Value: src.s.Namespace, + }, + { + Name: common.EnvVarSensorControllerInstanceID, + Value: src.controller.Config.InstanceID, + }, + } + for i, container := range pod.Spec.Containers { + container.Env = append(container.Env, envVars...) + pod.Spec.Containers[i] = container + } +} + +func (src *sResourceCtx) getServiceTemplateSpec() *pc.ServiceTemplateSpec { + var serviceSpec *pc.ServiceTemplateSpec + // Create a ClusterIP service to expose sensor in cluster if the event protocol type is HTTP + if src.s.Spec.EventProtocol.Type == pc.HTTP { + serviceSpec = &pc.ServiceTemplateSpec{ + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Port: intstr.Parse(src.s.Spec.EventProtocol.Http.Port).IntVal, + TargetPort: intstr.FromInt(int(intstr.Parse(src.s.Spec.EventProtocol.Http.Port).IntVal)), + }, + }, + Type: corev1.ServiceTypeClusterIP, + Selector: map[string]string{ + common.LabelSensorName: src.s.Name, + common.LabelKeySensorControllerInstanceID: src.controller.Config.InstanceID, + }, + }, + } + } + return serviceSpec +} diff --git a/controllers/sensor/validate.go b/controllers/sensor/validate.go index d31824b9c2..ed06614253 100644 --- a/controllers/sensor/validate.go +++ b/controllers/sensor/validate.go @@ -18,9 +18,10 @@ package sensor import ( "fmt" - "github.com/Knetic/govaluate" "time" + "github.com/Knetic/govaluate" + "github.com/argoproj/argo-events/common" pc "github.com/argoproj/argo-events/pkg/apis/common" "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" @@ -38,7 +39,7 @@ func ValidateSensor(s *v1alpha1.Sensor) error { if err != nil { return err } - if len(s.Spec.DeploySpec.Containers) > 1 { + if len(s.Spec.DeploySpec.Spec.Containers) > 1 { return fmt.Errorf("sensor pod specification can't have more than one container") } switch s.Spec.EventProtocol.Type { diff --git a/examples/sensors/amqp.yaml b/examples/sensors/amqp.yaml index 92879885d9..b6bd384245 100644 --- a/examples/sensors/amqp.yaml +++ b/examples/sensors/amqp.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/artifact-with-param-nats-standard.yaml b/examples/sensors/artifact-with-param-nats-standard.yaml index e130484c26..9d33c916a1 100644 --- a/examples/sensors/artifact-with-param-nats-standard.yaml +++ b/examples/sensors/artifact-with-param-nats-standard.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "NATS" nats: diff --git a/examples/sensors/artifact-with-param-nats-streaming.yaml b/examples/sensors/artifact-with-param-nats-streaming.yaml index 90621a7bbd..de58314dcc 100644 --- a/examples/sensors/artifact-with-param-nats-streaming.yaml +++ b/examples/sensors/artifact-with-param-nats-streaming.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "NATS" nats: diff --git a/examples/sensors/artifact-with-param.yaml b/examples/sensors/artifact-with-param.yaml index 526ba55f43..5d1b2dcbda 100644 --- a/examples/sensors/artifact-with-param.yaml +++ b/examples/sensors/artifact-with-param.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/artifact.yaml b/examples/sensors/artifact.yaml index 19a63c20f4..e83b4fa323 100644 --- a/examples/sensors/artifact.yaml +++ b/examples/sensors/artifact.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/aws-sns.yaml b/examples/sensors/aws-sns.yaml index 67802d0e17..9b3a955a38 100644 --- a/examples/sensors/aws-sns.yaml +++ b/examples/sensors/aws-sns.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/aws-sqs.yaml b/examples/sensors/aws-sqs.yaml index 1d5edfa1a1..3dd42aeec0 100644 --- a/examples/sensors/aws-sqs.yaml +++ b/examples/sensors/aws-sqs.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/calendar.yaml b/examples/sensors/calendar.yaml index 025a918b31..84627167e9 100644 --- a/examples/sensors/calendar.yaml +++ b/examples/sensors/calendar.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "calendar-gateway:interval" eventProtocol: diff --git a/examples/sensors/context-filter-webhook.yaml b/examples/sensors/context-filter-webhook.yaml index cce8fa3748..e0d10345c2 100644 --- a/examples/sensors/context-filter-webhook.yaml +++ b/examples/sensors/context-filter-webhook.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "webhook-gateway:foo" filters: diff --git a/examples/sensors/data-filter-webhook.yaml b/examples/sensors/data-filter-webhook.yaml index 35196cc523..b52c875481 100644 --- a/examples/sensors/data-filter-webhook.yaml +++ b/examples/sensors/data-filter-webhook.yaml @@ -7,11 +7,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor:v0.7.1" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor:v0.7.1" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "webhook-gateway-http:foo" filters: diff --git a/examples/sensors/file-sensor.yaml b/examples/sensors/file-sensor.yaml index a98ca8eab0..7fec6d38c1 100644 --- a/examples/sensors/file-sensor.yaml +++ b/examples/sensors/file-sensor.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "calendar-gateway:foo" eventProtocol: diff --git a/examples/sensors/file.yaml b/examples/sensors/file.yaml index 04a4edf8e2..cb0f1ba1b6 100644 --- a/examples/sensors/file.yaml +++ b/examples/sensors/file.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor:v0.6.3" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor:v0.6.3" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "file-gateway:bindir" eventProtocol: diff --git a/examples/sensors/gcp-pubsub.yaml b/examples/sensors/gcp-pubsub.yaml index 18aceb43b1..bc6343b312 100644 --- a/examples/sensors/gcp-pubsub.yaml +++ b/examples/sensors/gcp-pubsub.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/github.yaml b/examples/sensors/github.yaml index 5cdbe42153..39d32dc6a6 100644 --- a/examples/sensors/github.yaml +++ b/examples/sensors/github.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "webhook-gateway-http:push" eventProtocol: diff --git a/examples/sensors/gitlab.yaml b/examples/sensors/gitlab.yaml index 60ce300527..951ba6065a 100644 --- a/examples/sensors/gitlab.yaml +++ b/examples/sensors/gitlab.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/hdfs.yaml b/examples/sensors/hdfs.yaml index 89485fcb9b..8d60139741 100644 --- a/examples/sensors/hdfs.yaml +++ b/examples/sensors/hdfs.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor:v0.6.3" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor:v0.6.3" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "hdfs-gateway:tmpdir" eventProtocol: diff --git a/examples/sensors/inline-sensor.yaml b/examples/sensors/inline-sensor.yaml index 0eb0b86f9b..d3bcb139da 100644 --- a/examples/sensors/inline-sensor.yaml +++ b/examples/sensors/inline-sensor.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/kafka.yaml b/examples/sensors/kafka.yaml index a60bb81f80..648b6f0012 100644 --- a/examples/sensors/kafka.yaml +++ b/examples/sensors/kafka.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/mqtt-sensor.yaml b/examples/sensors/mqtt-sensor.yaml index e2dc5779b8..68fb101433 100644 --- a/examples/sensors/mqtt-sensor.yaml +++ b/examples/sensors/mqtt-sensor.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/multi-signal-sensor.yaml b/examples/sensors/multi-signal-sensor.yaml index 5e2926efd8..97cf963cb8 100644 --- a/examples/sensors/multi-signal-sensor.yaml +++ b/examples/sensors/multi-signal-sensor.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/multi-trigger-sensor.yaml b/examples/sensors/multi-trigger-sensor.yaml index bb91ad0679..9d14de3124 100644 --- a/examples/sensors/multi-trigger-sensor.yaml +++ b/examples/sensors/multi-trigger-sensor.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/nats.yaml b/examples/sensors/nats.yaml index 752f7d2583..dada92658c 100644 --- a/examples/sensors/nats.yaml +++ b/examples/sensors/nats.yaml @@ -8,11 +8,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/resource.yaml b/examples/sensors/resource.yaml index 56948c7f36..941c595a0b 100644 --- a/examples/sensors/resource.yaml +++ b/examples/sensors/resource.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/storage-grid-sensor.yaml b/examples/sensors/storage-grid-sensor.yaml index 5471792870..5b499e4245 100644 --- a/examples/sensors/storage-grid-sensor.yaml +++ b/examples/sensors/storage-grid-sensor.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "storage-grid-gateway:my_bucket" eventProtocol: diff --git a/examples/sensors/time-filter-webhook.yaml b/examples/sensors/time-filter-webhook.yaml index 420f23e58a..6a8d9a4166 100644 --- a/examples/sensors/time-filter-webhook.yaml +++ b/examples/sensors/time-filter-webhook.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/trello.yaml b/examples/sensors/trello.yaml index 1efd3dd7c2..86e6d21b7e 100644 --- a/examples/sensors/trello.yaml +++ b/examples/sensors/trello.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/trigger-gateway.yaml b/examples/sensors/trigger-gateway.yaml index 4ca7c4d1e1..d716625e13 100644 --- a/examples/sensors/trigger-gateway.yaml +++ b/examples/sensors/trigger-gateway.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/trigger-source-configmap.yaml b/examples/sensors/trigger-source-configmap.yaml index 5c37231667..26c07762a4 100644 --- a/examples/sensors/trigger-source-configmap.yaml +++ b/examples/sensors/trigger-source-configmap.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/trigger-source-git.yaml b/examples/sensors/trigger-source-git.yaml index 1fee2d7f81..c35da1ed1e 100644 --- a/examples/sensors/trigger-source-git.yaml +++ b/examples/sensors/trigger-source-git.yaml @@ -6,18 +6,19 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - # this is an experimental image - image: "argoproj/sensor:v0.7.3" - imagePullPolicy: Always - volumeMounts: - - mountPath: /git/argoproj - name: argoproj - volumes: - - name: argoproj - emptyDir: {} - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + # this is an experimental image + image: "argoproj/sensor:v0.7.3" + imagePullPolicy: Always + volumeMounts: + - mountPath: /git/argoproj + name: argoproj + volumes: + - name: argoproj + emptyDir: {} + serviceAccountName: argo-events-sa dependencies: - name: "webhook-gateway-http:foo" eventProtocol: diff --git a/examples/sensors/trigger-standard-k8s-resource.yaml b/examples/sensors/trigger-standard-k8s-resource.yaml index 43f597703f..58de47b726 100644 --- a/examples/sensors/trigger-standard-k8s-resource.yaml +++ b/examples/sensors/trigger-standard-k8s-resource.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "webhook-gateway-http:foo" eventProtocol: diff --git a/examples/sensors/url-sensor.yaml b/examples/sensors/url-sensor.yaml index 669d2135bb..f6964afe26 100644 --- a/examples/sensors/url-sensor.yaml +++ b/examples/sensors/url-sensor.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "HTTP" http: diff --git a/examples/sensors/webhook-http-boolean.yaml b/examples/sensors/webhook-http-boolean.yaml index 32818cdaed..0f8483ee52 100644 --- a/examples/sensors/webhook-http-boolean.yaml +++ b/examples/sensors/webhook-http-boolean.yaml @@ -9,11 +9,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa # defines list of all events sensor will accept dependencies: - name: "webhook-gateway-http:foo" diff --git a/examples/sensors/webhook-http-dependency-groups.yaml b/examples/sensors/webhook-http-dependency-groups.yaml index e173e97628..a12d6172d5 100644 --- a/examples/sensors/webhook-http-dependency-groups.yaml +++ b/examples/sensors/webhook-http-dependency-groups.yaml @@ -9,11 +9,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "webhook-gateway-http:endpoint1" filters: diff --git a/examples/sensors/webhook-http.yaml b/examples/sensors/webhook-http.yaml index c0116176ed..053d3aad56 100644 --- a/examples/sensors/webhook-http.yaml +++ b/examples/sensors/webhook-http.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "webhook-gateway-http:foo" eventProtocol: @@ -39,4 +40,4 @@ spec: - "hello world" command: - cowsay - image: "docker/whalesay:latest" \ No newline at end of file + image: "docker/whalesay:latest" diff --git a/examples/sensors/webhook-nats-streaming.yaml b/examples/sensors/webhook-nats-streaming.yaml index 464294085d..8d0a43154a 100644 --- a/examples/sensors/webhook-nats-streaming.yaml +++ b/examples/sensors/webhook-nats-streaming.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "NATS" nats: diff --git a/examples/sensors/webhook-nats.yaml b/examples/sensors/webhook-nats.yaml index 30e3b63732..b36cf84cd0 100644 --- a/examples/sensors/webhook-nats.yaml +++ b/examples/sensors/webhook-nats.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa dependencies: - name: "webhook-gateway-nats:foo" eventProtocol: diff --git a/examples/sensors/webhook-with-complete-payload.yaml b/examples/sensors/webhook-with-complete-payload.yaml index d51136bdc5..af7ddcb683 100644 --- a/examples/sensors/webhook-with-complete-payload.yaml +++ b/examples/sensors/webhook-with-complete-payload.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "NATS" nats: diff --git a/examples/sensors/webhook-with-resource-param.yaml b/examples/sensors/webhook-with-resource-param.yaml index f41926ac21..484274835e 100644 --- a/examples/sensors/webhook-with-resource-param.yaml +++ b/examples/sensors/webhook-with-resource-param.yaml @@ -6,11 +6,12 @@ metadata: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: deploySpec: - containers: - - name: "sensor" - image: "argoproj/sensor" - imagePullPolicy: Always - serviceAccountName: argo-events-sa + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa eventProtocol: type: "NATS" nats: diff --git a/gateways/common/naivewatcher/watcher_test.go b/gateways/common/naivewatcher/watcher_test.go index 8c43bb2074..f79f1a639c 100644 --- a/gateways/common/naivewatcher/watcher_test.go +++ b/gateways/common/naivewatcher/watcher_test.go @@ -113,11 +113,15 @@ func TestWatcherAutoCheck(t *testing.T) { if err != nil { t.Fatal(err) } + var actualOps fsevent.Op time.Sleep(200 * time.Millisecond) events = readEvents(t, watcher) - assert.Equal(t, []fsevent.Event{ - {Op: fsevent.Write | fsevent.Rename | fsevent.Chmod, Name: filepath.Join(tmpdir, "foo")}, - }, events) + for _, event := range events { + if event.Name == filepath.Join(tmpdir, "foo") { + actualOps |= event.Op + } + } + assert.Equal(t, fsevent.Write|fsevent.Rename|fsevent.Chmod, actualOps) // Remove a file err = os.Remove(filepath.Join(tmpdir, "foo")) diff --git a/gateways/event-sources.go b/gateways/event-sources.go index 2bdfd388e5..5868c119c4 100644 --- a/gateways/event-sources.go +++ b/gateways/event-sources.go @@ -37,7 +37,7 @@ import ( func (gc *GatewayConfig) createInternalEventSources(cm *corev1.ConfigMap) (map[string]*EventSourceContext, error) { configs := make(map[string]*EventSourceContext) for configKey, configValue := range cm.Data { - hashKey := Hasher(configKey + configValue) + hashKey := common.Hasher(configKey + configValue) gc.Log.Info().Str("config-key", configKey).Str("config-value", configValue).Str("hash", string(hashKey)).Msg("event source") // create a connection to gateway server diff --git a/gateways/utils.go b/gateways/utils.go index 2c7c83c107..8dd0387529 100644 --- a/gateways/utils.go +++ b/gateways/utils.go @@ -17,20 +17,11 @@ limitations under the License. package gateways import ( - "fmt" - "hash/fnv" "time" "k8s.io/apimachinery/pkg/util/wait" ) -// Hasher hashes a string -func Hasher(value string) string { - h := fnv.New32a() - _, _ = h.Write([]byte(value)) - return fmt.Sprintf("%v", h.Sum32()) -} - // SetValidateReason set the result of event source validation func SetValidEventSource(v *ValidEventSource, reason string, valid bool) { v.Reason = reason diff --git a/gateways/utils_test.go b/gateways/utils_test.go index 6d6cf7e278..8017d4e043 100644 --- a/gateways/utils_test.go +++ b/gateways/utils_test.go @@ -22,11 +22,6 @@ import ( ) func TestGatewayUtil(t *testing.T) { - convey.Convey("Given a value, hash it", t, func() { - hash := Hasher("test") - convey.So(hash, convey.ShouldNotBeEmpty) - }) - convey.Convey("Given a event source, set the validation message", t, func() { v := ValidEventSource{} SetValidEventSource(&v, "event source is valid", true) diff --git a/pkg/apis/common/deepcopy_generated.go b/pkg/apis/common/deepcopy_generated.go index 695144570b..a84fcce7b0 100644 --- a/pkg/apis/common/deepcopy_generated.go +++ b/pkg/apis/common/deepcopy_generated.go @@ -198,6 +198,24 @@ func (in *S3Filter) DeepCopy() *S3Filter { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceTemplateSpec) DeepCopyInto(out *ServiceTemplateSpec) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceTemplateSpec. +func (in *ServiceTemplateSpec) DeepCopy() *ServiceTemplateSpec { + if in == nil { + return nil + } + out := new(ServiceTemplateSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *URI) DeepCopyInto(out *URI) { *out = *in diff --git a/pkg/apis/common/event.go b/pkg/apis/common/event.go index 440bfcade7..f40e86cec7 100644 --- a/pkg/apis/common/event.go +++ b/pkg/apis/common/event.go @@ -16,7 +16,10 @@ limitations under the License. package common -import "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) // EventProtocolType is type of the event dispatch protocol. Used for dispatching events type EventProtocolType string @@ -68,7 +71,7 @@ type EventContext struct { // Timestamp of when the event happened. Must adhere to format specified in RFC 3339. - EventTime v1.MicroTime `json:"eventTime" protobuf:"bytes,6,opt,name=eventTime"` + EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,6,opt,name=eventTime"` // A link to the schema that the data attribute adheres to. // Must adhere to the format specified in RFC 3986. @@ -145,3 +148,16 @@ type Nats struct { // Type of the connection. either standard or streaming Type NatsType `json:"type" protobuf:"bytes,10,opt,name=type"` } + +// ServiceTemplateSpec is the template spec contains metadata and service spec. +type ServiceTemplateSpec struct { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Specification of the desired behavior of the pod. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // +optional + Spec corev1.ServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} diff --git a/pkg/apis/common/generated.pb.go b/pkg/apis/common/generated.pb.go index 5ac96b2433..19b9ad1544 100644 --- a/pkg/apis/common/generated.pb.go +++ b/pkg/apis/common/generated.pb.go @@ -17,20 +17,20 @@ limitations under the License. package common -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + fmt "fmt" -import v11 "k8s.io/api/core/v1" + io "io" -import github_com_minio_minio_go "github.com/minio/minio-go" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + github_com_minio_minio_go "github.com/minio/minio-go" + v11 "k8s.io/api/core/v1" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import strings "strings" -import reflect "reflect" - -import io "io" + math "math" + reflect "reflect" + strings "strings" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{0} + return fileDescriptor_02aae6165a434fa7, []int{0} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -59,8 +59,8 @@ func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(dst, src) +func (m *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) } func (m *Event) XXX_Size() int { return m.Size() @@ -74,7 +74,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventContext) Reset() { *m = EventContext{} } func (*EventContext) ProtoMessage() {} func (*EventContext) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{1} + return fileDescriptor_02aae6165a434fa7, []int{1} } func (m *EventContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -87,8 +87,8 @@ func (m *EventContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) } return b[:n], nil } -func (dst *EventContext) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventContext.Merge(dst, src) +func (m *EventContext) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventContext.Merge(m, src) } func (m *EventContext) XXX_Size() int { return m.Size() @@ -102,7 +102,7 @@ var xxx_messageInfo_EventContext proto.InternalMessageInfo func (m *EventProtocol) Reset() { *m = EventProtocol{} } func (*EventProtocol) ProtoMessage() {} func (*EventProtocol) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{2} + return fileDescriptor_02aae6165a434fa7, []int{2} } func (m *EventProtocol) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -115,8 +115,8 @@ func (m *EventProtocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error } return b[:n], nil } -func (dst *EventProtocol) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventProtocol.Merge(dst, src) +func (m *EventProtocol) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventProtocol.Merge(m, src) } func (m *EventProtocol) XXX_Size() int { return m.Size() @@ -130,7 +130,7 @@ var xxx_messageInfo_EventProtocol proto.InternalMessageInfo func (m *Http) Reset() { *m = Http{} } func (*Http) ProtoMessage() {} func (*Http) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{3} + return fileDescriptor_02aae6165a434fa7, []int{3} } func (m *Http) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -143,8 +143,8 @@ func (m *Http) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *Http) XXX_Merge(src proto.Message) { - xxx_messageInfo_Http.Merge(dst, src) +func (m *Http) XXX_Merge(src proto.Message) { + xxx_messageInfo_Http.Merge(m, src) } func (m *Http) XXX_Size() int { return m.Size() @@ -158,7 +158,7 @@ var xxx_messageInfo_Http proto.InternalMessageInfo func (m *Nats) Reset() { *m = Nats{} } func (*Nats) ProtoMessage() {} func (*Nats) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{4} + return fileDescriptor_02aae6165a434fa7, []int{4} } func (m *Nats) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -171,8 +171,8 @@ func (m *Nats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *Nats) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nats.Merge(dst, src) +func (m *Nats) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nats.Merge(m, src) } func (m *Nats) XXX_Size() int { return m.Size() @@ -186,7 +186,7 @@ var xxx_messageInfo_Nats proto.InternalMessageInfo func (m *S3Artifact) Reset() { *m = S3Artifact{} } func (*S3Artifact) ProtoMessage() {} func (*S3Artifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{5} + return fileDescriptor_02aae6165a434fa7, []int{5} } func (m *S3Artifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -199,8 +199,8 @@ func (m *S3Artifact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *S3Artifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_S3Artifact.Merge(dst, src) +func (m *S3Artifact) XXX_Merge(src proto.Message) { + xxx_messageInfo_S3Artifact.Merge(m, src) } func (m *S3Artifact) XXX_Size() int { return m.Size() @@ -214,7 +214,7 @@ var xxx_messageInfo_S3Artifact proto.InternalMessageInfo func (m *S3Bucket) Reset() { *m = S3Bucket{} } func (*S3Bucket) ProtoMessage() {} func (*S3Bucket) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{6} + return fileDescriptor_02aae6165a434fa7, []int{6} } func (m *S3Bucket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -227,8 +227,8 @@ func (m *S3Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *S3Bucket) XXX_Merge(src proto.Message) { - xxx_messageInfo_S3Bucket.Merge(dst, src) +func (m *S3Bucket) XXX_Merge(src proto.Message) { + xxx_messageInfo_S3Bucket.Merge(m, src) } func (m *S3Bucket) XXX_Size() int { return m.Size() @@ -242,7 +242,7 @@ var xxx_messageInfo_S3Bucket proto.InternalMessageInfo func (m *S3Filter) Reset() { *m = S3Filter{} } func (*S3Filter) ProtoMessage() {} func (*S3Filter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{7} + return fileDescriptor_02aae6165a434fa7, []int{7} } func (m *S3Filter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -255,8 +255,8 @@ func (m *S3Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *S3Filter) XXX_Merge(src proto.Message) { - xxx_messageInfo_S3Filter.Merge(dst, src) +func (m *S3Filter) XXX_Merge(src proto.Message) { + xxx_messageInfo_S3Filter.Merge(m, src) } func (m *S3Filter) XXX_Size() int { return m.Size() @@ -267,10 +267,38 @@ func (m *S3Filter) XXX_DiscardUnknown() { var xxx_messageInfo_S3Filter proto.InternalMessageInfo +func (m *ServiceTemplateSpec) Reset() { *m = ServiceTemplateSpec{} } +func (*ServiceTemplateSpec) ProtoMessage() {} +func (*ServiceTemplateSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_02aae6165a434fa7, []int{8} +} +func (m *ServiceTemplateSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ServiceTemplateSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceTemplateSpec.Merge(m, src) +} +func (m *ServiceTemplateSpec) XXX_Size() int { + return m.Size() +} +func (m *ServiceTemplateSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceTemplateSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceTemplateSpec proto.InternalMessageInfo + func (m *URI) Reset() { *m = URI{} } func (*URI) ProtoMessage() {} func (*URI) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{8} + return fileDescriptor_02aae6165a434fa7, []int{9} } func (m *URI) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -283,8 +311,8 @@ func (m *URI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *URI) XXX_Merge(src proto.Message) { - xxx_messageInfo_URI.Merge(dst, src) +func (m *URI) XXX_Merge(src proto.Message) { + xxx_messageInfo_URI.Merge(m, src) } func (m *URI) XXX_Size() int { return m.Size() @@ -305,8 +333,105 @@ func init() { proto.RegisterType((*S3Artifact)(nil), "github.com.argoproj.argo_events.pkg.apis.common.S3Artifact") proto.RegisterType((*S3Bucket)(nil), "github.com.argoproj.argo_events.pkg.apis.common.S3Bucket") proto.RegisterType((*S3Filter)(nil), "github.com.argoproj.argo_events.pkg.apis.common.S3Filter") + proto.RegisterType((*ServiceTemplateSpec)(nil), "github.com.argoproj.argo_events.pkg.apis.common.ServiceTemplateSpec") proto.RegisterType((*URI)(nil), "github.com.argoproj.argo_events.pkg.apis.common.URI") } + +func init() { + proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/common/generated.proto", fileDescriptor_02aae6165a434fa7) +} + +var fileDescriptor_02aae6165a434fa7 = []byte{ + // 1383 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xd1, 0x6f, 0x13, 0x47, + 0x13, 0x8f, 0x13, 0xc7, 0xb1, 0xd7, 0xf0, 0x25, 0x6c, 0x3e, 0xf4, 0x59, 0xf9, 0x84, 0x93, 0xba, + 0x6a, 0x95, 0x4a, 0x70, 0x2e, 0x01, 0x24, 0x5a, 0x09, 0xb5, 0x71, 0x12, 0xd4, 0x14, 0x42, 0xd3, + 0x3d, 0x02, 0x15, 0x52, 0x55, 0x36, 0xe7, 0x89, 0xbd, 0xe4, 0xee, 0xf6, 0xd8, 0xdb, 0x73, 0xf1, + 0x5b, 0xfb, 0x1f, 0x54, 0x95, 0xfa, 0xaf, 0xf4, 0xa1, 0x6f, 0x7d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, + 0x7a, 0x7e, 0xdc, 0x2c, 0xbd, 0x38, 0x6e, 0x96, 0x5e, 0x1e, 0x37, 0x4b, 0x7f, 0x1e, 0x37, 0x4b, + 0x3f, 0xfd, 0xd5, 0x9c, 0x7a, 0x54, 0x49, 0x2b, 0xfd, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, + 0xef, 0xd2, 0x42, 0x95, 0x0d, 0x00, 0x00, +} + func (m *Event) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -687,6 +812,40 @@ func (m *S3Filter) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *ServiceTemplateSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceTemplateSpec) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) + n11, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) + n12, err := m.Spec.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + return i, nil +} + func (m *URI) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -907,6 +1066,19 @@ func (m *S3Filter) Size() (n int) { return n } +func (m *ServiceTemplateSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *URI) Size() (n int) { if m == nil { return 0 @@ -1063,6 +1235,17 @@ func (this *S3Filter) String() string { }, "") return s } +func (this *ServiceTemplateSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceTemplateSpec{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "v11.ServiceSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *URI) String() string { if this == nil { return "nil" @@ -1103,7 +1286,7 @@ func (m *Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1131,7 +1314,7 @@ func (m *Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1140,6 +1323,9 @@ func (m *Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1161,7 +1347,7 @@ func (m *Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1170,6 +1356,9 @@ func (m *Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1187,6 +1376,9 @@ func (m *Event) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1214,7 +1406,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1242,7 +1434,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1252,6 +1444,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1271,7 +1466,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1281,6 +1476,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1300,7 +1498,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1310,6 +1508,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1329,7 +1530,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1338,6 +1539,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1362,7 +1566,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1372,6 +1576,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1391,7 +1598,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1400,6 +1607,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1421,7 +1631,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1430,6 +1640,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1454,7 +1667,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1464,6 +1677,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1483,7 +1699,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1492,6 +1708,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1512,7 +1731,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1529,7 +1748,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1539,6 +1758,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -1555,7 +1777,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift + stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1565,6 +1787,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } @@ -1596,6 +1821,9 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1623,7 +1851,7 @@ func (m *EventProtocol) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1651,7 +1879,7 @@ func (m *EventProtocol) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1661,6 +1889,9 @@ func (m *EventProtocol) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1680,7 +1911,7 @@ func (m *EventProtocol) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1689,6 +1920,9 @@ func (m *EventProtocol) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1710,7 +1944,7 @@ func (m *EventProtocol) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1719,6 +1953,9 @@ func (m *EventProtocol) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1735,6 +1972,9 @@ func (m *EventProtocol) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1762,7 +2002,7 @@ func (m *Http) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1790,7 +2030,7 @@ func (m *Http) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1800,6 +2040,9 @@ func (m *Http) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1814,6 +2057,9 @@ func (m *Http) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1841,7 +2087,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1869,7 +2115,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1879,6 +2125,9 @@ func (m *Nats) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1898,7 +2147,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1918,7 +2167,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1938,7 +2187,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1948,6 +2197,9 @@ func (m *Nats) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1967,7 +2219,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1977,6 +2229,9 @@ func (m *Nats) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1996,7 +2251,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2006,6 +2261,9 @@ func (m *Nats) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2025,7 +2283,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2045,7 +2303,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2055,6 +2313,9 @@ func (m *Nats) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2074,7 +2335,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2084,6 +2345,9 @@ func (m *Nats) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2103,7 +2367,7 @@ func (m *Nats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2113,6 +2377,9 @@ func (m *Nats) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2127,6 +2394,9 @@ func (m *Nats) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2154,7 +2424,7 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2182,7 +2452,7 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2192,6 +2462,9 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2211,7 +2484,7 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2220,6 +2493,9 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2244,7 +2520,7 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2254,6 +2530,9 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2273,7 +2552,7 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2293,7 +2572,7 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2302,6 +2581,9 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2326,7 +2608,7 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2335,6 +2617,9 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2359,7 +2644,7 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2369,6 +2654,9 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2388,7 +2676,7 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2397,6 +2685,9 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2416,6 +2707,9 @@ func (m *S3Artifact) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2443,7 +2737,7 @@ func (m *S3Bucket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2471,7 +2765,7 @@ func (m *S3Bucket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2481,6 +2775,9 @@ func (m *S3Bucket) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2500,7 +2797,7 @@ func (m *S3Bucket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2510,6 +2807,9 @@ func (m *S3Bucket) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2524,6 +2824,9 @@ func (m *S3Bucket) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2551,7 +2854,7 @@ func (m *S3Filter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2579,7 +2882,7 @@ func (m *S3Filter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2589,6 +2892,9 @@ func (m *S3Filter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2608,7 +2914,7 @@ func (m *S3Filter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2618,6 +2924,9 @@ func (m *S3Filter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2632,6 +2941,128 @@ func (m *S3Filter) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceTemplateSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceTemplateSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2659,7 +3090,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2687,7 +3118,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2697,6 +3128,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2716,7 +3150,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2726,6 +3160,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2745,7 +3182,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2755,6 +3192,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2774,7 +3214,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2784,6 +3224,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2803,7 +3246,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Port |= (int32(b) & 0x7F) << shift + m.Port |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2822,7 +3265,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2832,6 +3275,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2851,7 +3297,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2861,6 +3307,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2880,7 +3329,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2890,6 +3339,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2904,6 +3356,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2970,10 +3425,13 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthGenerated } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } return iNdEx, nil case 3: for { @@ -3002,6 +3460,9 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } } return iNdEx, nil case 4: @@ -3020,93 +3481,3 @@ var ( ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ) - -func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/common/generated.proto", fileDescriptor_generated_fe300a967e896a62) -} - -var fileDescriptor_generated_fe300a967e896a62 = []byte{ - // 1309 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 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 0x5f, 0x6b, 0x1f, 0xdd, 0x51, 0x0e, - 0x17, 0xa6, 0x06, 0x37, 0x10, 0x92, 0xb9, 0xa3, 0x1b, 0xb3, 0x35, 0xac, 0xdd, 0x2a, 0x30, 0x11, - 0x0d, 0x06, 0x3c, 0x66, 0x72, 0x5c, 0x14, 0x1e, 0x31, 0x4d, 0xe7, 0x45, 0xb9, 0x6f, 0x8a, 0x92, - 0x49, 0xac, 0x79, 0xc4, 0xce, 0x04, 0xdc, 0x7c, 0x53, 0x40, 0xa2, 0x79, 0xe8, 0xf2, 0x58, 0x2b, - 0x2d, 0x67, 0x83, 0xda, 0xbf, 0x95, 0x50, 0xa5, 0x63, 0x3a, 0x81, 0x07, 0x68, 0x39, 0x10, 0xb1, - 0x66, 0xcf, 0x75, 0xb3, 0xb4, 0x51, 0xda, 0x6c, 0x6c, 0xdd, 0x75, 0xce, 0xd9, 0x3b, 0x07, 0x88, - 0x76, 0x52, 0x12, 0x6f, 0xe5, 0xc5, 0xf1, 0xfa, 0xc2, 0xe4, 0x78, 0x7d, 0xd9, 0x1a, 0x48, 0x46, - 0x8f, 0xd7, 0x51, 0xb9, 0x4b, 0x35, 0x6d, 0x2e, 0x6e, 0x94, 0x36, 0x2f, 0x78, 0x0d, 0x83, 0xd9, - 0xa7, 0xe3, 0x50, 0xd0, 0x2e, 0x01, 0x47, 0xfb, 0xf7, 0x2a, 0xba, 0x30, 0xcd, 0x85, 0x5d, 0x54, - 0x87, 0x94, 0xdf, 0x8c, 0x87, 0x0c, 0xaa, 0xab, 0x7b, 0x97, 0x2c, 0x7d, 0xbd, 0x93, 0x39, 0x48, - 0x81, 0xc1, 0xbb, 0x68, 0x35, 0x5f, 0x3c, 0x66, 0x52, 0x71, 0x11, 0x43, 0xba, 0xba, 0xd7, 0xb4, - 0x71, 0xab, 0x9d, 0x19, 0x3f, 0x39, 0x13, 0x81, 0xbf, 0x42, 0x38, 0x08, 0x45, 0xd2, 0x05, 0xa8, - 0xca, 0x78, 0x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x56, 0xe9, 0xd5, - 0xa4, 0x55, 0xfa, 0x7b, 0xd2, 0x2a, 0xfd, 0xfa, 0x4f, 0x6b, 0xe1, 0x69, 0x35, 0x15, 0xcb, 0x7f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xb2, 0xdb, 0x82, 0x8c, 0xd8, 0x0c, 0x00, 0x00, -} diff --git a/pkg/apis/common/generated.proto b/pkg/apis/common/generated.proto index 16484c6041..9a7d61e88d 100644 --- a/pkg/apis/common/generated.proto +++ b/pkg/apis/common/generated.proto @@ -157,6 +157,19 @@ message S3Filter { optional string suffix = 2; } +// ServiceTemplateSpec is the template spec contains metadata and service spec. +message ServiceTemplateSpec { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the pod. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // +optional + optional k8s.io.api.core.v1.ServiceSpec spec = 2; +} + // URI is a Uniform Resource Identifier based on RFC 3986 message URI { optional string scheme = 1; diff --git a/pkg/apis/gateway/v1alpha1/generated.pb.go b/pkg/apis/gateway/v1alpha1/generated.pb.go index a14fedd9a5..8191c6af16 100644 --- a/pkg/apis/gateway/v1alpha1/generated.pb.go +++ b/pkg/apis/gateway/v1alpha1/generated.pb.go @@ -17,19 +17,21 @@ limitations under the License. package v1alpha1 -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import common "github.com/argoproj/argo-events/pkg/apis/common" +import ( + fmt "fmt" -import v11 "k8s.io/api/core/v1" + common "github.com/argoproj/argo-events/pkg/apis/common" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + io "io" -import strings "strings" -import reflect "reflect" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + v11 "k8s.io/api/core/v1" -import io "io" + math "math" + reflect "reflect" + strings "strings" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -45,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *Gateway) Reset() { *m = Gateway{} } func (*Gateway) ProtoMessage() {} func (*Gateway) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{0} + return fileDescriptor_ba11c13056ce1980, []int{0} } func (m *Gateway) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -58,8 +60,8 @@ func (m *Gateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *Gateway) XXX_Merge(src proto.Message) { - xxx_messageInfo_Gateway.Merge(dst, src) +func (m *Gateway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Gateway.Merge(m, src) } func (m *Gateway) XXX_Size() int { return m.Size() @@ -73,7 +75,7 @@ var xxx_messageInfo_Gateway proto.InternalMessageInfo func (m *GatewayList) Reset() { *m = GatewayList{} } func (*GatewayList) ProtoMessage() {} func (*GatewayList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{1} + return fileDescriptor_ba11c13056ce1980, []int{1} } func (m *GatewayList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -86,8 +88,8 @@ func (m *GatewayList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) } return b[:n], nil } -func (dst *GatewayList) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatewayList.Merge(dst, src) +func (m *GatewayList) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayList.Merge(m, src) } func (m *GatewayList) XXX_Size() int { return m.Size() @@ -101,7 +103,7 @@ var xxx_messageInfo_GatewayList proto.InternalMessageInfo func (m *GatewayNotificationWatcher) Reset() { *m = GatewayNotificationWatcher{} } func (*GatewayNotificationWatcher) ProtoMessage() {} func (*GatewayNotificationWatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{2} + return fileDescriptor_ba11c13056ce1980, []int{2} } func (m *GatewayNotificationWatcher) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -114,8 +116,8 @@ func (m *GatewayNotificationWatcher) XXX_Marshal(b []byte, deterministic bool) ( } return b[:n], nil } -func (dst *GatewayNotificationWatcher) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatewayNotificationWatcher.Merge(dst, src) +func (m *GatewayNotificationWatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayNotificationWatcher.Merge(m, src) } func (m *GatewayNotificationWatcher) XXX_Size() int { return m.Size() @@ -129,7 +131,7 @@ var xxx_messageInfo_GatewayNotificationWatcher proto.InternalMessageInfo func (m *GatewaySpec) Reset() { *m = GatewaySpec{} } func (*GatewaySpec) ProtoMessage() {} func (*GatewaySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{3} + return fileDescriptor_ba11c13056ce1980, []int{3} } func (m *GatewaySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -142,8 +144,8 @@ func (m *GatewaySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) } return b[:n], nil } -func (dst *GatewaySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatewaySpec.Merge(dst, src) +func (m *GatewaySpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewaySpec.Merge(m, src) } func (m *GatewaySpec) XXX_Size() int { return m.Size() @@ -157,7 +159,7 @@ var xxx_messageInfo_GatewaySpec proto.InternalMessageInfo func (m *GatewayStatus) Reset() { *m = GatewayStatus{} } func (*GatewayStatus) ProtoMessage() {} func (*GatewayStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{4} + return fileDescriptor_ba11c13056ce1980, []int{4} } func (m *GatewayStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,8 +172,8 @@ func (m *GatewayStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error } return b[:n], nil } -func (dst *GatewayStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatewayStatus.Merge(dst, src) +func (m *GatewayStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayStatus.Merge(m, src) } func (m *GatewayStatus) XXX_Size() int { return m.Size() @@ -185,7 +187,7 @@ var xxx_messageInfo_GatewayStatus proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{5} + return fileDescriptor_ba11c13056ce1980, []int{5} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -198,8 +200,8 @@ func (m *NodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *NodeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStatus.Merge(dst, src) +func (m *NodeStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeStatus.Merge(m, src) } func (m *NodeStatus) XXX_Size() int { return m.Size() @@ -213,7 +215,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *NotificationWatchers) Reset() { *m = NotificationWatchers{} } func (*NotificationWatchers) ProtoMessage() {} func (*NotificationWatchers) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{6} + return fileDescriptor_ba11c13056ce1980, []int{6} } func (m *NotificationWatchers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -226,8 +228,8 @@ func (m *NotificationWatchers) XXX_Marshal(b []byte, deterministic bool) ([]byte } return b[:n], nil } -func (dst *NotificationWatchers) XXX_Merge(src proto.Message) { - xxx_messageInfo_NotificationWatchers.Merge(dst, src) +func (m *NotificationWatchers) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotificationWatchers.Merge(m, src) } func (m *NotificationWatchers) XXX_Size() int { return m.Size() @@ -241,7 +243,7 @@ var xxx_messageInfo_NotificationWatchers proto.InternalMessageInfo func (m *SensorNotificationWatcher) Reset() { *m = SensorNotificationWatcher{} } func (*SensorNotificationWatcher) ProtoMessage() {} func (*SensorNotificationWatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{7} + return fileDescriptor_ba11c13056ce1980, []int{7} } func (m *SensorNotificationWatcher) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,8 +256,8 @@ func (m *SensorNotificationWatcher) XXX_Marshal(b []byte, deterministic bool) ([ } return b[:n], nil } -func (dst *SensorNotificationWatcher) XXX_Merge(src proto.Message) { - xxx_messageInfo_SensorNotificationWatcher.Merge(dst, src) +func (m *SensorNotificationWatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_SensorNotificationWatcher.Merge(m, src) } func (m *SensorNotificationWatcher) XXX_Size() int { return m.Size() @@ -277,6 +279,83 @@ func init() { proto.RegisterType((*NotificationWatchers)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.NotificationWatchers") proto.RegisterType((*SensorNotificationWatcher)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.SensorNotificationWatcher") } + +func init() { + proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto", fileDescriptor_ba11c13056ce1980) +} + +var fileDescriptor_ba11c13056ce1980 = []byte{ + // 1080 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xda, 0x71, 0x6c, 0x8f, 0x93, 0xfe, 0x18, 0x8a, 0xb4, 0xf8, 0xe0, 0x54, 0xe6, 0x52, + 0x10, 0xdd, 0x6d, 0xca, 0x0f, 0x05, 0x10, 0x20, 0x4c, 0x02, 0x8d, 0x44, 0xd2, 0x68, 0x9c, 0x82, + 0x44, 0x91, 0xe8, 0x64,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0xf6, 0xef, 0x25, 0x70, 0x63, 0xda, 0x54, 0x81, 0x3f, 0x5b, 0xa0, 0x66, 0x6a, 0x2d, + 0x6c, 0x4b, 0xf7, 0xef, 0x83, 0xc5, 0xfb, 0x77, 0x8a, 0x54, 0xfe, 0xa5, 0x32, 0x18, 0x81, 0x32, + 0x61, 0xf8, 0x04, 0x54, 0x93, 0xbf, 0xd4, 0xf4, 0x2b, 0x7d, 0xb0, 0x40, 0x0e, 0x5d, 0xcd, 0x34, + 0x2d, 0x85, 0xac, 0x08, 0x09, 0x44, 0xa0, 0x54, 0xb5, 0xfd, 0x09, 0x78, 0x63, 0x66, 0xd8, 0xe5, + 0x5f, 0xee, 0x8e, 0x73, 0x7a, 0xde, 0x5a, 0x7a, 0x7a, 0xde, 0x5a, 0x7a, 0x76, 0xde, 0x5a, 0xfa, + 0x69, 0xdc, 0xb2, 0x4e, 0xc7, 0x2d, 0xeb, 0xe9, 0xb8, 0x65, 0x3d, 0x1b, 0xb7, 0xac, 0x7f, 0xc6, + 0x2d, 0xeb, 0xd7, 0x7f, 0x5b, 0x4b, 0xdf, 0xd5, 0xd2, 0x14, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, + 0x68, 0x4b, 0x5c, 0xea, 0x84, 0x0c, 0x00, 0x00, +} + func (m *Gateway) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -865,11 +944,11 @@ func (this *GatewaySpec) String() string { return "nil" } s := strings.Join([]string{`&GatewaySpec{`, - `DeploySpec:` + strings.Replace(fmt.Sprintf("%v", this.DeploySpec), "Pod", "v11.Pod", 1) + `,`, + `DeploySpec:` + strings.Replace(fmt.Sprintf("%v", this.DeploySpec), "PodTemplateSpec", "v11.PodTemplateSpec", 1) + `,`, `ConfigMap:` + fmt.Sprintf("%v", this.ConfigMap) + `,`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `EventVersion:` + fmt.Sprintf("%v", this.EventVersion) + `,`, - `ServiceSpec:` + strings.Replace(fmt.Sprintf("%v", this.ServiceSpec), "Service", "v11.Service", 1) + `,`, + `ServiceSpec:` + strings.Replace(fmt.Sprintf("%v", this.ServiceSpec), "ServiceTemplateSpec", "common.ServiceTemplateSpec", 1) + `,`, `Watchers:` + strings.Replace(fmt.Sprintf("%v", this.Watchers), "NotificationWatchers", "NotificationWatchers", 1) + `,`, `ProcessorPort:` + fmt.Sprintf("%v", this.ProcessorPort) + `,`, `EventProtocol:` + strings.Replace(fmt.Sprintf("%v", this.EventProtocol), "EventProtocol", "common.EventProtocol", 1) + `,`, @@ -960,7 +1039,7 @@ func (m *Gateway) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -988,7 +1067,7 @@ func (m *Gateway) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -997,6 +1076,9 @@ func (m *Gateway) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1018,7 +1100,7 @@ func (m *Gateway) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1027,6 +1109,9 @@ func (m *Gateway) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1048,7 +1133,7 @@ func (m *Gateway) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1057,6 +1142,9 @@ func (m *Gateway) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1073,6 +1161,9 @@ func (m *Gateway) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1100,7 +1191,7 @@ func (m *GatewayList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1128,7 +1219,7 @@ func (m *GatewayList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1137,6 +1228,9 @@ func (m *GatewayList) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1158,7 +1252,7 @@ func (m *GatewayList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1167,6 +1261,9 @@ func (m *GatewayList) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1184,6 +1281,9 @@ func (m *GatewayList) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1211,7 +1311,7 @@ func (m *GatewayNotificationWatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1239,7 +1339,7 @@ func (m *GatewayNotificationWatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1249,6 +1349,9 @@ func (m *GatewayNotificationWatcher) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1268,7 +1371,7 @@ func (m *GatewayNotificationWatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1278,6 +1381,9 @@ func (m *GatewayNotificationWatcher) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1297,7 +1403,7 @@ func (m *GatewayNotificationWatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1307,6 +1413,9 @@ func (m *GatewayNotificationWatcher) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1321,6 +1430,9 @@ func (m *GatewayNotificationWatcher) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1348,7 +1460,7 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1376,7 +1488,7 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1385,11 +1497,14 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } if m.DeploySpec == nil { - m.DeploySpec = &v11.Pod{} + m.DeploySpec = &v11.PodTemplateSpec{} } if err := m.DeploySpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1409,7 +1524,7 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1419,6 +1534,9 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1438,7 +1556,7 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1448,6 +1566,9 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1467,7 +1588,7 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1477,6 +1598,9 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1496,7 +1620,7 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1505,11 +1629,14 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } if m.ServiceSpec == nil { - m.ServiceSpec = &v11.Service{} + m.ServiceSpec = &common.ServiceTemplateSpec{} } if err := m.ServiceSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1529,7 +1656,7 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1538,6 +1665,9 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1562,7 +1692,7 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1572,6 +1702,9 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1591,7 +1724,7 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1600,6 +1733,9 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1619,6 +1755,9 @@ func (m *GatewaySpec) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1646,7 +1785,7 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1674,7 +1813,7 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1684,6 +1823,9 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1703,7 +1845,7 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1712,6 +1854,9 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1733,7 +1878,7 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1743,6 +1888,9 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1762,7 +1910,7 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1771,6 +1919,9 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1791,7 +1942,7 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1808,7 +1959,7 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1818,6 +1969,9 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -1834,7 +1988,7 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1843,7 +1997,7 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { + if postmsgIndex < 0 { return ErrInvalidLengthGenerated } if postmsgIndex > l { @@ -1880,6 +2034,9 @@ func (m *GatewayStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1907,7 +2064,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1935,7 +2092,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1945,6 +2102,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1964,7 +2124,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1974,6 +2134,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1993,7 +2156,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2003,6 +2166,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2022,7 +2188,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2032,6 +2198,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2051,7 +2220,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2060,6 +2229,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2081,7 +2253,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2091,6 +2263,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2110,7 +2285,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2119,6 +2294,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2135,6 +2313,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2162,7 +2343,7 @@ func (m *NotificationWatchers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2190,7 +2371,7 @@ func (m *NotificationWatchers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2199,6 +2380,9 @@ func (m *NotificationWatchers) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2221,7 +2405,7 @@ func (m *NotificationWatchers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2230,6 +2414,9 @@ func (m *NotificationWatchers) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2247,6 +2434,9 @@ func (m *NotificationWatchers) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2274,7 +2464,7 @@ func (m *SensorNotificationWatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2302,7 +2492,7 @@ func (m *SensorNotificationWatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2312,6 +2502,9 @@ func (m *SensorNotificationWatcher) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2326,6 +2519,9 @@ func (m *SensorNotificationWatcher) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2392,10 +2588,13 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthGenerated } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } return iNdEx, nil case 3: for { @@ -2424,6 +2623,9 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } } return iNdEx, nil case 4: @@ -2442,79 +2644,3 @@ var ( ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ) - -func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto", fileDescriptor_generated_d7e7992cb16da963) -} - -var fileDescriptor_generated_d7e7992cb16da963 = []byte{ - // 1073 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5d, 0x6f, 0x1b, 0x45, - 0x17, 0xce, 0xda, 0x71, 0x6c, 0x8f, 0x93, 0x7e, 0xcc, 0xdb, 0x57, 0x2c, 0x46, 0x72, 0x2a, 0x5f, - 0x15, 0x44, 0x77, 0x9b, 0xf2, 0xa1, 0x00, 0x02, 0xc4, 0x92, 0xd0, 0x46, 0x22, 0x69, 0x34, 0x4e, - 0x41, 0xa2, 0x48, 0x74, 0xb2, 0x3b, 0x59, 0x4f, 0xe3, 0xdd, 0x19, 0xed, 0x8c, 0x1d, 0x7c, 0x55, - 0x24, 0xee, 0x11, 0x7f, 0x80, 0x4b, 0xfe, 0x09, 0x12, 0xb9, 0xec, 0x05, 0x17, 0xbd, 0x8a, 0x88, - 0xe1, 0x57, 0x70, 0x85, 0x66, 0x76, 0xf6, 0x23, 0x8d, 0xa3, 0x98, 0xba, 0x77, 0x3b, 0x67, 0x9e, - 0xf3, 0x9c, 0x73, 0x9e, 0x73, 0xf6, 0xec, 0x82, 0xad, 0x90, 0xca, 0xfe, 0x70, 0xdf, 0xf1, 0x59, - 0xe4, 0xe2, 0x24, 0x64, 0x3c, 0x61, 0x4f, 0xf4, 0xc3, 0x6d, 0x32, 0x22, 0xb1, 0x14, 0x2e, 0x3f, - 0x0c, 0x5d, 0xcc, 0xa9, 0x70, 0x43, 0x2c, 0xc9, 0x11, 0x1e, 0xbb, 0xa3, 0x35, 0x3c, 0xe0, 0x7d, - 0xbc, 0xe6, 0x86, 0x24, 0x26, 0x09, 0x96, 0x24, 0x70, 0x78, 0xc2, 0x24, 0x83, 0x1f, 0x14, 0x54, - 0x4e, 0x46, 0xa5, 0x1f, 0xbe, 0x4b, 0xa9, 0x1c, 0x7e, 0x18, 0x3a, 0x8a, 0xca, 0x31, 0x54, 0x4e, - 0x46, 0xd5, 0xfe, 0x74, 0xe6, 0x2c, 0x7c, 0x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0f, 0x68, 0x18, 0x61, 0x6e, 0xb2, 0xbd, 0x6e, 0xf2, 0x68, - 0x7e, 0xae, 0x2f, 0xb6, 0x31, 0x47, 0x05, 0x46, 0x55, 0x26, 0xc7, 0x9c, 0x98, 0x9c, 0xf3, 0xca, - 0xf6, 0xc6, 0x9c, 0x20, 0x7d, 0x03, 0xd7, 0xc1, 0xb2, 0x96, 0xff, 0x2b, 0x92, 0x08, 0xca, 0x62, - 0x7b, 0x51, 0x23, 0x6f, 0x18, 0xe4, 0xf2, 0x66, 0xe9, 0x0e, 0x9d, 0x41, 0xc2, 0x1d, 0xd0, 0x12, - 0x24, 0x19, 0x51, 0x9f, 0xe8, 0xb2, 0x6a, 0xba, 0xac, 0x37, 0xa6, 0x95, 0xd5, 0x4b, 0x61, 0xde, - 0xd5, 0xc9, 0xc9, 0x6a, 0xab, 0x57, 0xf8, 0xa0, 0x32, 0x01, 0x1c, 0x83, 0xc6, 0x51, 0xda, 0x32, - 0x61, 0x2f, 0x69, 0xb2, 0x07, 0x73, 0x8c, 0xcc, 0x94, 0x49, 0x10, 0xde, 0xb2, 0x6a, 0x58, 0x76, - 0x42, 0x79, 0x38, 0xf8, 0x11, 0x58, 0xe1, 0x09, 0xf3, 0x89, 0x10, 0x2c, 0x51, 0x5d, 0xb7, 0xeb, - 0x5a, 0x85, 0xff, 0x1b, 0x15, 0x56, 0x76, 0xcb, 0x97, 0xe8, 0x2c, 0x16, 0x1e, 0x81, 0x15, 0x9d, - 0xcd, 0xae, 0xda, 0x56, 0x3e, 0x1b, 0xd8, 0x0d, 0x9d, 0xfc, 0x27, 0xb3, 0x27, 0x9f, 0x7e, 0x69, - 0x9c, 0xcd, 0x32, 0x8b, 0x77, 0x5d, 0x05, 0x3e, 0x63, 0x42, 0x67, 0xe3, 0x74, 0x7f, 0xab, 0x82, - 0x95, 0x33, 0x2b, 0x06, 0xde, 0x01, 0x35, 0xde, 0xc7, 0x22, 0x9b, 0xf5, 0x76, 0xf6, 0xba, 0x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0xc6, 0x9d, 0x6d, 0x70, 0xb6, 0xa9, 0x9f, 0xb0, 0xff, - 0x36, 0x3d, 0x8d, 0x4b, 0xa6, 0xc7, 0x07, 0x60, 0xc8, 0x03, 0x2c, 0x89, 0xa2, 0xb5, 0x9b, 0x2f, - 0x97, 0x4d, 0xfe, 0x5f, 0xf0, 0x30, 0xa7, 0x42, 0x25, 0xda, 0xee, 0x2f, 0x15, 0x70, 0x63, 0xda, - 0x56, 0x81, 0x3f, 0x5a, 0xa0, 0x61, 0x7a, 0x2d, 0x6c, 0x4b, 0xcf, 0xef, 0xc3, 0xf9, 0xe7, 0x77, - 0x4a, 0xa8, 0xe2, 0xa3, 0x63, 0x30, 0x02, 0xe5, 0x81, 0xe1, 0x53, 0x50, 0x4f, 0x7f, 0x38, 0xb3, - 0x0f, 0xee, 0xde, 0x1c, 0x39, 0xf4, 0x34, 0xd3, 0xb4, 0x14, 0xf2, 0x26, 0xa4, 0x10, 0x81, 0xb2, - 0xa8, 0xdd, 0x8f, 0xc1, 0xeb, 0x17, 0xba, 0x5d, 0xfe, 0x11, 0xf6, 0x9c, 0xe3, 0xd3, 0xce, 0xc2, - 0xb3, 0xd3, 0xce, 0xc2, 0xf3, 0xd3, 0xce, 0xc2, 0x0f, 0x93, 0x8e, 0x75, 0x3c, 0xe9, 0x58, 0xcf, - 0x26, 0x1d, 0xeb, 0xf9, 0xa4, 0x63, 0xfd, 0x39, 0xe9, 0x58, 0x3f, 0xff, 0xd5, 0x59, 0xf8, 0xa6, - 0x91, 0xa5, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xd0, 0x1b, 0x7b, 0x4f, 0x0c, 0x00, - 0x00, -} diff --git a/pkg/apis/gateway/v1alpha1/generated.proto b/pkg/apis/gateway/v1alpha1/generated.proto index d82c43d11e..fa42746e62 100644 --- a/pkg/apis/gateway/v1alpha1/generated.proto +++ b/pkg/apis/gateway/v1alpha1/generated.proto @@ -67,7 +67,7 @@ message GatewayNotificationWatcher { message GatewaySpec { // DeploySpec is the pod specification for the gateway // Refer https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core - optional k8s.io.api.core.v1.Pod deploySpec = 1; + optional k8s.io.api.core.v1.PodTemplateSpec deploySpec = 1; // ConfigMap is name of the configmap for gateway. This configmap contains event sources. optional string configmap = 2; @@ -80,7 +80,7 @@ message GatewaySpec { // ServiceSpec is the specifications of the service to expose the gateway // Refer https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#service-v1-core - optional k8s.io.api.core.v1.Service serviceSpec = 5; + optional github.com.argoproj.argo_events.pkg.apis.common.ServiceTemplateSpec serviceSpec = 5; // Watchers are components which are interested listening to notifications from this gateway // These only need to be specified when gateway dispatch mechanism is through HTTP POST notifications. diff --git a/pkg/apis/gateway/v1alpha1/openapi_generated.go b/pkg/apis/gateway/v1alpha1/openapi_generated.go index ac1aa9c10e..a362756426 100644 --- a/pkg/apis/gateway/v1alpha1/openapi_generated.go +++ b/pkg/apis/gateway/v1alpha1/openapi_generated.go @@ -176,7 +176,7 @@ func schema_pkg_apis_gateway_v1alpha1_GatewaySpec(ref common.ReferenceCallback) "deploySpec": { SchemaProps: spec.SchemaProps{ Description: "DeploySpec is the pod specification for the gateway Refer https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core", - Ref: ref("k8s.io/api/core/v1.Pod"), + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, "configMap": { @@ -203,7 +203,7 @@ func schema_pkg_apis_gateway_v1alpha1_GatewaySpec(ref common.ReferenceCallback) "serviceSpec": { SchemaProps: spec.SchemaProps{ Description: "ServiceSpec is the specifications of the service to expose the gateway Refer https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#service-v1-core", - Ref: ref("k8s.io/api/core/v1.Service"), + Ref: ref("github.com/argoproj/argo-events/pkg/apis/common.ServiceTemplateSpec"), }, }, "watchers": { @@ -230,7 +230,7 @@ func schema_pkg_apis_gateway_v1alpha1_GatewaySpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/common.EventProtocol", "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.NotificationWatchers", "k8s.io/api/core/v1.Pod", "k8s.io/api/core/v1.Service"}, + "github.com/argoproj/argo-events/pkg/apis/common.EventProtocol", "github.com/argoproj/argo-events/pkg/apis/common.ServiceTemplateSpec", "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.NotificationWatchers", "k8s.io/api/core/v1.PodTemplateSpec"}, } } diff --git a/pkg/apis/gateway/v1alpha1/types.go b/pkg/apis/gateway/v1alpha1/types.go index c2ae691bd6..becb3785d5 100644 --- a/pkg/apis/gateway/v1alpha1/types.go +++ b/pkg/apis/gateway/v1alpha1/types.go @@ -58,7 +58,7 @@ type GatewayList struct { type GatewaySpec struct { // DeploySpec is the pod specification for the gateway // Refer https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core - DeploySpec *corev1.Pod `json:"deploySpec" protobuf:"bytes,1,opt,name=deploySpec"` + DeploySpec *corev1.PodTemplateSpec `json:"deploySpec" protobuf:"bytes,1,opt,name=deploySpec"` // ConfigMap is name of the configmap for gateway. This configmap contains event sources. ConfigMap string `json:"configMap,omitempty" protobuf:"bytes,2,opt,name=configmap"` @@ -71,7 +71,7 @@ type GatewaySpec struct { // ServiceSpec is the specifications of the service to expose the gateway // Refer https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#service-v1-core - ServiceSpec *corev1.Service `json:"serviceSpec,omitempty" protobuf:"bytes,5,opt,name=serviceSpec"` + ServiceSpec *common.ServiceTemplateSpec `json:"serviceSpec,omitempty" protobuf:"bytes,5,opt,name=serviceSpec"` // Watchers are components which are interested listening to notifications from this gateway // These only need to be specified when gateway dispatch mechanism is through HTTP POST notifications. diff --git a/pkg/apis/gateway/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/gateway/v1alpha1/zz_generated.deepcopy.go index 30d7b3d108..e6696c74f2 100644 --- a/pkg/apis/gateway/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/gateway/v1alpha1/zz_generated.deepcopy.go @@ -107,12 +107,12 @@ func (in *GatewaySpec) DeepCopyInto(out *GatewaySpec) { *out = *in if in.DeploySpec != nil { in, out := &in.DeploySpec, &out.DeploySpec - *out = new(v1.Pod) + *out = new(v1.PodTemplateSpec) (*in).DeepCopyInto(*out) } if in.ServiceSpec != nil { in, out := &in.ServiceSpec, &out.ServiceSpec - *out = new(v1.Service) + *out = new(common.ServiceTemplateSpec) (*in).DeepCopyInto(*out) } if in.Watchers != nil { diff --git a/pkg/apis/sensor/v1alpha1/generated.pb.go b/pkg/apis/sensor/v1alpha1/generated.pb.go index b3cc89e3b0..d3eafa5efd 100644 --- a/pkg/apis/sensor/v1alpha1/generated.pb.go +++ b/pkg/apis/sensor/v1alpha1/generated.pb.go @@ -17,19 +17,21 @@ limitations under the License. package v1alpha1 -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import common "github.com/argoproj/argo-events/pkg/apis/common" +import ( + fmt "fmt" -import v1 "k8s.io/api/core/v1" + common "github.com/argoproj/argo-events/pkg/apis/common" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + io "io" -import strings "strings" -import reflect "reflect" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + v1 "k8s.io/api/core/v1" -import io "io" + math "math" + reflect "reflect" + strings "strings" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -45,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *ArtifactLocation) Reset() { *m = ArtifactLocation{} } func (*ArtifactLocation) ProtoMessage() {} func (*ArtifactLocation) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{0} + return fileDescriptor_6c4bded897df1f16, []int{0} } func (m *ArtifactLocation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -58,8 +60,8 @@ func (m *ArtifactLocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, er } return b[:n], nil } -func (dst *ArtifactLocation) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArtifactLocation.Merge(dst, src) +func (m *ArtifactLocation) XXX_Merge(src proto.Message) { + xxx_messageInfo_ArtifactLocation.Merge(m, src) } func (m *ArtifactLocation) XXX_Size() int { return m.Size() @@ -73,7 +75,7 @@ var xxx_messageInfo_ArtifactLocation proto.InternalMessageInfo func (m *ConfigmapArtifact) Reset() { *m = ConfigmapArtifact{} } func (*ConfigmapArtifact) ProtoMessage() {} func (*ConfigmapArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{1} + return fileDescriptor_6c4bded897df1f16, []int{1} } func (m *ConfigmapArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -86,8 +88,8 @@ func (m *ConfigmapArtifact) XXX_Marshal(b []byte, deterministic bool) ([]byte, e } return b[:n], nil } -func (dst *ConfigmapArtifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigmapArtifact.Merge(dst, src) +func (m *ConfigmapArtifact) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConfigmapArtifact.Merge(m, src) } func (m *ConfigmapArtifact) XXX_Size() int { return m.Size() @@ -101,7 +103,7 @@ var xxx_messageInfo_ConfigmapArtifact proto.InternalMessageInfo func (m *DataFilter) Reset() { *m = DataFilter{} } func (*DataFilter) ProtoMessage() {} func (*DataFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{2} + return fileDescriptor_6c4bded897df1f16, []int{2} } func (m *DataFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -114,8 +116,8 @@ func (m *DataFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *DataFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataFilter.Merge(dst, src) +func (m *DataFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_DataFilter.Merge(m, src) } func (m *DataFilter) XXX_Size() int { return m.Size() @@ -129,7 +131,7 @@ var xxx_messageInfo_DataFilter proto.InternalMessageInfo func (m *DependencyGroup) Reset() { *m = DependencyGroup{} } func (*DependencyGroup) ProtoMessage() {} func (*DependencyGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{3} + return fileDescriptor_6c4bded897df1f16, []int{3} } func (m *DependencyGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -142,8 +144,8 @@ func (m *DependencyGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, err } return b[:n], nil } -func (dst *DependencyGroup) XXX_Merge(src proto.Message) { - xxx_messageInfo_DependencyGroup.Merge(dst, src) +func (m *DependencyGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_DependencyGroup.Merge(m, src) } func (m *DependencyGroup) XXX_Size() int { return m.Size() @@ -157,7 +159,7 @@ var xxx_messageInfo_DependencyGroup proto.InternalMessageInfo func (m *EventDependency) Reset() { *m = EventDependency{} } func (*EventDependency) ProtoMessage() {} func (*EventDependency) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{4} + return fileDescriptor_6c4bded897df1f16, []int{4} } func (m *EventDependency) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,8 +172,8 @@ func (m *EventDependency) XXX_Marshal(b []byte, deterministic bool) ([]byte, err } return b[:n], nil } -func (dst *EventDependency) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDependency.Merge(dst, src) +func (m *EventDependency) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDependency.Merge(m, src) } func (m *EventDependency) XXX_Size() int { return m.Size() @@ -185,7 +187,7 @@ var xxx_messageInfo_EventDependency proto.InternalMessageInfo func (m *EventDependencyFilter) Reset() { *m = EventDependencyFilter{} } func (*EventDependencyFilter) ProtoMessage() {} func (*EventDependencyFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{5} + return fileDescriptor_6c4bded897df1f16, []int{5} } func (m *EventDependencyFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -198,8 +200,8 @@ func (m *EventDependencyFilter) XXX_Marshal(b []byte, deterministic bool) ([]byt } return b[:n], nil } -func (dst *EventDependencyFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDependencyFilter.Merge(dst, src) +func (m *EventDependencyFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDependencyFilter.Merge(m, src) } func (m *EventDependencyFilter) XXX_Size() int { return m.Size() @@ -213,7 +215,7 @@ var xxx_messageInfo_EventDependencyFilter proto.InternalMessageInfo func (m *FileArtifact) Reset() { *m = FileArtifact{} } func (*FileArtifact) ProtoMessage() {} func (*FileArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{6} + return fileDescriptor_6c4bded897df1f16, []int{6} } func (m *FileArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -226,8 +228,8 @@ func (m *FileArtifact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) } return b[:n], nil } -func (dst *FileArtifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileArtifact.Merge(dst, src) +func (m *FileArtifact) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileArtifact.Merge(m, src) } func (m *FileArtifact) XXX_Size() int { return m.Size() @@ -241,7 +243,7 @@ var xxx_messageInfo_FileArtifact proto.InternalMessageInfo func (m *GitArtifact) Reset() { *m = GitArtifact{} } func (*GitArtifact) ProtoMessage() {} func (*GitArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{7} + return fileDescriptor_6c4bded897df1f16, []int{7} } func (m *GitArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,8 +256,8 @@ func (m *GitArtifact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) } return b[:n], nil } -func (dst *GitArtifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_GitArtifact.Merge(dst, src) +func (m *GitArtifact) XXX_Merge(src proto.Message) { + xxx_messageInfo_GitArtifact.Merge(m, src) } func (m *GitArtifact) XXX_Size() int { return m.Size() @@ -269,7 +271,7 @@ var xxx_messageInfo_GitArtifact proto.InternalMessageInfo func (m *GitCreds) Reset() { *m = GitCreds{} } func (*GitCreds) ProtoMessage() {} func (*GitCreds) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{8} + return fileDescriptor_6c4bded897df1f16, []int{8} } func (m *GitCreds) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -282,8 +284,8 @@ func (m *GitCreds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *GitCreds) XXX_Merge(src proto.Message) { - xxx_messageInfo_GitCreds.Merge(dst, src) +func (m *GitCreds) XXX_Merge(src proto.Message) { + xxx_messageInfo_GitCreds.Merge(m, src) } func (m *GitCreds) XXX_Size() int { return m.Size() @@ -297,7 +299,7 @@ var xxx_messageInfo_GitCreds proto.InternalMessageInfo func (m *GitRemoteConfig) Reset() { *m = GitRemoteConfig{} } func (*GitRemoteConfig) ProtoMessage() {} func (*GitRemoteConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{9} + return fileDescriptor_6c4bded897df1f16, []int{9} } func (m *GitRemoteConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -310,8 +312,8 @@ func (m *GitRemoteConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, err } return b[:n], nil } -func (dst *GitRemoteConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_GitRemoteConfig.Merge(dst, src) +func (m *GitRemoteConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_GitRemoteConfig.Merge(m, src) } func (m *GitRemoteConfig) XXX_Size() int { return m.Size() @@ -325,7 +327,7 @@ var xxx_messageInfo_GitRemoteConfig proto.InternalMessageInfo func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } func (*GroupVersionKind) ProtoMessage() {} func (*GroupVersionKind) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{10} + return fileDescriptor_6c4bded897df1f16, []int{10} } func (m *GroupVersionKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -338,8 +340,8 @@ func (m *GroupVersionKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, er } return b[:n], nil } -func (dst *GroupVersionKind) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupVersionKind.Merge(dst, src) +func (m *GroupVersionKind) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupVersionKind.Merge(m, src) } func (m *GroupVersionKind) XXX_Size() int { return m.Size() @@ -353,7 +355,7 @@ var xxx_messageInfo_GroupVersionKind proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{11} + return fileDescriptor_6c4bded897df1f16, []int{11} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -366,8 +368,8 @@ func (m *NodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *NodeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStatus.Merge(dst, src) +func (m *NodeStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeStatus.Merge(m, src) } func (m *NodeStatus) XXX_Size() int { return m.Size() @@ -381,7 +383,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *ResourceObject) Reset() { *m = ResourceObject{} } func (*ResourceObject) ProtoMessage() {} func (*ResourceObject) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{12} + return fileDescriptor_6c4bded897df1f16, []int{12} } func (m *ResourceObject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -394,8 +396,8 @@ func (m *ResourceObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro } return b[:n], nil } -func (dst *ResourceObject) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceObject.Merge(dst, src) +func (m *ResourceObject) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceObject.Merge(m, src) } func (m *ResourceObject) XXX_Size() int { return m.Size() @@ -409,7 +411,7 @@ var xxx_messageInfo_ResourceObject proto.InternalMessageInfo func (m *ResourceParameter) Reset() { *m = ResourceParameter{} } func (*ResourceParameter) ProtoMessage() {} func (*ResourceParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{13} + return fileDescriptor_6c4bded897df1f16, []int{13} } func (m *ResourceParameter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -422,8 +424,8 @@ func (m *ResourceParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, e } return b[:n], nil } -func (dst *ResourceParameter) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceParameter.Merge(dst, src) +func (m *ResourceParameter) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceParameter.Merge(m, src) } func (m *ResourceParameter) XXX_Size() int { return m.Size() @@ -437,7 +439,7 @@ var xxx_messageInfo_ResourceParameter proto.InternalMessageInfo func (m *ResourceParameterSource) Reset() { *m = ResourceParameterSource{} } func (*ResourceParameterSource) ProtoMessage() {} func (*ResourceParameterSource) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{14} + return fileDescriptor_6c4bded897df1f16, []int{14} } func (m *ResourceParameterSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -450,8 +452,8 @@ func (m *ResourceParameterSource) XXX_Marshal(b []byte, deterministic bool) ([]b } return b[:n], nil } -func (dst *ResourceParameterSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceParameterSource.Merge(dst, src) +func (m *ResourceParameterSource) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceParameterSource.Merge(m, src) } func (m *ResourceParameterSource) XXX_Size() int { return m.Size() @@ -465,7 +467,7 @@ var xxx_messageInfo_ResourceParameterSource proto.InternalMessageInfo func (m *RetryStrategy) Reset() { *m = RetryStrategy{} } func (*RetryStrategy) ProtoMessage() {} func (*RetryStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{15} + return fileDescriptor_6c4bded897df1f16, []int{15} } func (m *RetryStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -478,8 +480,8 @@ func (m *RetryStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error } return b[:n], nil } -func (dst *RetryStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryStrategy.Merge(dst, src) +func (m *RetryStrategy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryStrategy.Merge(m, src) } func (m *RetryStrategy) XXX_Size() int { return m.Size() @@ -493,7 +495,7 @@ var xxx_messageInfo_RetryStrategy proto.InternalMessageInfo func (m *Sensor) Reset() { *m = Sensor{} } func (*Sensor) ProtoMessage() {} func (*Sensor) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{16} + return fileDescriptor_6c4bded897df1f16, []int{16} } func (m *Sensor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -506,8 +508,8 @@ func (m *Sensor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *Sensor) XXX_Merge(src proto.Message) { - xxx_messageInfo_Sensor.Merge(dst, src) +func (m *Sensor) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sensor.Merge(m, src) } func (m *Sensor) XXX_Size() int { return m.Size() @@ -521,7 +523,7 @@ var xxx_messageInfo_Sensor proto.InternalMessageInfo func (m *SensorList) Reset() { *m = SensorList{} } func (*SensorList) ProtoMessage() {} func (*SensorList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{17} + return fileDescriptor_6c4bded897df1f16, []int{17} } func (m *SensorList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -534,8 +536,8 @@ func (m *SensorList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *SensorList) XXX_Merge(src proto.Message) { - xxx_messageInfo_SensorList.Merge(dst, src) +func (m *SensorList) XXX_Merge(src proto.Message) { + xxx_messageInfo_SensorList.Merge(m, src) } func (m *SensorList) XXX_Size() int { return m.Size() @@ -549,7 +551,7 @@ var xxx_messageInfo_SensorList proto.InternalMessageInfo func (m *SensorSpec) Reset() { *m = SensorSpec{} } func (*SensorSpec) ProtoMessage() {} func (*SensorSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{18} + return fileDescriptor_6c4bded897df1f16, []int{18} } func (m *SensorSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -562,8 +564,8 @@ func (m *SensorSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *SensorSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SensorSpec.Merge(dst, src) +func (m *SensorSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_SensorSpec.Merge(m, src) } func (m *SensorSpec) XXX_Size() int { return m.Size() @@ -577,7 +579,7 @@ var xxx_messageInfo_SensorSpec proto.InternalMessageInfo func (m *SensorStatus) Reset() { *m = SensorStatus{} } func (*SensorStatus) ProtoMessage() {} func (*SensorStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{19} + return fileDescriptor_6c4bded897df1f16, []int{19} } func (m *SensorStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -590,8 +592,8 @@ func (m *SensorStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) } return b[:n], nil } -func (dst *SensorStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SensorStatus.Merge(dst, src) +func (m *SensorStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_SensorStatus.Merge(m, src) } func (m *SensorStatus) XXX_Size() int { return m.Size() @@ -605,7 +607,7 @@ var xxx_messageInfo_SensorStatus proto.InternalMessageInfo func (m *TimeFilter) Reset() { *m = TimeFilter{} } func (*TimeFilter) ProtoMessage() {} func (*TimeFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{20} + return fileDescriptor_6c4bded897df1f16, []int{20} } func (m *TimeFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -618,8 +620,8 @@ func (m *TimeFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *TimeFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimeFilter.Merge(dst, src) +func (m *TimeFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimeFilter.Merge(m, src) } func (m *TimeFilter) XXX_Size() int { return m.Size() @@ -633,7 +635,7 @@ var xxx_messageInfo_TimeFilter proto.InternalMessageInfo func (m *Trigger) Reset() { *m = Trigger{} } func (*Trigger) ProtoMessage() {} func (*Trigger) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{21} + return fileDescriptor_6c4bded897df1f16, []int{21} } func (m *Trigger) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -646,8 +648,8 @@ func (m *Trigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { } return b[:n], nil } -func (dst *Trigger) XXX_Merge(src proto.Message) { - xxx_messageInfo_Trigger.Merge(dst, src) +func (m *Trigger) XXX_Merge(src proto.Message) { + xxx_messageInfo_Trigger.Merge(m, src) } func (m *Trigger) XXX_Size() int { return m.Size() @@ -661,7 +663,7 @@ var xxx_messageInfo_Trigger proto.InternalMessageInfo func (m *TriggerCondition) Reset() { *m = TriggerCondition{} } func (*TriggerCondition) ProtoMessage() {} func (*TriggerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{22} + return fileDescriptor_6c4bded897df1f16, []int{22} } func (m *TriggerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -674,8 +676,8 @@ func (m *TriggerCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, er } return b[:n], nil } -func (dst *TriggerCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_TriggerCondition.Merge(dst, src) +func (m *TriggerCondition) XXX_Merge(src proto.Message) { + xxx_messageInfo_TriggerCondition.Merge(m, src) } func (m *TriggerCondition) XXX_Size() int { return m.Size() @@ -689,7 +691,7 @@ var xxx_messageInfo_TriggerCondition proto.InternalMessageInfo func (m *URLArtifact) Reset() { *m = URLArtifact{} } func (*URLArtifact) ProtoMessage() {} func (*URLArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_83408b5aadd35c22, []int{23} + return fileDescriptor_6c4bded897df1f16, []int{23} } func (m *URLArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,8 +704,8 @@ func (m *URLArtifact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) } return b[:n], nil } -func (dst *URLArtifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLArtifact.Merge(dst, src) +func (m *URLArtifact) XXX_Merge(src proto.Message) { + xxx_messageInfo_URLArtifact.Merge(m, src) } func (m *URLArtifact) XXX_Size() int { return m.Size() @@ -742,6 +744,149 @@ func init() { proto.RegisterType((*TriggerCondition)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.TriggerCondition") proto.RegisterType((*URLArtifact)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.URLArtifact") } + +func init() { + proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto", fileDescriptor_6c4bded897df1f16) +} + +var fileDescriptor_6c4bded897df1f16 = []byte{ + // 2130 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xf7, 0xf2, 0x4b, 0xe4, 0xa3, 0x64, 0xc9, 0xd3, 0xb4, 0x61, 0x85, 0x56, 0x34, 0x36, 0x68, + 0x91, 0x16, 0xc9, 0xd2, 0x96, 0xd3, 0xc0, 0x6d, 0xd1, 0xb4, 0x26, 0xe9, 0xaf, 0x48, 0xb6, 0xe5, + 0xa1, 0xed, 0x00, 0x69, 0x81, 0x7a, 0xb5, 0x3b, 0x22, 0x37, 0x5a, 0xee, 0x2c, 0x66, 0x86, 0x72, + 0x58, 0xf4, 0x23, 0xfd, 0xba, 0xa6, 0x39, 0xf7, 0xda, 0x6b, 0x81, 0x1e, 0x7b, 0xef, 0xc9, 0xc7, + 0xf4, 0x96, 0x13, 0x51, 0xb3, 0x40, 0x2f, 0xfd, 0x0f, 0x72, 0x2a, 0xe6, 0x63, 0x3f, 0x48, 0x49, + 0x15, 0x2d, 0xfa, 0x24, 0xce, 0x7b, 0x6f, 0x7e, 0x6f, 0xe6, 0xcd, 0x7b, 0x6f, 0x7e, 0xb3, 0x82, + 0x3b, 0xfd, 0x40, 0x0c, 0x46, 0xfb, 0x8e, 0x47, 0x87, 0x2d, 0x97, 0xf5, 0x69, 0xcc, 0xe8, 0x47, + 0xea, 0xc7, 0xdb, 0xe4, 0x88, 0x44, 0x82, 0xb7, 0xe2, 0xc3, 0x7e, 0xcb, 0x8d, 0x03, 0xde, 0xe2, + 0x24, 0xe2, 0x94, 0xb5, 0x8e, 0xae, 0xba, 0x61, 0x3c, 0x70, 0xaf, 0xb6, 0xfa, 0x24, 0x22, 0xcc, + 0x15, 0xc4, 0x77, 0x62, 0x46, 0x05, 0x45, 0xd7, 0x33, 0x24, 0x27, 0x41, 0x52, 0x3f, 0x7e, 0xae, + 0x91, 0x9c, 0x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 0x14, 0x3d, 0x57, 0x4f, 0xf3, 0x0f, 0x06, 0x24, 0xc2, 0xca, 0x83, 0x7d, 0x07, 0x36, 0xe6, 0x6d, + 0xd0, 0xd7, 0xa1, 0xe8, 0x46, 0x63, 0x75, 0x07, 0xd6, 0x34, 0x0f, 0xbc, 0x11, 0x8d, 0xb1, 0x94, + 0x29, 0x55, 0x18, 0x9a, 0x67, 0xbe, 0x56, 0x85, 0x21, 0x96, 0x32, 0xdb, 0x83, 0x7a, 0xee, 0xff, + 0x03, 0x0b, 0x7c, 0x9f, 0xde, 0x06, 0x38, 0x22, 0x2c, 0x38, 0x18, 0x77, 0x08, 0xd3, 0x0d, 0xab, + 0x9a, 0x31, 0xac, 0x27, 0xa9, 0x06, 0xe7, 0xac, 0xda, 0xce, 0xf3, 0x17, 0x5b, 0x17, 0x3e, 0x7f, + 0xb1, 0x75, 0xe1, 0x8b, 0x17, 0x5b, 0x17, 0x3e, 0x99, 0x6e, 0x59, 0xcf, 0xa7, 0x5b, 0xd6, 0xe7, + 0xd3, 0x2d, 0xeb, 0x8b, 0xe9, 0x96, 0xf5, 0xaf, 0xe9, 0x96, 0xf5, 0xd9, 0xbf, 0xb7, 0x2e, 0x7c, + 0x58, 0x4d, 0xf6, 0xff, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x29, 0x42, 0x60, 0xfe, 0xda, 0x1b, + 0x00, 0x00, +} + func (m *ArtifactLocation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2573,7 +2718,7 @@ func (this *SensorSpec) String() string { s := strings.Join([]string{`&SensorSpec{`, `Dependencies:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Dependencies), "EventDependency", "EventDependency", 1), `&`, ``, 1) + `,`, `Triggers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Triggers), "Trigger", "Trigger", 1), `&`, ``, 1) + `,`, - `DeploySpec:` + strings.Replace(fmt.Sprintf("%v", this.DeploySpec), "PodSpec", "v1.PodSpec", 1) + `,`, + `DeploySpec:` + strings.Replace(fmt.Sprintf("%v", this.DeploySpec), "PodTemplateSpec", "v1.PodTemplateSpec", 1) + `,`, `EventProtocol:` + strings.Replace(fmt.Sprintf("%v", this.EventProtocol), "EventProtocol", "common.EventProtocol", 1) + `,`, `Circuit:` + fmt.Sprintf("%v", this.Circuit) + `,`, `DependencyGroups:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DependencyGroups), "DependencyGroup", "DependencyGroup", 1), `&`, ``, 1) + `,`, @@ -2676,7 +2821,7 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2704,7 +2849,7 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2713,6 +2858,9 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2737,7 +2885,7 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2747,6 +2895,9 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2767,7 +2918,7 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2776,6 +2927,9 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2800,7 +2954,7 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2809,6 +2963,9 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2833,7 +2990,7 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2842,6 +2999,9 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2866,7 +3026,7 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2875,6 +3035,9 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2894,6 +3057,9 @@ func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -2921,7 +3087,7 @@ func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2949,7 +3115,7 @@ func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2959,6 +3125,9 @@ func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2978,7 +3147,7 @@ func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2988,6 +3157,9 @@ func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3007,7 +3179,7 @@ func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3017,6 +3189,9 @@ func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3031,6 +3206,9 @@ func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -3058,7 +3236,7 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3086,7 +3264,7 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3096,6 +3274,9 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3115,7 +3296,7 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3125,6 +3306,9 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3144,7 +3328,7 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3154,6 +3338,9 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3168,6 +3355,9 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -3195,7 +3385,7 @@ func (m *DependencyGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3223,7 +3413,7 @@ func (m *DependencyGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3233,6 +3423,9 @@ func (m *DependencyGroup) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3252,7 +3445,7 @@ func (m *DependencyGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3262,6 +3455,9 @@ func (m *DependencyGroup) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3276,6 +3472,9 @@ func (m *DependencyGroup) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -3303,7 +3502,7 @@ func (m *EventDependency) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3331,7 +3530,7 @@ func (m *EventDependency) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3341,6 +3540,9 @@ func (m *EventDependency) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3360,7 +3562,7 @@ func (m *EventDependency) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Deadline |= (int64(b) & 0x7F) << shift + m.Deadline |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -3379,7 +3581,7 @@ func (m *EventDependency) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3388,6 +3590,9 @@ func (m *EventDependency) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3409,7 +3614,7 @@ func (m *EventDependency) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3424,6 +3629,9 @@ func (m *EventDependency) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -3451,7 +3659,7 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3479,7 +3687,7 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3489,6 +3697,9 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3508,7 +3719,7 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3517,6 +3728,9 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3541,7 +3755,7 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3550,6 +3764,9 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3574,7 +3791,7 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3583,6 +3800,9 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3600,6 +3820,9 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -3627,7 +3850,7 @@ func (m *FileArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3655,7 +3878,7 @@ func (m *FileArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3665,6 +3888,9 @@ func (m *FileArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3679,6 +3905,9 @@ func (m *FileArtifact) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -3706,7 +3935,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3734,7 +3963,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3744,6 +3973,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3763,7 +3995,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3773,6 +4005,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3792,7 +4027,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3801,6 +4036,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3825,7 +4063,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3835,6 +4073,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3854,7 +4095,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3864,6 +4105,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3883,7 +4127,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3893,6 +4137,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3912,7 +4159,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3922,6 +4169,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3941,7 +4191,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3951,6 +4201,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3970,7 +4223,7 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3979,6 +4232,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3998,6 +4254,9 @@ func (m *GitArtifact) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4025,7 +4284,7 @@ func (m *GitCreds) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4053,7 +4312,7 @@ func (m *GitCreds) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4062,6 +4321,9 @@ func (m *GitCreds) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4086,7 +4348,7 @@ func (m *GitCreds) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4095,6 +4357,9 @@ func (m *GitCreds) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4114,6 +4379,9 @@ func (m *GitCreds) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4141,7 +4409,7 @@ func (m *GitRemoteConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4169,7 +4437,7 @@ func (m *GitRemoteConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4179,6 +4447,9 @@ func (m *GitRemoteConfig) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4198,7 +4469,7 @@ func (m *GitRemoteConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4208,6 +4479,9 @@ func (m *GitRemoteConfig) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4222,6 +4496,9 @@ func (m *GitRemoteConfig) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4249,7 +4526,7 @@ func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4277,7 +4554,7 @@ func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4287,6 +4564,9 @@ func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4306,7 +4586,7 @@ func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4316,6 +4596,9 @@ func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4335,7 +4618,7 @@ func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4345,6 +4628,9 @@ func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4359,6 +4645,9 @@ func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4386,7 +4675,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4414,7 +4703,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4424,6 +4713,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4443,7 +4735,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4453,6 +4745,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4472,7 +4767,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4482,6 +4777,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4501,7 +4799,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4511,6 +4809,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4530,7 +4831,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4540,6 +4841,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4559,7 +4863,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4568,6 +4872,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4589,7 +4896,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4598,6 +4905,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4619,7 +4929,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4629,6 +4939,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4648,7 +4961,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4657,6 +4970,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4676,6 +4992,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4703,7 +5022,7 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4731,7 +5050,7 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4741,6 +5060,9 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4760,7 +5082,7 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4769,6 +5091,9 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4789,7 +5114,7 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4806,7 +5131,7 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4816,6 +5141,9 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -4832,7 +5160,7 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift + stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4842,6 +5170,9 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } @@ -4878,7 +5209,7 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4887,6 +5218,9 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4909,7 +5243,7 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4918,6 +5252,9 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4939,7 +5276,7 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4948,6 +5285,9 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4964,6 +5304,9 @@ func (m *ResourceObject) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4991,7 +5334,7 @@ func (m *ResourceParameter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5019,7 +5362,7 @@ func (m *ResourceParameter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5028,6 +5371,9 @@ func (m *ResourceParameter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5052,7 +5398,7 @@ func (m *ResourceParameter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5062,6 +5408,9 @@ func (m *ResourceParameter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5076,6 +5425,9 @@ func (m *ResourceParameter) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5103,7 +5455,7 @@ func (m *ResourceParameterSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5131,7 +5483,7 @@ func (m *ResourceParameterSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5141,6 +5493,9 @@ func (m *ResourceParameterSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5160,7 +5515,7 @@ func (m *ResourceParameterSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5170,6 +5525,9 @@ func (m *ResourceParameterSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5189,7 +5547,7 @@ func (m *ResourceParameterSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5199,6 +5557,9 @@ func (m *ResourceParameterSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5214,6 +5575,9 @@ func (m *ResourceParameterSource) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5241,7 +5605,7 @@ func (m *RetryStrategy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5264,6 +5628,9 @@ func (m *RetryStrategy) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5291,7 +5658,7 @@ func (m *Sensor) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5319,7 +5686,7 @@ func (m *Sensor) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5328,6 +5695,9 @@ func (m *Sensor) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5349,7 +5719,7 @@ func (m *Sensor) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5358,6 +5728,9 @@ func (m *Sensor) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5379,7 +5752,7 @@ func (m *Sensor) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5388,6 +5761,9 @@ func (m *Sensor) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5404,6 +5780,9 @@ func (m *Sensor) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5431,7 +5810,7 @@ func (m *SensorList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5459,7 +5838,7 @@ func (m *SensorList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5468,6 +5847,9 @@ func (m *SensorList) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5489,7 +5871,7 @@ func (m *SensorList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5498,6 +5880,9 @@ func (m *SensorList) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5515,6 +5900,9 @@ func (m *SensorList) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5542,7 +5930,7 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5570,7 +5958,7 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5579,6 +5967,9 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5601,7 +5992,7 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5610,6 +6001,9 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5632,7 +6026,7 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5641,11 +6035,14 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } if m.DeploySpec == nil { - m.DeploySpec = &v1.PodSpec{} + m.DeploySpec = &v1.PodTemplateSpec{} } if err := m.DeploySpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -5665,7 +6062,7 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5674,6 +6071,9 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5698,7 +6098,7 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5708,6 +6108,9 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5727,7 +6130,7 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5736,6 +6139,9 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5753,6 +6159,9 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5780,7 +6189,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5808,7 +6217,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5818,6 +6227,9 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5837,7 +6249,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5846,6 +6258,9 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5867,7 +6282,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5876,6 +6291,9 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5897,7 +6315,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5907,6 +6325,9 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5926,7 +6347,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5935,6 +6356,9 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5955,7 +6379,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5972,7 +6396,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5982,6 +6406,9 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -5998,7 +6425,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6007,7 +6434,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { + if postmsgIndex < 0 { return ErrInvalidLengthGenerated } if postmsgIndex > l { @@ -6049,7 +6476,7 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CompletionCount |= (int32(b) & 0x7F) << shift + m.CompletionCount |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -6063,6 +6490,9 @@ func (m *SensorStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6090,7 +6520,7 @@ func (m *TimeFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6118,7 +6548,7 @@ func (m *TimeFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6128,6 +6558,9 @@ func (m *TimeFilter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6147,7 +6580,7 @@ func (m *TimeFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6157,6 +6590,9 @@ func (m *TimeFilter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6171,6 +6607,9 @@ func (m *TimeFilter) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6198,7 +6637,7 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6226,7 +6665,7 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6236,6 +6675,9 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6255,7 +6697,7 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6264,6 +6706,9 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6288,7 +6733,7 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6298,6 +6743,9 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6317,7 +6765,7 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6326,6 +6774,9 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6350,7 +6801,7 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6359,6 +6810,9 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6378,6 +6832,9 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6405,7 +6862,7 @@ func (m *TriggerCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6433,7 +6890,7 @@ func (m *TriggerCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6443,6 +6900,9 @@ func (m *TriggerCondition) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6462,7 +6922,7 @@ func (m *TriggerCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6472,6 +6932,9 @@ func (m *TriggerCondition) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6486,6 +6949,9 @@ func (m *TriggerCondition) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6513,7 +6979,7 @@ func (m *URLArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6541,7 +7007,7 @@ func (m *URLArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6551,6 +7017,9 @@ func (m *URLArtifact) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6570,7 +7039,7 @@ func (m *URLArtifact) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6585,6 +7054,9 @@ func (m *URLArtifact) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthGenerated } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6651,10 +7123,13 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthGenerated } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } return iNdEx, nil case 3: for { @@ -6683,6 +7158,9 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } } return iNdEx, nil case 4: @@ -6701,144 +7179,3 @@ var ( ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ) - -func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto", fileDescriptor_generated_83408b5aadd35c22) -} - -var fileDescriptor_generated_83408b5aadd35c22 = []byte{ - // 2123 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0xcb, 0x73, 0x1b, 0x49, - 0x19, 0xcf, 0xe8, 0x65, 0xe9, 0x93, 0x1d, 0x3b, 0xcd, 0xc2, 0x0a, 0x03, 0x56, 0x6a, 0x28, 0xa8, - 0x85, 0xda, 0x1d, 0x25, 0xce, 0xb2, 0x15, 0xa0, 0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, 0xea, 0xb9, 0xff, 0x17, 0x58, 0xe0, 0x77, 0xe9, 0x6d, 0x80, - 0x63, 0xc2, 0x82, 0xc3, 0x71, 0x87, 0x30, 0xdd, 0xb0, 0xaa, 0x19, 0xb3, 0x7a, 0x9c, 0x6a, 0x70, - 0xce, 0xaa, 0xed, 0x3c, 0x7b, 0xbe, 0x75, 0xe1, 0xd3, 0xe7, 0x5b, 0x17, 0x3e, 0x7b, 0xbe, 0x75, - 0xe1, 0xe3, 0xe9, 0x96, 0xf5, 0x6c, 0xba, 0x65, 0x7d, 0x3a, 0xdd, 0xb2, 0x3e, 0x9b, 0x6e, 0x59, - 0xff, 0x9a, 0x6e, 0x59, 0x9f, 0xfc, 0x7b, 0xeb, 0xc2, 0x07, 0xd5, 0xe4, 0xfc, 0xff, 0x0b, 0x00, - 0x00, 0xff, 0xff, 0xec, 0xeb, 0x5f, 0xe1, 0xd2, 0x1b, 0x00, 0x00, -} diff --git a/pkg/apis/sensor/v1alpha1/generated.proto b/pkg/apis/sensor/v1alpha1/generated.proto index 1bc45753c2..65a0c1bda8 100644 --- a/pkg/apis/sensor/v1alpha1/generated.proto +++ b/pkg/apis/sensor/v1alpha1/generated.proto @@ -306,7 +306,7 @@ message SensorSpec { repeated Trigger triggers = 2; // DeploySpec contains sensor pod specification. For more information, read https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core - optional k8s.io.api.core.v1.PodSpec deploySpec = 3; + optional k8s.io.api.core.v1.PodTemplateSpec deploySpec = 3; // EventProtocol is the protocol through which sensor receives events from gateway optional github.com.argoproj.argo_events.pkg.apis.common.EventProtocol eventProtocol = 4; diff --git a/pkg/apis/sensor/v1alpha1/openapi_generated.go b/pkg/apis/sensor/v1alpha1/openapi_generated.go index 13050addd3..250dbcfdba 100644 --- a/pkg/apis/sensor/v1alpha1/openapi_generated.go +++ b/pkg/apis/sensor/v1alpha1/openapi_generated.go @@ -846,7 +846,7 @@ func schema_pkg_apis_sensor_v1alpha1_SensorSpec(ref common.ReferenceCallback) co "deploySpec": { SchemaProps: spec.SchemaProps{ Description: "DeploySpec contains sensor pod specification. For more information, read https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core", - Ref: ref("k8s.io/api/core/v1.PodSpec"), + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, "eventProtocol": { @@ -880,7 +880,7 @@ func schema_pkg_apis_sensor_v1alpha1_SensorSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/common.EventProtocol", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DependencyGroup", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependency", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Trigger", "k8s.io/api/core/v1.PodSpec"}, + "github.com/argoproj/argo-events/pkg/apis/common.EventProtocol", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DependencyGroup", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependency", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Trigger", "k8s.io/api/core/v1.PodTemplateSpec"}, } } diff --git a/pkg/apis/sensor/v1alpha1/types.go b/pkg/apis/sensor/v1alpha1/types.go index 71554287c9..664a416204 100644 --- a/pkg/apis/sensor/v1alpha1/types.go +++ b/pkg/apis/sensor/v1alpha1/types.go @@ -89,7 +89,7 @@ type SensorSpec struct { Triggers []Trigger `json:"triggers" protobuf:"bytes,2,rep,name=triggers"` // DeploySpec contains sensor pod specification. For more information, read https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core - DeploySpec *corev1.PodSpec `json:"deploySpec" protobuf:"bytes,3,name=deploySpec"` + DeploySpec *corev1.PodTemplateSpec `json:"deploySpec" protobuf:"bytes,3,name=deploySpec"` // EventProtocol is the protocol through which sensor receives events from gateway EventProtocol *apicommon.EventProtocol `json:"eventProtocol" protobuf:"bytes,4,name=eventProtocol"` diff --git a/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go index a57bd0888c..5b66b80657 100644 --- a/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go @@ -477,7 +477,7 @@ func (in *SensorSpec) DeepCopyInto(out *SensorSpec) { } if in.DeploySpec != nil { in, out := &in.DeploySpec, &out.DeploySpec - *out = new(v1.PodSpec) + *out = new(v1.PodTemplateSpec) (*in).DeepCopyInto(*out) } if in.EventProtocol != nil {