* Run ./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh and add k8s validation-gen
* Update k8s versions for e2e test
* Replace github.com/google/gofuzz with sigs.k8.io/randfill
* Fix kind kubernetes versions
* Fix github.com/google/gofuzz -> sigs.k8s.io/randfill for 3 other tests
* Avoid panic on internal context cancellation error by closing stop channel
* Re-run update-codegen.sh
* Replace kind shell scripts in kind-e2e with chainguard action
* Fix a bunch of linter errors that popped up
* Address feedback from Cali0707
This allows to pass 0 as the port and thus let the OS chose a free port for the server. This helps to fix flaky tests which can occur, when we use the same port number in different tests which might run in parallel
* Add CA rotation tests
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Fix test
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Add propagation improvements for webhook (running before reconciler)
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Inject Kubeclient
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Fix unit tests
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Use managed T for ApiServerSource TLS tests
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Reduce number of retries
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* 💄 updates after rebase...
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
---------
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Co-authored-by: Matthias Wessendorf <mwessend@redhat.com>
* 🧹 when the OIDC feature flag is switched on, quickly before. It might be the case that the OIDC Service Account is not reconciled at that time
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Update pkg/reconciler/inmemorychannel/dispatcher/inmemorychannel.go
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
---------
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
* 💫 Remove hard-coded knative-eventing namespace and replace with system.Namespace() and touch test to get that properly injected
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* 🧹 Remove yet another hard-coded instance of knative-eventing
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
---------
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
upgrade to latest dependencies
bumping knative.dev/pkg a8e20d9...4e8ebbe:
> 4e8ebbe Bump golang.org/x/tools from 0.31.0 to 0.32.0 (# 3169)
> 1ae6a39 Bump golang.org/x/net from 0.38.0 to 0.39.0 (# 3168)
bumping knative.dev/reconciler-test 98ae503...1decb8d:
> 1decb8d [main] Upgrade to latest dependencies (# 790)
bumping golang.org/x/tools 6a5b66b...456962e:
> 456962e go.mod: update golang.org/x dependencies
> 5916e3c internal/tokeninternal: AddExistingFiles: tweaks for proposal
> 9a1fbbd internal/typesinternal: change Used to UsedIdent
> e73cd5a gopls/internal/golang: implement dynamicFuncCallType with typeutil.ClassifyCall
> 11a9b3f gopls/internal/server: fix event labels after the big rename
> 3e7f74d go/types/typeutil: used doesn't need Info.Selections
> b97074b internal/gofix: fix URLs
> e850fe1 gopls/internal/golang: CodeAction: place gopls doc as the last action
> b948add internal/gofix: move from gopls/internal/analysis/gofix
> b437eff go/types/typeutil: implement Callee and StaticCallee with Used
> e29f9ae refactor/satisfy: check for presence of types.Info maps
> 17ce4c7 refactor/eg: return error if some info maps are missing
> 33f80b5 typesinternal: remove RequiresFullInfo
> 83a8057 x/tools: regenerate code after go upgrading
> 7799973 gopls/internal/analysis/modernize: add docs for missing modernize passes
> c788d17 gopls/internal/analysis/modernize: waitgroup: use index.Calls
> 3348ae8 go/analysis/passes/nilfunc: use typesinternal.Used
> e74d252 gopls/internal/analysis/modernize: check nil before calling maybeNaN
> 66c560d x/tools: apply modernize fixes
> 300a853 gopls: require go1.24.2
> aee7ae5 internal/typesinternal: support checking for full types.Info
> 97789e8 gopls/internal/lsprpc: fix call function with wrong err
> 255cfd7 gopls: automatically insert package clause for new go files
> ead1fea internal/analysis/modernize: add nil check before comparing with index object
> f3a6b96 gopls/internal/analysis/modernize: add modernizer for WaitGroup.Go
> 5fba861 internal/typesinternal: add Object and ClassifyCall
> 5c9a69f internal/refactor/inline: get rid of imports.Process
> 659a8cd go/analysis/analysistest: report input rather result when error happens
> aac3cf0 internal/refactor/inline: improve freeishNames
> a857356 internal/refactor/inline: improve freeishNames doc
> eb75b19 internal/refactor/inline: modernize
> 1b0b688 gopls: fix indent issue and track a TODO
> 07cbcde gopls/internal/cmd: suppress TestImplementation on go1.23
> 48421ae gopls/internal/analysis/modernize: preserves comments in mapsloop
> 8c42f8a gopls/internal/analysis/modernize: use types.RelativeTo to respect current package
> fbb7047 internal/refactor/inline: extract import handling from inlineCall
> 2d8ef13 internal/refactor/inline: document test file format
> 6a91355 internal/refactor/inline: factor out import map construction
> b3ce3e1 gopls/completion: use high score for package name main when current package is main
> c1b6839 internal/astutil/cursor: Ancestors -> Enclosing (+ reflexive)
> d70c04e internal/refactor/inline: replace extractTxtar
> 8be0d5f gopls/internal/analysis/maprange: use typeindex
> b75dab2 internal/typesinternal/typeindex: suppress test on js
> 7efe9a8 gopls/internal/analysis/modernize: rangeint: fix yet another bug
> 30641f5 gopls/internal/analysis/modernize: use typeindex throughout
> 11a3153 gopls/internal/analysis/modernize: rangeint: respect side effects
> 19f73a6 internal/typesinternal/typeindex: index of types.Info
> 45b8eac gopls/internal/golang: test initial bindings to unify
> 9570155 gopls/internal/golang: test unify result bindings
> baedf71 gopls/internal/golang: unify tracks type params
> 961631a internal/testfiles: replace outdated function with os.CopyFS
> bf12eb7 gopls/internal/analysis/modernize: fix slicedelete triggers on slice identifiers with side effects
> ec542a7 gopls/internal/fuzzy: apply modernizers to the fuzzy matcher
> 20f8890 internal/astutil/cursor: add Cursor.Contains(Cursor) bool
> 084551f go/analysis/passes/maprange: check for redundant Keys/Values calls
> 9abefc5 gopls/internal/analysis/modernize: permit int/uint type variants in rangeint
> cb292c6 internal/astutil/cursor: unsplit Parent{Edge,Index} -> ParentEdge
> c2768b7 gopls/modernize: remove unused functions
> 9b2264a gopls/internal/golang/completion: ensure expectedCompositeLiteralType arg is not nil
> cfd8cf5 internal/astutil/cursor: split Edge into Parent{Edge,Index}
> 3a64d74 all: make function comment match function name
> 58e40ae gopls/internal/golang/completion: avoid crash in addFieldItems
> be0d52b gopls/internal/cache: improve build constraint trimming
> a70d348 gopls/internal/util/persistent: add concurrency test
> 7042bab gopls/internal/analysis/modernize: modernizer to suggest using strings.CutPrefix
> 3d22fef gopls/internal/analysis/modernize: disable minmax on floating point
> e7b4c64 gopls/internal/golang: fix crash in source.test code action
> 95eb16e gopls/internal/test/integration: skip x_tools-gotip-openbsd-amd64 (7.6)
> 066484e gopls/internal/test/integration/misc: test "annotations" setting
> e06efb4 internal/gcimporter: bug.Report in export's panic handler
> 6c3e542 gopls/internal/analysis/modernize: preserves comments in minmax
> dcc4b8a gopls/internal/golang: use slices.Reverse in pathEnclosingObjNode
> 40f8cca internal/imports: fix extra logf argument
> e59d6c5 gopls/internal/cache/testfuncs: handle recursive subtests
> 4ee50fe gopls/internal/analysis/modernize: rangeint: avoid offering wrong fix
> bf70295 cmd/go-contrib-init: drop unneeded GOPATH checks in module mode
> 381d68d gopls/internal/util/fingerprint/fingerprint: unify type params
> cc7d698 gopls/internal/test/integration/misc: fix TestAssembly for CL 639515
> 03f197e gopls/internal/modernize: remove assignment in ranges
> 5a45ac2 x/tools: use range over function for some API
> 8fa586e internal/analysis: add function to delete a statement
> 29f81e9 gopls/internal/cache: filter **/foo match any depth
> 7435a81 gopls/internal/analysis/modernize: document workflow
> b08c7a2 gopls/internal/util/fingerprint: split from cache/methodsets
bumping golang.org/x/sys 74cfc93...01aaa83:
> 01aaa83 all: simplify code by using modern Go constructs
> 1b2bd6b windows: replace all StringToUTF16 calls with UTF16FromString
> 1c3b72f unix: update Linux kernel to 6.14
> c175b6b windows: add cmsghdr and pktinfo structures
> 3330b5e unix: support Readv, Preadv, Writev and Pwritev for darwin
> 7401cce cpu: replace specific instructions with WORD in the function get_cpucfg on loong64
> b8f7da6 cpu: add support for detecting cpu features on loong64
> f2ce62c windows: add constants for PMTUD socket options
bumping golang.org/x/term 04218fd...5d2308b:
> 5d2308b go.mod: update golang.org/x dependencies
> e770ddd x/term: disabling auto-completion around GetPassword()
bumping golang.org/x/text 566b44f...4890c57:
> 4890c57 go.mod: update golang.org/x dependencies
bumping golang.org/x/crypto 49bf5b8...959f8f3:
> 959f8f3 go.mod: update golang.org/x dependencies
> 769bcd6 ssh: use the configured rand in kex init
> d0a798f cryptobyte: fix typo 'octects' into 'octets' for asn1.go
> acbcbef acme: remove unnecessary []byte conversion
> 376eb14 x509roots: support constrained roots
> b369b72 crypto/internal/poly1305: implement function update in assembly on loong64
> 6b853fb ssh/knownhosts: check more than one key
bumping golang.org/x/net e1fcd82...b8d8877:
> b8d8877 go.mod: update golang.org/x dependencies
Signed-off-by: Knative Automation <automation@knative.team>
If no subscriber uri is present we return 404, instead of 400 which means the request from the client itself would have had isssues
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
💄 Adding little func that generated the invalid PEM data, instead of a hard-coded string, that may look like a real one...
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
🔨 Fixing the way we render custom camel tags on go structs. Remove the incorrect alue of the tag and update the function that assembles the actual ENV_VARs
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Propagate Cert-Manager Certificate status to the one from the IntegrationSink
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Remove cert from top level condition set
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
---------
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Instead of setting the ready condition during reconciliation
steps, set specific conditions since the ready condition
is managed and set according to the state of other conditions.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Guard reserved access with lock in tests
* Create vpods in test
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
---------
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* fix: verify trigger is not ready before pingsource dependency exists
* fix: create separate step function to verify trigger dependency does not exist
This allows:
- propagating the response from Sink
- discarding the response from Sink
- transforming the response from Sink
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
- Set address only once endpoints are available
- Add debug logging
- Fix semantic comparisons to avoid loops
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Add resyncReserved removes deleted vPods from reserved to keep the
state consistent when leadership changes (Promote / Demote).
`initReserved` is not enough since the vPod lister can be stale.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
These are roles that users can use to give their developers access
to Knative Eventing resources and we're missing the sinks group.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Reduce mt-broker-controller memory usage with namespaced endpoint informer
Currently, the mt-broker-controller is using a cluster-wide endpoints
informer but it actually only uses endpoints in the "SYSTEM_NAMESPACE".
Using the namespaced informer factory ensures that the watcher
is only watching endpoints in the `knative-eventing` (also known as
`SYSTEM_NAMESPACE`) namespace.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Start informer
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
---------
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Add authorization conformance tests for Sequence and Parallel
* Use fully functional Sequence and Parallel for Authz conformance tests
* Check Sequence addressable
* Don't swallow errors in Lineage package
Signed-off-by: Ali Ok <aliok@redhat.com>
* Better error handling and make the fail fast configurable
Signed-off-by: Ali Ok <aliok@redhat.com>
---------
Signed-off-by: Ali Ok <aliok@redhat.com>
When scaling down and compacting, basing the last ordinal on the
free capacity structure leads to have a lastOrdinal off by one since
`FreeCap` might contain the free capacity for unschedulable pods.
We will have to continue including unschduelable pods in FreeCap
because it might happen that a pod becomes unscheduleble for external
reasons like node gets shutdown for pods with lower ordinals
and the pod need to be rescheduled and during that time period
we want to consider those when compacting; once all vpods that
were on that pod that is gone get rescheduled, FreeCap will only
include scheduleable pods.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Going OIDC for Integration Source:
- Generating OIDC specific evn_vars for Knative client of camel
- Adding rekt-test for OIDC feature of the source
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
While this is not strictly needed, this prevents issues we could run
into eventually with storage version migrations.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Remove the duplicated health check
* Add the missing health check config
* Add the missing health check
* Remove the duplicated health check
* Fix non-blocking test
* Fix receive adapter probes path
* MT-Broker: return appropriate status code based on the state to leverage retries
The ingress or filter deployments were returning 400 even in the case
where a given resource (like trigger, broker, subscription) wasn't
found, however, this is a common case where the lister cache
hasn't caught up with the latest state.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Fix unit tests
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
---------
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
💄 Avoid using twice hardcoded strings for the names of the Kubescret keys, for AWS access/secret key vals
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
JobSink: Inject execution mode as env variable
To support long running functions in Knative Functions, we will
inject a `KNATIVE_EXECUTION_MODE` environment variable with value
`batch` so that function can change it's runtime behavior to
read the event file rather than starting a long-running server.
Ref: https://github.com/knative/func/issues/2586
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
upgrade to latest dependencies
bumping golang.org/x/tools 2ab3b51...4d2b19f:
> 4d2b19f go.mod: update golang.org/x dependencies
> 6368677 gopls/internal/golang: strength reduce ComputeImportFixEdits
> 777f155 gopls/internal/golang: show package attributes on hover
> 8a0e08f gopls/doc: add missing doc link
> 61415be gopls/internal/cache: guard against malformed paths in port.matches
> 9a89d3a internal/analysisinternal: avoid sub-token spans in TypeErrorEndPos
> 1115af6 internal/expect: support named arguments f(a, b, c=d, e="f")
> 0b9e499 go/{expect,packages/packagestest}: mention the tag+delete proposal
> efcd2bd internal/packagestest: fork go/packages/packagestest
> 0e9ed3d go/packages: do not mutate Config
> ca2b41b x/tools: use internal/expect instead of go/expect
> b22f1ad internal/expect: fork go/expect
> f1ae722 gopls/internal/semtok: change types.Named to types.Basic for iota, true, and false
> dba5486 gopls: update x/telemetry to pick up fix for countertest.ReadCounter
> 9d40727 gopls/internal/server: don't interact with os.UserConfigDir from tests
> 59933b6 go/packages: create fewer goroutines
> f1f7c26 gopls/internal/cache: ensure GO111MODULE is unset in GOPATH tests
> 4f98d3f gopls/internal/golang: run testcases as subtests
> 6d27bba gopls/internal/golang: add testcase handling for func with error returns
> e5417d7 gopls/internal/cache: log go env in TestZeroConfigAlgorithm
> 691997a gopls/internal/golang: consolidate imports from both file in qualifier
> 0c792f1 gopls/internal/golang: support generating test for functions
> 27e1a3a go/packages: ensure TypesInfo is set when NeedTypesInfo is enabled
> 817c7bc gopls/internal/test/integration/workspace: fix TestStdWorkspace
> e36459f gopls/internal/golang: generate test name for selected function/method
> 2998e9a go/analysis/passes/lostcancel: add WithCancelCause et al
> f0379e0 go/packages: add BenchmarkNetHTTP
> ad28b93 go/packages: minor cleanups to loader.parseFiles
> cceaf96 internal/imports: carve out a Source interface for index integration
> f4878ba gopls/internal/golang: use correct imports in HTML pkg doc links
> 109c5fc gopls/internal/test: fix path to local go in integration tests
> 99e8fee x/tools: fset.File(file.Pos()) -> fset.File(file.FileStart)
> 5cd08e2 go/gcexportdata: document 2 releases + tip policy
> ce03cd6 internal/modindex: parse changed time in local time zone
> 386503d gopls/internal/golang: add source code action for add test
> 9d6e1a6 Revert "gopls/internal/analysis: disable ssa/ir analyzers on range-over-func"
> f153a42 gopls: update honnef.co/go/tools (staticcheck) to v0.5.1
> 59f79bc go/ssa: speed up TestTypeparamTest by loading tests once
> 70e82e0 go/analysis/passes/asmdecl: Correct identify writeResult instructions
> cbd92b1 gopls/internal: stubcalledfunction: improve logic of selecting insert position
> 45a28e1 all: fix x/tools tests that fail with a go1.23.1 go.work file
> b0f44d5 copyright: limit copyright checking to .go files
> 73d6794 gopls/internal/template: fix completion token boundary conditions
> 91421d7 gopls/internal/cache: share type checking with analysis
> 36684df go/analysis/passes/unusedwrite: silence if unsafe is imported
> 17213ba gopls/internal/cache/parsego: support lazy object resolution for Files
> 7d1d070 go/ssa/interp: disable interp tests on wasm
> ae56d93 internal/modindex: implement Lookups in the index
> 044b16f internal/gcimporter: extend markBlack workaround go1.22
> dabba6a internal/modindex: new API for incremental update
> 7d196fc go/ssa/interp: fix failing recover2.go test
> f861377 go/ssa/interp: redirect interpreter std{out,err} to testing.T.Log
> 9f3c646 gopls/internal/cache: memoize cache keys
> 1f162c6 gopls/internal/cache: async pull diagnostics and joined analysis
> dbb8252 gopls/release: remove unused(?) script
> 6176384 go/types/objectpath: break cycles through interface methods
> 9e6388a internal/gcimporter: work around go/types data race in 1.23.
> c457787 gopls/internal/cache: avoid reporting bugs when go/packages has errors
> 401eca0 gopls/internal/settings: remove "allowImplicitNetworkAccess"
> 6618569 gopls/internal/cache: refine a bug report related to package metadata
> 6381f0b gopls/internal/cache: refine bug reports
> 63e4449 gopls/internal/telemetry/cmd/stacks: print double-claimed stacks
> f003ff6 gopls/internal/test/marker: rename s/suggestedfix/quickfix/
> 8128bcf gopls/internal/cache: add tolerance for builtin test variants
> a199121 gopls: allow for asynchronous request handling
> 8ecf757 internal/gcimporter: remove test of unsupported "goroot" iimport
> 7310c72 importgraph: correct typo in graph_test.go
> ce4cb55 internal/modindex: fix two bugs
> b3482cc internal/modindex/cmd: Command for maintaining module cache indexes
> 454be60 x/tools: be defensive after types.Info.Types[expr] lookups
> dec6bf1 internal/modindex: update module cache index
> 6c6def2 gopls/internal/telemetry/cmd/stacks: fix bad tmpreaper interaction
> 1a5fe83 gopls: remove cruft
> 244a31e gopls/internal: CodeAction: quickfix to generate missing method
> 87d6131 internal/typeparams: support parameterized aliases in Free
> aa87dcf go/analysis/passes: execute gofmt
> feffeaa go/packages: report an error from Load when GOROOT is misconfigured
> 50179f2 Revert "internal/aliases: add a function to conditionally enable aliases"
> 4f6e118 all: set gotypesalias=1 when using >=1.23 toolchain
> 915132c internal/typesinternal: add NamedOrAlias type
> bd86f8c gopls/internal/cache/analysis: lazily resolve the import map
> a4e0a9e cmd/bundle: enable materialized aliases
> db26c69 cmd/stringer: fix test on android
> f08b5c1 gopls/internal/test/integration/bench: add a pull diagnostics benchmark
> bbb979f go/callgraph/vta: use node IDs for type flow graph
> cf8979b gopls/doc/features: add index of supported Code Actions
> 8621919 go/ssa/ssautil: disable fmt imports on wasm tests
> f439874 internal/modindex: add symbol information
> f21a1dc gopls: add initial support for pull diagnostics
> c19060b gopls/internal/cache: use packageHandles to hold an active package cache
> a30b207 internal/versions: remove InitFileVersions
> de11c55 gopls/doc/codelenses: fix link typo
> 0b989c8 internal/versions: update test expectations
> 89a5311 go/analysis/passes/asmdecl: allow syscall write registers implicitly
> f8f3c13 internal/aliases: add a function to conditionally enable aliases
bumping golang.org/x/mod 46a3137...dec0365:
> dec0365 sumdb: make data tiles by Server compatible with sum.golang.org
> c8a7319 x/mod: fix handling of vendored packages with '/vendor' in non-top-level paths
> 9cd0e4c x/mod: remove vendor/modules.txt from module download
bumping google.golang.org/protobuf 158d2b3...c72053a:
> c72053a all: release v1.35.2
> b985635 internal/impl: fix TestMarshalMessageSetLazyRace (was a no-op!)
> 76135f9 proto: switch messageset_test to use makeMessages() injection point
> 29947bb internal/testprotos/test: add nested message field with [lazy=true]
> 5c14d72 encoding/prototext: use testmessages_test.go approach, too
> 496557b proto: refactor equal_test from explicit table to use makeMessages()
> 0517e5a testing/protocmp: document behavior when combining Ignore and Sort
> d14ebce all: implement strip_enum_prefix editions feature
> fb995f1 encoding/protojson: allow missing value for Any of type Empty
> d340238 all: start v1.35.1-devel
bumping knative.dev/pkg 47a6f9f...a7fd9b1:
> a7fd9b1 Bump google.golang.org/protobuf from 1.35.1 to 1.35.2 (# 3117)
> 215048a Bump golang.org/x/tools from 0.26.0 to 0.27.0 (# 3114)
Signed-off-by: Knative Automation <automation@knative.team>
* JobSink: Delete secrets associated with jobs when jobs are deleted
As reported in https://github.com/knative/eventing/issues/8323 old
JobSink secrets lead to processing old events again while new events
are lost.
Using OwnerReference and k8s garbage collection, now a secret created
for a given event is bound to a given Job lifecycle, so that when a job
is deleted, the associated secret will be deleted.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Fix jobsink name generator + add unit and fuzz tests
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Fix e2e test
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Lint
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
---------
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Allow configuring (opt-in) IMC async handler
We switched to use the sync handler by default, however, it was
reported that in some cases, this is not wanted as it slows down
the source event senders since it needs to wait for all subscribers
to receive events.
While this is the best default behavior since reduces lost events in
InMemoryChannel, we want to allow configuring this behavior, while
documenting the downsides (follow up to docs repo)
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Propagate annotations and labels to channel
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Add E2E tests
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Use constant in tests
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Only propagates messaging.knative.dev annotations
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Add unit test
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Make annotation val explicit string.......
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* channel impl did not support setting annotations before........
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Instead of re-installing the channel_impl, lets update the annotations. Otherwise we loose the channel's Spec.Subscribers
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
---------
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Co-authored-by: Matthias Wessendorf <mwessend@redhat.com>
This will ensure that alld ServiceAccount that are bound to
"addressable-resolver" ClusterRole can read JobSinks.
Fixes issues like this for SinkBindings:
```
{"level":"error","ts":"2024-11-04T08:06:16.160Z","logger":"eventing-webhook","caller":"sinkbinding/sinkbinding.go:87",
"msg":"Failed to get Addressable from Destination:
%!w(*fmt.wrapError=&{failed to get lister for
sinks.knative.dev/v1alpha1,
Resource=jobsinks: jobsinks.sinks.knative.dev is forbidden:
User \"system:serviceaccount:knative-eventing:eventing-webhook\"
cannot list resource \"jobsinks\" in API group \"sinks.knative.dev\"
```
This is required otherwise MTChannelBasedBroker backed by IMC channel
can't forward events to JobSink. The error on ImMemoryChannel is
following:
```
failed to get lister for sinks.knative.dev/v1alpha1, Resource=jobsinks:
jobsinks.sinks.knative.dev is forbidden:
User "system:serviceaccount:knative-eventing:imc-controller" cannot list
resource "jobsinks" in API group "sinks.knative.dev" at the cluster
scope
```
* Add initial raw API types and controller/reconciler. Levering internally the container source for the handling of the kamelet workloads. the logic for applying the env-vars is a bit verbose, but can be improved.
Tests/lifeccyle and some other improvements are still missing. but this works.
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* adding reflection to make the mapping less verbose, and more flexible to extend...
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Add DDB Streams
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* polish and add minimal tests
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Update pkg/apis/sources/v1alpha1/integration_lifecycle.go
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
* Update pkg/apis/sources/v1alpha1/integration_lifecycle.go
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
* Fix compiler warnings
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* use other image coordinates
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* first test for source
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Adding initial rekt test
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Adding SSL support and test for IntegrationSource
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Formatting fixes
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Disable OIDC tests for now
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* use knative nightly images
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Fixing linters
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* addressing comments, Part1
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
---------
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
* Schduler: MAXFILLUP strategy will spread vreplicas across multiple pods
the MAXFILLUP algorithm was using an affinity strategy, meaning that
it would prioritize adding new vreplicas to pods with the same resources.
However, the downside is that if one pod goes down or gets
re-scheduled the entire resource would be down and not produce
events. By spreading replicas across multiple real replicas we would
guarantee better availability.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Remove configurable HA scheduler, fix reserved replicas logic
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Log reserved
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Handle unschedulables pods and always start from reserved no matter what is placements
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Add reserved + overcommit
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Add benchmark + reduce OrdinalFromPodName calls
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Handle unschedulable pods
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
---------
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
upgrade to latest dependencies
bumping google.golang.org/grpc 6f50403...3f95b38:
> 3f95b38 Update version to 1.67.1 (# 7682)
> 4f6c5f2 xds/server: Fix xDS Server leak (# 7664) (# 7681)
> 935f8cb transport: Fix reporting of bytes read while reading headers (# 7660) (# 7667)
> 02bbb65 Change version to 1.67.1-dev (# 7605)
bumping knative.dev/pkg 5031733...952269c:
> 952269c Bump golang.org/x/net from 0.29.0 to 0.30.0 (# 3100)
> e52e2e4 Bump google.golang.org/grpc from 1.67.0 to 1.67.1 (# 3099)
> 4e357ed Bump golang.org/x/tools from 0.25.0 to 0.26.0 (# 3098)
bumping golang.org/x/term 2f7b0dd...9d5441a:
> 9d5441a go.mod: update golang.org/x dependencies
bumping golang.org/x/tools 7398f36...2ab3b51:
> 2ab3b51 go.mod: update golang.org/x dependencies
> 2683c79 gopls/internal/golang/stubmethods: rename analysis/stubmethods
> efd951d gopls/internal/analysis/stubmethods: merge into CodeAction
> d0d0d9e gopls/internal/cache: memoize dependent hash on analysisNode
> a19eef6 gopls/internal/cache: express packageHandle as a state machine
> dd745ec gopls/internal/test/marker: update regression test issue68918.txt
> a02ee35 go/analysis/passes/stdversion: reenable tests
> a24facf all: set gotypesalias=0 explicitly
> ce2a33e gopls/internal: fix extract refactor for cases with anonymous functions
> a2ff832 go/ssa: remove references to GOEXPERIMENT range
> a7552bc go/ast/inspector: add PreorderSeq and All iterators
> d2e4621 gopls/internal/server: CodeAction: interpret Only=[] as [QuickFix]
> 4e80b32 cmd/stringer: support types declared in test files
> 60b6bcd gopls/rename: include filename in error message
> 2848ab8 internal/gcimporter: clean up test expectations
> ee66134 go/ssa/ssautil: isolate deprecated CreateProgram
> 6ded0c4 internal/gcexporter: cleanup test skipping in TestImportTypeparamTests
> 66afc1a gopls/completion: tweak fuzz handling to make its own MethodSet
> 7d92dd6 go/ssa/ssautil: use go/packages to load packages in switch_test.go
> 18bc032 gopls: update x/telemetry to pick up fix for golang/go# 69681
> 6c47868 internal/gcimporter: run larger tests with and without aliases
> c6f2f8e refactor/eg: rewrite test without go/loader
> 8b6849d go/ssa/interp: reenable lifetime tests.
> edfeacf internal/golang: fix panic in signatureHelp over builtin name
> ab64376 go/types/objectpath: skip package tests with wasip1
> e55961d internal/gcimporter: use types.NewInterfaceType
> c59bc30 internal/gcimporter: vary the value of any in predeclared
> 4fc0d79 internal/gcimporter: remove goexperiment.unified tags
> f05b5f4 go/packages: document the role of PWD
> 3483a5e go/packages: use link notation in comments for godoc rendering
> 75350b9 go/ssa: remove import of loader from builder_test.go
> 1c9ca8b go/types/objectpath,internal/aliases: miscellaneous clean up of tests that set gotypesalias
> 23e1af6 go/ssa: migrate TestGenericFunctionSelector away from loader
> 8adb6e8 go/ssa: migrate TestTypeparamTest away from loader
> 7bb384d gopls/internal/test/integration/bench: add an IWL test that opens files
> faf6e28 go/ssa: migrate TestGenericAliases away from loader
> 81a4242 internal/gcimporter: update TestIssueAliases expectation
> 54110aa internal/modindex: package for indexing GOMODCACHE
> b577f77 gopls/internal/cache: remove unnecessary active package check
> 06b986b gopls/internal/cache: add a few checks for context cancellation
> 83326b7 gopls/internal/cache: join concurrent package batch operations
> 34638fc cmd/{callgraph,ssadump}, gopackages: make -tags flags work
> d911e4a gopls: disable ast.Object resolution wherever possible
> eb774f6 go/packages: fix LoadMode.String
> 31fdc78 gopls/internal/server: allow suppression of showDocument
> 752860b gopls/internal/protocol/command: simplify ApplyFix
> fadcea5 gopls/internal/golang: CodeAction: split into producers
> f70550d go/ssa: migrate some tests in build_test.go away from loader
> 01bd772 go/callgraph: rewrite tests to use go/packages not go/loader
> f8ce005 go/types/objectpath: use go/packages instead of go/loader in tests
> d2c1642 internal/gcimporter: rewrite TestIExportData_stdlib using go/packages
> af67b9d go/ssa: migrate source_test.go away from loader
> 3bb0ed7 x/tools: assume go1.22 and simplify
> 1d5e334 internal/aliases: remove Alias and Unalias
> 0b6abe3 go/ssa: remove loader utility functions
> 6a0cacb go/ssa: add test utility for building a single file
> 1204c80 cmd/gorename: delete
> 1c37166 go/ssa: move build tag guarded tests
> dfc41b5 go/ssa: use ast.RangeStmt.Range position directly
> 3921b59 cmd/gorename: remove replace directive
> d09d36b x/tools: remove refs to cmd/gorename
> 8517dc9 cmd/gorename: create submodule
> cd349f3 go/ssa: Move instantiation tests off of unexported API
> 45851d3 gopls/internal/telemetry/cmd/stacks: show build failure stderr
> c8d229c all: fix spelling errors
> 8db9562 go/ssa: update public doc of CreatePackage
> bea7373 gopls/internal/protocol/command: remove nuisance error handling
> 18a3f05 go/ssa: remove outdated any normalizer setting up in test
> 0355013 go/ssa: sanity check for package transient fields
> 2aabc4f go/analysis/passes/printf: return when suppressing a non-constant diagnostic
> 5cb6eeb txtar: use slices.Clone instead of copy
> e603756 gopls/internal/cache: add telemetry counter for GOPACKAGESDRIVER
> 42b921c gopls/internal/test/integration: skip BenchmarkPackages with -short
> a58d83b gopls/internal/cache: build the import map lazily during type checking
> 765ea95 go/analysis/passes/printf: add global to disable new diagnostics
> a319a85 gopls/internal/telemetry/cmd/stacks: display closed issues white
> 5aac53c gopls/internal/golang: Definition: jump to assembly
> 8fcd92f gopls/internal/telemetry/cmd/stacks: predicate de-duplication
> 7891473 gopls/internal/telemetry/cmd/stacks: fix two bugs
> 91d4bdb gopls: rm GofumptFormat from internal/settings
> 198986d go/ssa: go/ssa: disable TestTypeparamTest on wasm
> 3e49191 gopls/internal/telemetry/cmd/stacks: generate CodeSearch links
> beed481 gopls/internal/settings: use CodeActionKind hierarchy
> 15b8886 SignatureHelp: report signature of Ident if no enclosing CallExpr
> 4e8d5c8 gopls: bump gofumpt to 0.7.0
> 6a387a4 go/ssa: require 1.23 for TestCycles
> 42a6477 go/ssa: disable TestTypeparamTest/chan.go on wasm
> 5157118 gopls/internal/lsp/source: put testing.T/B first when extracting
> 94ac686 go/ssa: pop targets stack on range-over-func
> 2884375 gopls/internal/golang: Definitions: support renaming imports in doc links
> b0f680c go/ssa: reenable TestStdlib
> b7af269 go/ssa: improve sanity checking
> fd7ab2d gopls/internal/server: fix build following semantic merge conflict
> dc4c525 gopls/internal: test discovery
> 8ba9169 gopls/internal/golang: Highlight: work around go/types bug
> bfc94c9 go/ssa: extract type recursion into a helper package
> 1dc949f internal/settings: simplify linking now that we only build with 1.23
> c055e89 x/tools: deprecate astutil.Unparen
> c2e057b gopls: use Func.Signature everywhere
> 6b0cfff internal/test/marker: support multi-line locations
> 9d7d14e x/tools/gopls: delete code obsoleted by go1.23
> 4bcf6a3 internal/golang: add a fast path for FormatVarType with gopls at 1.23
bumping golang.org/x/net 35b4aba...6cc5ac4:
> 6cc5ac4 go.mod: update golang.org/x dependencies
> f88258d websocket: update nhooyr.io/websocket to github.com/coder/websocket
> 7191757 http2: add support for net/http HTTP2 config field
> 4790dc7 http2: add support for server-originated pings
> 541dbe5 http2: add Server.WriteByteTimeout
> 3c333c0 route: fix address parsing of messages on Darwin
bumping knative.dev/reconciler-test 87d8570...5e05cb3:
> 5e05cb3 Fix WithLabels and WithPodLabels to append to eventually existing labels (# 765)
bumping golang.org/x/text 1e3e9fd...3043346:
> 3043346 x/text: Correct examples in number/doc
> 38a95c2 all: fix some comments
> 20097e4 all: fix printf(var) mistakes detected by latest printf checker
bumping golang.org/x/sys a43b625...23b0dab:
> 23b0dab unix: mark vgetrandom as non-escaping
> cbf0eb6 unix: fix grep syntax to work on non-GNU greps
> e7397b9 unix: update to Linux 6.11
> 981de40 unix: use vDSO for getrandom() on linux
> 48aad76 linux: add tcp_cc_info and its related types
> d58f986 all: fix some typos in comment
> 30de352 unix: fix Test{Fd,}Xattr failure on NetBSD
> 68ed59b windows/svc: fix printf(var) mistake detected by latest printf checker
> c08bc6e unix: update Go to 1.23.0
bumping golang.org/x/crypto c9da6b9...adef4cc:
> adef4cc go.mod: update golang.org/x dependencies
> a0819fb sha3: fix cSHAKE initialization for extremely large N and or S
> 42ee18b ssh: return ServerAuthError after too many auth failures
> 9e92970 bn256: add missing symbols in comment
Signed-off-by: Knative Automation <automation@knative.team>
Currently, the scheduler and autoscaler are single threads and use
a lock to prevent multiple scheduling and autoscaling decision
from happening in parallel; this is not a problem for our use
cases, however, the multiple `wait` currently present are slowing
down recovery time.
From my testing, if I delete and recreate the Kafka control plane
and data plane, without this patch it takes 1h to recover when there
are 400 triggers or 20 minutes when there are 100 triggers; with the
patch it is immediate (only a 2/3 minutes with 400 triggers).
- Remove `wait`s from state builder and autoscaler
- Add additional debug logs
- Use logger provided through the context as opposed to gloabal loggers
in each individual component to preserve `knative/pkg` resource aware
log keys.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* feat: add constructor for full graph
Signed-off-by: Calum Murray <cmurray@redhat.com>
* fix: tests build again
Signed-off-by: Calum Murray <cmurray@redhat.com>
* fix: handle fetching sources properly
Signed-off-by: Calum Murray <cmurray@redhat.com>
* fix: don't return early for auth errors
Signed-off-by: Calum Murray <cmurray@redhat.com>
* feat: added config for graph constructor
Signed-off-by: Calum Murray <cmurray@redhat.com>
* feat: add logging when unauthorized/forbidden to list resources
Signed-off-by: Calum Murray <cmurray@redhat.com>
* Fix vertices fn creating nil pointers
for 3 entries, it was creating an array of 6
Signed-off-by: Ali Ok <aliok@redhat.com>
* fix review comments from @aliok
Signed-off-by: Calum Murray <cmurray@redhat.com>
* Add stringer impl to types
Signed-off-by: Ali Ok <aliok@redhat.com>
* No panic if source filter is not specified
Signed-off-by: Ali Ok <aliok@redhat.com>
* Replace some hardcoded strings
Signed-off-by: Ali Ok <aliok@redhat.com>
---------
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Ali Ok <aliok@redhat.com>
Co-authored-by: Ali Ok <aliok@redhat.com>
* Re-use channel.ChannelChain reconciler-test feature in upgrade tests
* Fix glob -> global
* Remove redundant feature name from test name
* Remove Setup/Verify from test name
* Use slices.Concat from Golang 1.22
* Include setupEnv and setupCtx in DurableFeature
* Remove most pointers
* Refactor and use FeatureGroupWithUpgradeTests
* Try workaround for issues/8161
* Renames
* Expose EnvOpts and make DurableFeature more configurable
The IMC dispatcher is using the same server receiving events
for k8s readiness and liveness probes, so we don't need the
controller internal health server to be running.
The controller internal health server is using the same port
which leads to this error:
```
2024-07-31T15:58:53.582Z error inmemorychannel-dispatcher sharedmain/main.go:334 Error while running server {"commit": "b7bfc92", "knative.dev/pod": "imc-dispatcher-696d94588d-j7fr5", "error": "listen tcp :8080: bind: address already in use"}
knative.dev/pkg/injection/sharedmain.MainWithConfig
knative.dev/pkg@v0.0.0-20240716082220-4355f0c73608/injection/sharedmain/main.go:334
knative.dev/pkg/injection/sharedmain.MainWithContext
knative.dev/pkg@v0.0.0-20240716082220-4355f0c73608/injection/sharedmain/main.go:209
main.main
knative.dev/eventing/cmd/in_memory/channel_dispatcher/main.go:47
runtime.main
runtime/proc.go:271
```
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* First draft of the default broker class code
Signed-off-by: Leo Li <leoli@redhat.com>
* Change the default broker class config
Signed-off-by: Leo Li <leoli@redhat.com>
* Run codegen
Signed-off-by: Leo Li <leoli@redhat.com>
* Refactor the code
Signed-off-by: Leo Li <leoli@redhat.com>
* Codegen
Signed-off-by: Leo Li <leoli@redhat.com>
* Fix the build error and run code gen
Signed-off-by: Leo Li <leoli@redhat.com>
* Fix the build error in the tests
Signed-off-by: Leo Li <leoli@redhat.com>
* Fix the build error in the tests
Signed-off-by: Leo Li <leoli@redhat.com>
* Modify the current existing test, and add more test cases
Signed-off-by: Leo Li <leoli@redhat.com>
* Modify the current existing test, and add more test cases
Signed-off-by: Leo Li <leoli@redhat.com>
* Pass in the actual broker name instead of leaving it empty
Signed-off-by: Leo Li <leoli@redhat.com>
* Modify the condition to check whether Different Namespace is allowed according to the default configs
Signed-off-by: Leo Li <leoli@redhat.com>
* Revert the brokerSpec.Name change.
Signed-off-by: Leo Li <leoli@redhat.com>
* Fix the failing unit tests by adding the default config for the defaults
Signed-off-by: Leo Li <leoli@redhat.com>
* Fix the failing unit tests
Signed-off-by: Leo Li <leoli@redhat.com>
* Fix the review comments
Signed-off-by: Leo Li <leoli@redhat.com>
* Update pkg/apis/config/defaults.go
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
* Change the tests to be table form
Signed-off-by: Leo Li <leoli@redhat.com>
* Check if the brokerClassName is the default broker class for the whole cluster
Signed-off-by: Leo Li <leoli@redhat.com>
* Fixed the build error
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: instead of always passing the empty className, pass in the variable instead
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: brokerClass is a string pointer. If the value is null but pointer has value, it will pass. So this commit fix that problem.
Signed-off-by: Leo Li <leoli@redhat.com>
* feat: adding some temporary test cases for testing purposes
Signed-off-by: Leo Li <leoli@redhat.com>
* feat: adding some temporary test cases for testing purposes
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the failing tests
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix FIXME, the issue that can potentially cause SegFault
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the failing rabbitmq issue
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: remove the trailing whitespace
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: update the comments
Signed-off-by: Leo Li <leoli@redhat.com>
* feat: add the high level summary for the code
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the review comments
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the review comments
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix Calum's review comments
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix failed unit test caused by the latest review comment fix
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix failed unit test caused by the latest review comment fix
Signed-off-by: Leo Li <leoli@redhat.com>
* feat: add the test for the deprecating default broker config feature
Signed-off-by: Leo Li <leoli@redhat.com>
---------
Signed-off-by: Leo Li <leoli@redhat.com>
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
* feat: added delivery format to trigger crd
Signed-off-by: Calum Murray <cmurray@redhat.com>
* feat: support delivery format in filter handler
Signed-off-by: Calum Murray <cmurray@redhat.com>
* test: add e2e test to verify trigger delivers events with the correct format
Signed-off-by: Calum Murray <cmurray@redhat.com>
---------
Signed-off-by: Calum Murray <cmurray@redhat.com>
* create eventpolicies for parallel channel
Signed-off-by: rahulii <r.sawra@gmail.com>
* reconcile event policies for parallel
Signed-off-by: rahulii <r.sawra@gmail.com>
* add unit test cases
Signed-off-by: rahulii <r.sawra@gmail.com>
* add more unit test cases
Signed-off-by: rahulii <r.sawra@gmail.com>
* remove unused function
Signed-off-by: rahulii <r.sawra@gmail.com>
* add more unit test cases
Signed-off-by: rahulii <r.sawra@gmail.com>
* add more unit test case - with multiple event policies
Signed-off-by: rahulii <r.sawra@gmail.com>
* fix gofmt
Signed-off-by: rahulii <r.sawra@gmail.com>
* add more test cases
Signed-off-by: rahulii <r.sawra@gmail.com>
* sort the slice for deterministic order in unit tests
Signed-off-by: rahulii <r.sawra@gmail.com>
* minor fix
Signed-off-by: rahulii <r.sawra@gmail.com>
* add more test cases
Signed-off-by: rahulii <r.sawra@gmail.com>
* uid in ownerref
Signed-off-by: rahulii <r.sawra@gmail.com>
* fix review comments from Chris
Signed-off-by: rahulii <r.sawra@gmail.com>
* add parallel policy as owner references
Signed-off-by: rahulii <r.sawra@gmail.com>
* fix e2e test
Signed-off-by: rahulii <r.sawra@gmail.com>
* remove sorting of eventpolicies
Signed-off-by: rahulii <r.sawra@gmail.com>
---------
Signed-off-by: rahulii <r.sawra@gmail.com>
* Improve scheduler memory usage
- Create a namespaced-scoped statefulset lister instead of being
cluster-wide
- Accept a PodLister rather than creating a cluster-wide one
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Update codegen
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
---------
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* feat: initial commit
Signed-off-by: Leo Li <leoli@redhat.com>
* feat: add the test for eventpolicy in sequence reconciler
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the typo and remove the unused helper function
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: trying to fix the git diff issue
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: trying to fix the git diff issue
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the nit minor comments
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: update the reconcilation mechanism
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the goimports and remove unused helper functions and input parameters
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: add more unit tests to test out remove steps from the sequence
Signed-off-by: Leo Li <leoli@redhat.com>
* Update pkg/reconciler/sequence/sequence.go
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
* Update pkg/reconciler/sequence/sequence.go
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
* Apply suggestions from code review
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
* fix: fix the nit review comments from pierdipi and rahul
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: using auth.GetEventPoliciesForResource when trying to list all Sequence's eventPolicy (not for the immediate channels)
Signed-off-by: Leo Li <leoli@redhat.com>
* feat: add the sorting to avoid flaky test when there are multiple eventplocies per sequence
Signed-off-by: Leo Li <leoli@redhat.com>
* feat: remove the nil condition for channel name when creating the sequence policy name
Signed-off-by: Leo Li <leoli@redhat.com>
* feat: add more unit tests
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: lint & goimports
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the review comments
* fix: fix Christoph's review comments
Signed-off-by: Leo Li <leoli@redhat.com>
* feat: adding a test for sequence with existing intermediate eventpolicies requiring update and cleanup.
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: the deepDerivative failed to compare the eventpolicy's From.Spec, change to reflect.DeepEqual
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: change back to use DeepDerivative
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the test case to make the eventpolicy has a valid spec
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: fix the flaky issue by soring the policies
Signed-off-by: Leo Li <leoli@redhat.com>
* fix: change input channel's ownerref to sequence's eventpolicy
---------
Signed-off-by: Leo Li <leoli@redhat.com>
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
* Enable AuthZ tests
* Refactor eventpolicy test rekt resource for easier usage
* Add authorization e2e test for Broker
* Fix style issues
* Don't pass test env namespace and use default
* Run OIDC and AuthZ e2e tests together
SLACK_MESSAGE:"This is a friendly reminder that the Knative Eventing Office Hours start in 1 hour. We hope to see you there! Please join the zoom meeting: https://zoom.us/j/92717482035?pwd=SnBiWnl6MXRvcUNFWHZ4Wkt5Z0FYZz09"
description:matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
type:object
x-kubernetes-preserve-unknown-fields:true
filters:
description:'Filters is an array of SubscriptionsAPIFilters that evaluate to true or false. If any filter expression in the array evaluates to false, the event will not continue pass the ingress of the target resources of the policy'
type:array
items:
type:object
properties:
all:
description:'All evaluates to true if all the nested expressions evaluate to true. It must contain at least one filter expression'
type:array
items:
type:object
x-kubernetes-preserve-unknown-fields:true
any:
description:'Any evaluates to true if any of the nested expressions evaluate to true. It must contain at least one filter expression'
type:array
items:
type:object
x-kubernetes-preserve-unknown-fields:true
cesql:
description:'CESQL is a CloudEvents SQL v1 expression that will evaluate to true or false for each CloudEvent.'
type:string
exact:
description:'Exact evaluates to true if the values of the matching CloudEvents attributes all exactly match with the associated value string specified (case sensitive)'
type:object
x-kubernetes-preserve-unknown-fields:true
not:
description:'Not evaluates to true if the nested expression evaluates to false.'
type:object
x-kubernetes-preserve-unknown-fields:true
prefix:
description:'Prefix evaluates to true if the values of the matching CloudEvents attributes all start with the associated value string specified (case sensitive)'
type:object
x-kubernetes-preserve-unknown-fields:true
suffix:
description:'Exact evaluates to true if the values of the matching CloudEvents attributes all end with the associated value string specified (case sensitive)'
type:object
x-kubernetes-preserve-unknown-fields:true
status:
description:Status represents the current state of the EventPolicy. This data may be out of date.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion:apiextensions.k8s.io/v1
kind:CustomResourceDefinition
metadata:
name:eventtransforms.eventing.knative.dev
labels:
knative.dev/crd-install:"true"
duck.knative.dev/addressable:"true"
app.kubernetes.io/version:devel
app.kubernetes.io/name:knative-eventing
spec:
group:eventing.knative.dev
versions:
- name:v1alpha1
served:true
storage:true
subresources:
status:{}
schema:
openAPIV3Schema:
type:object
properties:
spec:
description:Spec defines the desired state of the EventTransform.
type:object
properties:
jsonata:
type:object
properties:
expression:
description:Expression is the JSONata expression (https://jsonata.org/).
type:string
reply:
description:|
Reply is the configuration on how to handle responses from Sink. It can only be set if Sink is set.
Only one "type" can be used.
The used type must match the top-level transformation, if you need to mix transformation types, use compositions and chain transformations together to achieve your desired outcome.
type:object
properties:
jsonata:
type:object
properties:
expression:
description:Expression is the JSONata expression (https://jsonata.org/).
type:string
discard:
description:|
Discard discards responses from Sink and return empty response body.
When set to false, it returns the exact sink response body.
When set to true, Discard is mutually exclusive with EventTransformations in the reply
section, it can either be discarded or transformed.
Default:false.
type:boolean
sink:
description:'Sink is a reference to an object that will resolve to a uri to use as the sink. If not present, the transformation will send back the transformed event as response, this is useful to leverage the built-in Broker reply feature to re-publish a transformed event back to the broker. '
type:object
properties:
CACerts:
description:CACerts are Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468. If set, these CAs are appended to the set of CAs provided by the Addressable target, if any.
type:string
audience:
description:Audience is the OIDC audience. This need only be set, if the target is not an Addressable and thus the Audience can't be received from the Addressable itself. In case the Addressable specifies an Audience too, the Destinations Audience takes preference.
type:string
ref:
description:Ref points to an Addressable.
type:object
properties:
address:
description:Address points to a specific Address Name.
type:string
apiVersion:
description:API version of the referent.
type:string
group:
description: 'Group of the API, without the version of the group. This can be used as an alternative to the APIVersion, and then resolved using ResolveGroup. Note: This API is EXPERIMENTAL and might break anytime. For more details:https://github.com/knative/eventing/issues/5086'
type:string
kind:
description: 'Kind of the referent. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type:string
namespace:
description: 'Namespace of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.'
type:string
uri:
description:URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref.
type:string
status:
description:Status represents the current state of the EventTransform. This data may be out of date.
type:object
properties:
address:
description:Address is a single Addressable address. If Addresses is present, Address will be ignored by clients.
type:object
required:
- url
properties:
CACerts:
description:CACerts is the Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468.
type:string
audience:
description:Audience is the OIDC audience for this address.
type:string
name:
description:Name is the name of the address.
type:string
url:
type:string
addresses:
description:Addresses is a list of addresses for different protocols (HTTP and HTTPS) If Addresses is present, Address must be ignored by clients.
type:array
items:
type:object
required:
- url
properties:
CACerts:
description:CACerts is the Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468.
type:string
audience:
description:Audience is the OIDC audience for this address.
type:string
name:
description:Name is the name of the address.
type:string
url:
type:string
annotations:
description:Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type:object
x-kubernetes-preserve-unknown-fields:true
auth:
description:Auth defines the attributes that provide the generated service account name in the resource status.
type:object
required:
- serviceAccountName
properties:
serviceAccountName:
description:ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type:string
serviceAccountNames:
description:ServiceAccountNames is the list of names of the generated service accounts used for this components OIDC authentication. This list can have len() > 1, when the component uses multiple identities (e.g. in case of a Parallel).
type:array
items:
type:string
conditions:
description:Conditions the latest available observations of a resource's current state.
type:array
items:
type:object
required:
- type
- status
properties:
lastTransitionTime:
description:LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant).
type:string
message:
description:A human readable message indicating details about the transition.
type:string
reason:
description:The reason for the condition's last transition.
type:string
severity:
description:Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error.
type:string
status:
description:Status of the condition, one of True, False, Unknown.
type:string
type:
description:Type of condition.
type:string
jsonata:
description:JsonataTransformationStatus is the status associated with JsonataEventTransformationSpec.
type:object
properties:
deployment:
type:object
properties:
availableReplicas:
description:Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
type:integer
format:int32
collisionCount:
description:Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.
type:integer
format:int32
conditions:
description:Represents the latest available observations of a deployment's current state.
type:array
items:
type:object
properties:
lastTransitionTime:
description:Last time the condition transitioned from one status to another.
type:string
lastUpdateTime:
description:The last time this condition was updated.
type:string
message:
description:A human readable message indicating details about the transition.
type:string
reason:
description:The reason for the condition's last transition.
type:string
status:
description:Status of the condition, one of True, False, Unknown.
type:string
type:
description:Type of deployment condition.
type:string
observedGeneration:
description:The generation observed by the deployment controller.
type:integer
format:int64
readyReplicas:
description:readyReplicas is the number of pods targeted by this Deployment with a Ready Condition.
type:integer
format:int32
replicas:
description:Total number of non-terminated pods targeted by this deployment (their labels match the selector).
type:integer
format:int32
unavailableReplicas:
description:Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.
type:integer
format:int32
updatedReplicas:
description:Total number of non-terminated pods targeted by this deployment that have the desired template spec.
type:integer
format:int32
observedGeneration:
description:ObservedGeneration is the 'Generation' of the Service that was last processed by the controller.
type:integer
format:int64
sinkAudience:
description:SinkAudience is the OIDC audience of the sink.
type:string
sinkCACerts:
description:SinkCACerts are Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468.
type:string
sinkUri:
description:SinkURI is the current active sink URI that has been configured for the Source.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion:apiextensions.k8s.io/v1
kind:CustomResourceDefinition
metadata:
name:integrationsinks.sinks.knative.dev
labels:
knative.dev/crd-install:"true"
duck.knative.dev/addressable:"true"
app.kubernetes.io/version:devel
app.kubernetes.io/name:knative-eventing
spec:
group:sinks.knative.dev
versions:
- name:v1alpha1
served:true
storage:true
subresources:
status:{}
schema:
openAPIV3Schema:
description:'IntegrationSink sends events to generic event sink'
type:object
properties:
spec:
description:Spec defines the desired state of the IntegrationSink.
type:object
properties:
log:
type:object
properties:
loggerName:
type:string
title:Logger Name
description:Name of the logging category to use
default:log-sink
level:
type:string
title:Log Level
description:Logging level to use
default:INFO
logMask:
type:boolean
title:Log Mask
description:Mask sensitive information like password or passphrase in the
log
default:false
marker:
type:string
title:Marker
description:An optional Marker name to use
multiline:
type:boolean
title:Multiline
description:If enabled then each information is outputted on a newline
default:false
showAllProperties:
type:boolean
title:Show All Properties
description:Show all of the exchange properties (both internal and custom)
default:false
showBody:
type:boolean
title:Show Body
description:Show the message body
default:true
showBodyType:
type:boolean
title:Show Body Type
description:Show the body Java type
default:true
showExchangePattern:
type:boolean
title:Show Exchange Pattern
description:Shows the Message Exchange Pattern (or MEP for short)
default:true
showHeaders:
type:boolean
title:Show Headers
description:Show the headers received
default:false
showProperties:
type:boolean
title:Show Properties
description:Show the exchange properties (only custom). Use showAllProperties
to show both internal and custom properties.
default:false
showStreams:
type:boolean
title:Show Streams
description:Show the stream bodies (they may not be available in following
steps)
default:false
showCachedStreams:
type:boolean
title:Show Cached Streams
description:Whether Camel should show cached stream bodies or not.
default:true
aws:
type:object
properties:
s3:
type:object
properties:
arn:
type:string
title:Bucket Name
description:The S3 Bucket name or Amazon Resource Name (ARN).
deleteAfterRead:
type:boolean
title:Auto-delete Objects
description:Specifies to delete objects after consuming them.
default:true
moveAfterRead:
type:boolean
title:Move Objects After Delete
description:Move objects from S3 bucket to a different bucket after
they have been retrieved.
default:false
destinationBucket:
type:string
title:Destination Bucket
description:Define the destination bucket where an object must be moved
when moveAfterRead is set to true.
destinationBucketPrefix:
type:string
title:Destination Bucket Prefix
description:Define the destination bucket prefix to use when an object
must be moved, and moveAfterRead is set to true.
destinationBucketSuffix:
type:string
title:Destination Bucket Suffix
description:Define the destination bucket suffix to use when an object
must be moved, and moveAfterRead is set to true.
region:
type:string
title:AWS Region
description:The AWS region to access.
autoCreateBucket:
type:boolean
title:Autocreate Bucket
description:Specifies to automatically create the S3 bucket.
default:false
prefix:
type:string
title:Prefix
description:The AWS S3 bucket prefix to consider while searching.
example:folder/
ignoreBody:
type:boolean
title:Ignore Body
description:If true, the S3 Object body is ignored. Setting this to
trueoverrides any behavior defined by the `includeBody` option. If
false,the S3 object is put in the body.
default:false
uriEndpointOverride:
type:string
title:Overwrite Endpoint URI
description:The overriding endpoint URI. To use this option, you must
also select the `overrideEndpoint` option.
overrideEndpoint:
type:boolean
title:Endpoint Overwrite
description:Select this option to override the endpoint URI. To use
this option, you must also provide a URI for the `uriEndpointOverride`
option.
default:false
forcePathStyle:
type:boolean
title:Force Path Style
description:Forces path style when accessing AWS S3 buckets.
default:false
delay:
type:integer
title:Delay
description:The number of milliseconds before the next poll of the
selected bucket.
default:500
maxMessagesPerPoll:
type:integer
title:Max Messages Per Poll
description:Gets the maximum number of messages as a limit to poll
at each polling. Gets the maximum number of messages as a limit to
poll at each polling. The default value is 10. Use 0 or a negative
number to set it as unlimited.
default:10
sqs:
type:object
properties:
arn:
type:string
title:Queue Name
description:The SQS Queue Name or ARN
deleteAfterRead:
type:boolean
title:Auto-delete Messages
description:Delete messages after consuming them
default:true
region:
type:string
title:AWS Region
description:The AWS region to access.
autoCreateQueue:
type:boolean
title:Autocreate Queue
description:Setting the autocreation of the SQS queue.
default:false
host:
type:string
title:AWS Host
description:The hostname of the Amazon AWS cloud.
default:amazonaws.com
protocol:
type:string
title:Protocol
description:The underlying protocol used to communicate with SQS
default:https
example:http or https
queueURL:
type:string
title:Queue URL
description:The full SQS Queue URL (required if using KEDA)
uriEndpointOverride:
type:string
title:Overwrite Endpoint URI
description:The overriding endpoint URI. To use this option, you must
also select the `overrideEndpoint` option.
overrideEndpoint:
type:boolean
title:Endpoint Overwrite
description:Select this option to override the endpoint URI. To use
this option, you must also provide a URI for the `uriEndpointOverride`
option.
default:false
delay:
type:integer
title:Delay
description:The number of milliseconds before the next poll of the
selected stream
default:500
greedy:
type:boolean
title:Greedy Scheduler
description:If greedy is enabled, then the polling will happen immediately
again, if the previous run polled 1 or more messages.
default:false
maxMessagesPerPoll:
type:integer
title:Max Messages Per Poll
description:The maximum number of messages to return. Amazon SQS never
returns more messages than this value (however, fewer messages might
be returned). Valid values 1 to 10. Default 1.
default:1
waitTimeSeconds:
type:integer
title:Wait Time Seconds
description:The duration (in seconds) for which the call waits for
a message to arrive in the queue before returning. If a message is
available, the call returns sooner than WaitTimeSeconds. If no messages
are available and the wait time expires, the call does not return
a message list.
visibilityTimeout:
type:integer
title:Visibility Timeout
description:The duration (in seconds) that the received messages are
hidden from subsequent retrieve requests after being retrieved by
a ReceiveMessage request.
sns:
type:object
properties:
arn:
type:string
title:Topic Name
description:The SNS topic name name or Amazon Resource Name (ARN).
region:
type:string
title:AWS Region
description:The AWS region to access.
autoCreateTopic:
type:boolean
title:Autocreate Topic
description:Setting the autocreation of the SNS topic.
default:false
uriEndpointOverride:
type:string
title:Overwrite Endpoint URI
description:The overriding endpoint URI. To use this option, you must
also select the `overrideEndpoint` option.
overrideEndpoint:
type:boolean
title:Endpoint Overwrite
description:Select this option to override the endpoint URI. To use
this option, you must also provide a URI for the `uriEndpointOverride`
option.
default:false
auth:
description:'Auth configurations'
type:object
properties:
secret:
description:'Auth secret'
type:object
properties:
ref:
description:|
Secret reference.
type:object
required:
- name
properties:
name:
description:'Secret name'
type:string
status:
description:Status represents the current state of the IntegrationSink. This data may be out of date.
type:object
properties:
address:
description:IntegrationSink is Addressable. It exposes the endpoints as URIs to get events delivered into the used Kamelet.
type:object
properties:
name:
type:string
url:
type:string
CACerts:
type:string
audience:
type:string
addresses:
description:IntegrationSink is Addressable. It exposes the endpoints as URIs to get events delivered into the used Kamelet.
type:array
items:
type:object
properties:
name:
type:string
url:
type:string
CACerts:
type:string
audience:
type:string
annotations:
description:Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type:object
x-kubernetes-preserve-unknown-fields:true
policies:
description:List of applied EventPolicies
type:array
items:
type:object
properties:
apiVersion:
description:The API version of the applied EventPolicy. This indicates, which version of EventPolicy is supported by the resource.
type:string
name:
description:The name of the applied EventPolicy
type:string
conditions:
description:Conditions the latest available observations of a resource's current state.
type:array
items:
type:object
required:
- type
- status
properties:
lastTransitionTime:
description:'LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant).'
type:string
message:
description:'A human readable message indicating details about the transition.'
type:string
reason:
description:'The reason for the condition''s last transition.'
type:string
severity:
description:'Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error.'
type:string
status:
description:'Status of the condition, one of True, False, Unknown.'
type:string
type:
description:'Type of condition.'
type:string
observedGeneration:
description:ObservedGeneration is the 'Generation' of the Service that was last processed by the controller.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion:apiextensions.k8s.io/v1
kind:CustomResourceDefinition
metadata:
labels:
eventing.knative.dev/source:"true"
duck.knative.dev/source:"true"
knative.dev/crd-install:"true"
app.kubernetes.io/version:devel
app.kubernetes.io/name:knative-eventing
name:integrationsources.sources.knative.dev
spec:
group:sources.knative.dev
versions:
- name:v1alpha1
served:true
storage:true
subresources:
status:{}
schema:
openAPIV3Schema:
description:'IntegrationSource is an event source that starts a container image which generates events under certain situations and sends messages to a sink URI'
type:object
properties:
spec:
type:object
properties:
ceOverrides:
description:CloudEventOverrides defines overrides to control the output format and modifications of the event sent to the sink.
type:object
properties:
extensions:
description:Extensions specify what attribute are added or overridden on the outbound event. Each `Extensions` key-value pair are set on the event as an attribute extension independently.
type:object
x-kubernetes-preserve-unknown-fields:true
sink:
description:Sink is a reference to an object that will resolve to a uri to use as the sink.
type:object
properties:
ref:
description:Ref points to an Addressable.
type:object
properties:
apiVersion:
description:API version of the referent.
type:string
kind:
description: 'Kind of the referent. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type:string
namespace:
description: 'Namespace of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.'
type:string
uri:
description:URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref.
type:string
CACerts:
description:CACerts is the Certification Authority (CA) certificates in PEM format that the source trusts when sending events to the sink.
type:string
audience:
description:Audience is the OIDC audience. This only needs to be set if the target is not an Addressable and thus the Audience can't be received from the target itself. If specified, it takes precedence over the target's Audience.
type:string
timer:
type:object
properties:
period:
type:integer
title:Period
description:The interval (in milliseconds) to wait between producing the
next message.
default:1000
message:
type:string
title:Message
description:The message to generate.
example:hello world
contentType:
type:string
title:Content Type
description:The content type of the generated message.
default:text/plain
repeatCount:
type:integer
title:Repeat Count
description:Specifies a maximum limit of number of fires
aws:
type:object
properties:
s3:
type:object
properties:
arn:
type:string
title:Bucket Name
description:The S3 Bucket name or Amazon Resource Name (ARN).
deleteAfterRead:
type:boolean
title:Auto-delete Objects
description:Specifies to delete objects after consuming them.
default:true
moveAfterRead:
type:boolean
title:Move Objects After Delete
description:Move objects from S3 bucket to a different bucket after
they have been retrieved.
default:false
destinationBucket:
type:string
title:Destination Bucket
description:Define the destination bucket where an object must be moved
when moveAfterRead is set to true.
destinationBucketPrefix:
type:string
title:Destination Bucket Prefix
description:Define the destination bucket prefix to use when an object
must be moved, and moveAfterRead is set to true.
destinationBucketSuffix:
type:string
title:Destination Bucket Suffix
description:Define the destination bucket suffix to use when an object
must be moved, and moveAfterRead is set to true.
region:
type:string
title:AWS Region
description:The AWS region to access.
autoCreateBucket:
type:boolean
title:Autocreate Bucket
description:Specifies to automatically create the S3 bucket.
default:false
prefix:
type:string
title:Prefix
description:The AWS S3 bucket prefix to consider while searching.
example:folder/
ignoreBody:
type:boolean
title:Ignore Body
description:If true, the S3 Object body is ignored. Setting this to
trueoverrides any behavior defined by the `includeBody` option. If
false,the S3 object is put in the body.
default:false
uriEndpointOverride:
type:string
title:Overwrite Endpoint URI
description:The overriding endpoint URI. To use this option, you must
also select the `overrideEndpoint` option.
overrideEndpoint:
type:boolean
title:Endpoint Overwrite
description:Select this option to override the endpoint URI. To use
this option, you must also provide a URI for the `uriEndpointOverride`
option.
default:false
forcePathStyle:
type:boolean
title:Force Path Style
description:Forces path style when accessing AWS S3 buckets.
default:false
delay:
type:integer
title:Delay
description:The number of milliseconds before the next poll of the
selected bucket.
default:500
maxMessagesPerPoll:
type:integer
title:Max Messages Per Poll
description:Gets the maximum number of messages as a limit to poll
at each polling. Gets the maximum number of messages as a limit to
poll at each polling. The default value is 10. Use 0 or a negative
number to set it as unlimited.
default:10
sqs:
type:object
properties:
arn:
type:string
title:Queue Name
description:The SQS Queue Name or ARN
deleteAfterRead:
type:boolean
title:Auto-delete Messages
description:Delete messages after consuming them
default:true
region:
type:string
title:AWS Region
description:The AWS region to access.
autoCreateQueue:
type:boolean
title:Autocreate Queue
description:Setting the autocreation of the SQS queue.
default:false
host:
type:string
title:AWS Host
description:The hostname of the Amazon AWS cloud.
default:amazonaws.com
protocol:
type:string
title:Protocol
description:The underlying protocol used to communicate with SQS
default:https
example:http or https
queueURL:
type:string
title:Queue URL
description:The full SQS Queue URL (required if using KEDA)
uriEndpointOverride:
type:string
title:Overwrite Endpoint URI
description:The overriding endpoint URI. To use this option, you must
also select the `overrideEndpoint` option.
overrideEndpoint:
type:boolean
title:Endpoint Overwrite
description:Select this option to override the endpoint URI. To use
this option, you must also provide a URI for the `uriEndpointOverride`
option.
default:false
delay:
type:integer
title:Delay
description:The number of milliseconds before the next poll of the
selected stream
default:500
greedy:
type:boolean
title:Greedy Scheduler
description:If greedy is enabled, then the polling will happen immediately
again, if the previous run polled 1 or more messages.
default:false
maxMessagesPerPoll:
type:integer
title:Max Messages Per Poll
description:The maximum number of messages to return. Amazon SQS never
returns more messages than this value (however, fewer messages might
be returned). Valid values 1 to 10. Default 1.
default:1
waitTimeSeconds:
type:integer
title:Wait Time Seconds
description:The duration (in seconds) for which the call waits for
a message to arrive in the queue before returning. If a message is
available, the call returns sooner than WaitTimeSeconds. If no messages
are available and the wait time expires, the call does not return
a message list.
visibilityTimeout:
type:integer
title:Visibility Timeout
description:The duration (in seconds) that the received messages are
hidden from subsequent retrieve requests after being retrieved by
a ReceiveMessage request.
ddbStreams:
type:object
properties:
table:
type:string
title:Table
description:The name of the DynamoDB table.
region:
type:string
title:AWS Region
description:The AWS region to access.
streamIteratorType:
type:string
title:Stream Iterator Type
description:Defines where in the DynamoDB stream to start getting records.
There are two enums and the value can be one of FROM_LATEST and FROM_START.
Note that using FROM_START can cause a significant delay before the stream
has caught up to real-time.
default:FROM_LATEST
uriEndpointOverride:
type:string
title:Overwrite Endpoint URI
description:The overriding endpoint URI. To use this option, you must
also select the `overrideEndpoint` option.
overrideEndpoint:
type:boolean
title:Endpoint Overwrite
description:Select this option to override the endpoint URI. To use
this option, you must also provide a URI for the `uriEndpointOverride`
option.
default:false
delay:
type:integer
title:Delay
description:The number of milliseconds before the next poll from the
database.
default:500
auth:
description:'Auth configurations'
type:object
properties:
secret:
description:'Auth secret'
type:object
properties:
ref:
description:|
Secret reference.
type:object
required:
- name
properties:
name:
description:'Secret name'
type:string
template:
type:object
x-kubernetes-preserve-unknown-fields:true
description: 'A template in the shape of `Deployment.spec.template` to be used for this ContainerSource. More info:https://kubernetes.io/docs/concepts/workloads/controllers/deployment/'
status:
type:object
properties:
annotations:
description:Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type:object
x-kubernetes-preserve-unknown-fields:true
auth:
description:Auth provides the relevant information for OIDC authentication.
type:object
properties:
serviceAccountName:
description:ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type:string
serviceAccountNames:
description:ServiceAccountNames is the list of names of the generated service accounts used for this components OIDC authentication.
type:array
items:
type:string
ceAttributes:
description:CloudEventAttributes are the specific attributes that the Source uses as part of its CloudEvents.
type:array
items:
type:object
properties:
source:
description:Source is the CloudEvents source attribute.
type:string
type:
description:Type refers to the CloudEvent type attribute.
type:string
conditions:
description:Conditions the latest available observations of a resource's current state.
type:array
items:
type:object
required:
- type
- status
properties:
lastTransitionTime:
description:LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant).
type:string
message:
description:A human readable message indicating details about the transition.
type:string
reason:
description:The reason for the condition's last transition.
type:string
severity:
description:Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error.
type:string
status:
description:Status of the condition, one of True, False, Unknown.
type:string
type:
description:Type of condition.
type:string
observedGeneration:
description:ObservedGeneration is the 'Generation' of the Service that was last processed by the controller.
type:integer
format:int64
sinkUri:
description:SinkURI is the current active sink URI that has been configured for the Source.
type:string
sinkCACerts:
description:CACerts is the Certification Authority (CA) certificates in PEM format that the source trusts when sending events to the sink.
type:string
sinkAudience:
description:Audience is the OIDC audience of the sink.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion:apiextensions.k8s.io/v1
kind:CustomResourceDefinition
metadata:
name:requestreplies.eventing.knative.dev
labels:
knative.dev/crd-install:"true"
app.kubernetes.io/version:devel
app.kubernetes.io/name:knative-eventing
spec:
group:eventing.knative.dev
versions:
- name:v1alpha1
served:true
storage:true
subresources:
status:{}
schema:
openAPIV3Schema:
type:object
properties:
spec:
description:Spec defines the desired state of the RequestReply.
type:object
properties:
brokerRef:
description:A KReference referring to the broker this RequestReply forwards events to. CrossNamespace references are not allowed.
type:object
properties:
apiVersion:
description:API Version of the broker.
type:string
kind:
description: 'Kind of the broker. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type:string
name:
description: 'Name of the broker. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type:string
correlationAttribute:
description:The name of the cloudevent attribute where the correlation id will be set on new events.
type:string
replyAttribute:
description:The name of the cloudevents attribute which will hold the correlation id for an event which will be treated as a reply.
type:string
secrets:
description:A list of the names of one or more secrets used to sign the correlation ids and reply ids. The secrets must be in the same namespace as the requestreply resource.
type:array
items:
type:string
timeout:
description:A ISO8601 string representing how long RequestReply holds onto an incoming request before it times out without a reply.
type:string
delivery:
description:Delivery contains the delivery spec for each trigger to this Broker. Each trigger delivery spec, if any, overrides this global delivery spec.
type:object
properties:
backoffDelay:
description: 'BackoffDelay is the delay before retrying. More information on Duration format:- https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*<numberOfRetries>. For exponential policy, backoff delay is backoffDelay*2^<numberOfRetries>.'
type:string
backoffPolicy:
description:BackoffPolicy is the retry backoff policy (linear, exponential).
type:string
deadLetterSink:
description:DeadLetterSink is the sink receiving event that could not be sent to a destination.
type:object
properties:
ref:
description:Ref points to an Addressable.
type:object
properties:
apiVersion:
description:API version of the referent.
type:string
kind:
description: 'Kind of the referent. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type:string
namespace:
description: 'Namespace of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.'
type:string
uri:
description:URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref.
type:string
CACerts:
description:Certification Authority (CA) certificates in PEM format that the source trusts when sending events to the sink.
type:string
audience:
description:Audience is the OIDC audience. This only needs to be set if the target is not an Addressable and thus the Audience can't be received from the target itself. If specified, it takes precedence over the target's Audience.
type:string
retry:
description:Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink.
type:integer
format:int32
x-kubernetes-preserve-unknown-fields:true# This is necessary to enable the experimental feature delivery-timeout
status:
description:Status represents the current state of the RequestReply. This data may be out of date.
type:object
properties:
annotations:
description:Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type:object
x-kubernetes-preserve-unknown-fields:true
conditions:
description:Conditions the latest available observations of a resource's current state.
type:array
items:
type:object
required:
- type
- status
properties:
lastTransitionTime:
description:LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant).
type:string
message:
description:A human readable message indicating details about the transition.
type:string
reason:
description:The reason for the condition's last transition.
type:string
severity:
description:Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error.
type:string
status:
description:Status of the condition, one of True, False, Unknown.
type:string
type:
description:Type of condition.
type:string
address:
description:RequestReply is Addressable. It exposes the endpoint as an URI to get events delivered.
type:object
properties:
name:
type:string
url:
type:string
CACerts:
type:string
audience:
type:string
addresses:
description:RequestReply is Addressable. It exposes the endpoints as URIs to get events delivered.
type:array
items:
type:object
properties:
name:
type:string
url:
type:string
CACerts:
type:string
audience:
type:string
policies:
description:List of applied EventPolicies
type:array
items:
type:object
properties:
apiVersion:
description:The API version of the applied EventPolicy. This indicates whichversion of EventPolicy is supported by the resource.
type:string
name:
description:The name of the applied EventPolicy
type:string
observedGeneration:
description:ObservedGeneration is the 'Generation' of the Service that was last processed by the controller.
description:Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink.
type:integer
format:int32
format:
description:Format is the format used to serialize the event into a http request when delivering the event. It can be json (for structured events), binary (for binary events), or unset.
type:string
filter:
description:'Filter is the filter to apply against all events from the Broker. Only events that pass this filter will be sent to the Subscriber. If not specified, will default to allowing all events.'
@ -14,7 +14,7 @@ In the following the control plane components and their responsibilities are des
The `mt-broker-controller` is kind of the heart of the MTChannelBasedBroker control plane and has the following responsibilities:
* Watches for new `Broker` resources with the `eventing.kantive.dev/broker.class: MTChannelBasedBroker` annotation (step 2 in the diagram) and creates a new _concrete_ channel resource (step 3 in the diagram) depending on the `channel-template-spec` from the configmap referenced in the `config-br-defaults` configmap (by default this points to `config-br-default-channel`).
* Watches for new `Broker` resources with the `eventing.knative.dev/broker.class: MTChannelBasedBroker` annotation (step 2 in the diagram) and creates a new _concrete_ channel resource (step 3 in the diagram) depending on the `channel-template-spec` from the configmap referenced in the `config-br-defaults` configmap (by default this points to `config-br-default-channel`).
Be aware that in case the default `brokerClass` in `config-br-defaults` is not set to `MTChannelBasedBroker`, the referenced configmap still must contain a `channel-template-spec`. Otherwise the user needs to define the corresponding config on the broker resource directly when using the `MTChannelBasedBroker` broker class, e.g.:
echo"Error: Found 'knative-nightly' in $file, is eventing-integrations for this major and minor '${TAG}' version already released? https://github.com/knative-extensions/eventing-integrations/releases"
cat "${file}"
return1
fi
done
echo"No 'knative-nightly' occurrences found."
}
function build_release(){
if(( PUBLISH_TO_GITHUB ));then
# For official releases, update eventing-integrations ConfigMaps and stop the release if a nightly image is found
//Deprecated: Use the config in BrokerClasses instead
*BrokerConfig`json:",inline"`
// Optional: BrokerClasses are the default broker classes' config. The key is the broker class name, and the value is the config for that broker class.
// If the brokerClassName is the default broker class for the namespace, return the BrokerConfig
returnnsConfig.BrokerConfig,nil
}
}
}else{
// if the brokerClassName is not the default broker class for the namespace, check whether nsconfig's brokerClasses map has the config for this broker class
return"",errors.New("Defaults for Broker Configurations have not been set up.")
// If neither namespace specific nor cluster default broker class is found
return"",fmt.Errorf("Neither namespace specific nor cluster default broker class is found for namespace %q, please set them via ConfigMap config-br-defaults",ns)
// If there is no cluster level configuration or DisallowDifferentNamespaceConfig in cluster level is false, allow different namespace
returnapis.AllowDifferentNamespace(ctx)
}
}
// If we reach here, it means DisallowDifferentNamespaceConfig is true at either level, no need to explicitly disallow, just return the original context
returnapis.ErrInvalidValue("type LIKE id","cesql","parse error: syntax error: |failed to parse LIKE expression: the pattern was not a string literal").
transformJsonataConditionSet.Manage(ts).MarkUnknown(TransformationJsonataDeploymentReady,TransformationJsonataCertificateNotReady,"Certificate is progressing")
returnfalse
}
iftopLevel.Status==cmmeta.ConditionUnknown{
transformJsonataConditionSet.Manage(ts).MarkUnknown(TransformationJsonataDeploymentReady,TransformationJsonataCertificateNotReady,"Certificate is progressing, "+topLevel.Reason+" Message: "+topLevel.Message)
returnfalse
}
iftopLevel.Status==cmmeta.ConditionFalse{
transformJsonataConditionSet.Manage(ts).MarkFalse(TransformationJsonataDeploymentReady,TransformationJsonataCertificateNotReady,"Certificate is not ready, "+topLevel.Reason+" Message: "+topLevel.Message)
constsuggestion="Suggestion: create a new transformation, migrate services to the new one, and delete this transformation."
ifets.Jsonata!=nil&&original.Jsonata==nil{
errs=apis.ErrGeneric("Transformations types are immutable, jsonata transformation cannot be changed to a different transformation type. "+suggestion).ViaField("jsonata")
}elseiforiginal.Jsonata!=nil&&ets.Jsonata==nil{
errs=apis.ErrGeneric("Transformations types are immutable, transformation type cannot be changed to a jsonata transformation. "+suggestion).ViaField("jsonata")
apis.ErrGeneric("Transformations types are immutable, jsonata transformation cannot be changed to a different transformation type. Suggestion: create a new transformation, migrate services to the new one, and delete this transformation.").
ViaField("jsonata"),
).
ViaField("spec"),
},
{
name:"transform jsonata change reply transformation type, have -> not have",
errs=errs.Also(apis.ErrInvalidValue(rrs.Secrets,"secrets","one or more secrets must be provided"))
}
ifrrs.CorrelationAttribute==""||
rrs.CorrelationAttribute=="id"||
rrs.CorrelationAttribute=="course"||
rrs.CorrelationAttribute=="specversion"||
rrs.CorrelationAttribute=="type"{
errs=errs.Also(apis.ErrInvalidValue(rrs.CorrelationAttribute,"correlationattribute","correlationattribute must be non-empty and cannot be a core cloudevent attribute (id, type, specversion, source)"))
}
ifrrs.ReplyAttribute==""||
rrs.ReplyAttribute=="id"||
rrs.ReplyAttribute=="course"||
rrs.ReplyAttribute=="specversion"||
rrs.ReplyAttribute=="type"{
errs=errs.Also(apis.ErrInvalidValue(rrs.ReplyAttribute,"replyattribute","replyattribute must be non-empty and cannot be a core cloudevent attribute (id, type, specversion, source)"))