* 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>
# 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.
@ -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
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)"))
Message:"Channel.Spec.Subscribers changed by user test-user which was not the system:serviceaccount:knative-eventing:eventing-controller service account",
Message:fmt.Sprintf("%s:%s:%s","Channel.Spec.Subscribers changed by user test-user which was not the system:serviceaccount",system.Namespace(),"eventing-controller service account"),