diff --git a/go.mod b/go.mod index 3893c5786..1b8db5a0b 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,8 @@ require ( k8s.io/api v0.20.7 k8s.io/apimachinery v0.20.7 k8s.io/client-go v0.20.7 - knative.dev/eventing v0.24.0 + knative.dev/eventing v0.24.2 knative.dev/hack v0.0.0-20210622141627-e28525d8d260 - knative.dev/pkg v0.0.0-20210622173328-dd0db4b05c80 + knative.dev/pkg v0.0.0-20210902173607-953af0138c75 knative.dev/serving v0.24.0 ) diff --git a/go.sum b/go.sum index 0fbc9de93..6c9385dcd 100644 --- a/go.sum +++ b/go.sum @@ -1583,15 +1583,16 @@ k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= knative.dev/caching v0.0.0-20210622183028-95f67e075071/go.mod h1:9gwZcCBtmo9pi1oTgchXcdMNAXAYWklwDmO9uhDsIJE= -knative.dev/eventing v0.24.0 h1:CoaQwZBizxZyOFJUvFcyb7vYSvpYBmfb4IYRNWUdTPE= -knative.dev/eventing v0.24.0/go.mod h1:9xo0SWkIfpXrx0lvGQO7MUlPF8cu+QCMd2gGxj6wxrU= +knative.dev/eventing v0.24.2 h1:yW3pOUKm/PixfH/lGsDVX9UdHahR2uzMoewV4PkRbK8= +knative.dev/eventing v0.24.2/go.mod h1:9xo0SWkIfpXrx0lvGQO7MUlPF8cu+QCMd2gGxj6wxrU= knative.dev/hack v0.0.0-20210622141627-e28525d8d260 h1:f2eMtOubAOc/Q7JlvFPDKXiPlJVK+VpX2Cot8hRzCgQ= knative.dev/hack v0.0.0-20210622141627-e28525d8d260/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/hack/schema v0.0.0-20210622141627-e28525d8d260/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0= knative.dev/networking v0.0.0-20210622182128-53f45d6d2cfa h1:MprAGBX3eRaBZFRXC3ZjsnhnjttfprRVXdxmTeEzC2o= knative.dev/networking v0.0.0-20210622182128-53f45d6d2cfa/go.mod h1:vwPACNE712tyoEG4fjyUIgfL4xkbXFugx8bxW+QrKn4= -knative.dev/pkg v0.0.0-20210622173328-dd0db4b05c80 h1:GHJ3lglE0/YHfBMMJqluqUNLOmsNXh7s7DBnfrkpRMM= knative.dev/pkg v0.0.0-20210622173328-dd0db4b05c80/go.mod h1:kGegTnbZ+ljFjAE3E1+8wgaH2LMv8qYi+72o3F3cbdc= +knative.dev/pkg v0.0.0-20210902173607-953af0138c75 h1:U9Im5Wp0oKV2ZWP+V9RZSDgRqv4IhfnzObMrgzWdDRQ= +knative.dev/pkg v0.0.0-20210902173607-953af0138c75/go.mod h1:kGegTnbZ+ljFjAE3E1+8wgaH2LMv8qYi+72o3F3cbdc= knative.dev/reconciler-test v0.0.0-20210623134345-88c84739abd9/go.mod h1:4wqv2WyWUC5yhTesRUVwgjv/fHTHny1RYBfdB6tVDok= knative.dev/serving v0.24.0 h1:MZIXR0r2FCXlTuQQXwLuM9+tV6pl2K6YUtK6tEtDB58= knative.dev/serving v0.24.0/go.mod h1:l/dhsWs+Y8PAssBxaS/hN4HRQQGy4zxfVHD1xYjl3ns= diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1/ping_validation.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1/ping_validation.go index d86489747..c60f49a4f 100644 --- a/vendor/knative.dev/eventing/pkg/apis/sources/v1/ping_validation.go +++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1/ping_validation.go @@ -20,6 +20,7 @@ import ( "context" "encoding/base64" "encoding/json" + "errors" "fmt" "strings" @@ -37,8 +38,10 @@ func (c *PingSource) Validate(ctx context.Context) *apis.FieldError { func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError { var errs *apis.FieldError - schedule := cs.Schedule + + errs = validateDescriptor(schedule) + if cs.Timezone != "" { schedule = "CRON_TZ=" + cs.Timezone + " " + schedule } @@ -98,3 +101,10 @@ func validateJSON(str string) error { var objmap map[string]interface{} return json.Unmarshal([]byte(str), &objmap) } + +func validateDescriptor(spec string) *apis.FieldError { + if strings.Contains(spec, "@every") { + return apis.ErrInvalidValue(errors.New("unsupported descriptor @every"), "schedule") + } + return nil +} diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1beta2/ping_validation.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta2/ping_validation.go index 5bbd2d7f0..c8fa47a60 100644 --- a/vendor/knative.dev/eventing/pkg/apis/sources/v1beta2/ping_validation.go +++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1beta2/ping_validation.go @@ -20,6 +20,7 @@ import ( "context" "encoding/base64" "encoding/json" + "errors" "fmt" "strings" @@ -37,8 +38,10 @@ func (c *PingSource) Validate(ctx context.Context) *apis.FieldError { func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError { var errs *apis.FieldError - schedule := cs.Schedule + + errs = validateDescriptor(schedule) + if cs.Timezone != "" { schedule = "CRON_TZ=" + cs.Timezone + " " + schedule } @@ -98,3 +101,10 @@ func validateJSON(str string) error { var objmap map[string]interface{} return json.Unmarshal([]byte(str), &objmap) } + +func validateDescriptor(spec string) *apis.FieldError { + if strings.Contains(spec, "@every") { + return apis.ErrInvalidValue(errors.New("unsupported descriptor @every"), "schedule") + } + return nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index f7660719e..45ba19f44 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -914,7 +914,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# knative.dev/eventing v0.24.0 +# knative.dev/eventing v0.24.2 ## explicit knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/util/crstatusevent @@ -967,7 +967,7 @@ knative.dev/hack knative.dev/networking/pkg knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking/v1alpha1 -# knative.dev/pkg v0.0.0-20210622173328-dd0db4b05c80 +# knative.dev/pkg v0.0.0-20210902173607-953af0138c75 ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck