Commit Graph

20 Commits

Author SHA1 Message Date
Ben Moss dd15eb0998
URIResolver verifies that services actually exist (#2149) 2021-06-11 01:23:43 -07:00
Mona Borham 37b289bab1
Allow URIs to be resolved without reconciler context (#2095) 2021-05-10 05:35:59 -07:00
Matt Moore 2bc79285d2
Use the network.GetServiceHostname helper (#1844) 2020-10-26 09:55:41 -07:00
Zbynek Roubalik 2d4efecc6b
bump to k8s 1.18 (#1428)
* bump to k8s 1.18.8

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* plumbing ctx through

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* add more ctx plumbing

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* ctx WithCancel()

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-09-11 07:54:00 -07:00
Lukas Berk 34829c0aee
Alter URIFromObjectReference to return apierrs (#1688)
* Return an apimachinery error if psbinding subject WithContext fails

In the event a subject's `WithContext()` call fails, then
ReconcileSubject fails without catching the proper
error (sinkbinding's WithContext returns its own custom errors).  This
can manifest itself in instances where the sinkbinding subject has
been deleted before the sinkbinding itself, and leaves the reconcile
deletion loop stuck before the finalizer can be removed.  Leaving the
sinkbinding itself stuck, despite the subject already being deleted.

* Alter URIFromObjectReference to return apierrs

This allows for reconcile deletion to properly remove finalizer and
delete sinkbinding

* Update Tests

* Drop unneeded Sprintf
2020-09-09 10:25:50 -07:00
Victor Agababov 5ba6c1d101
Change %v to %w in errors and other nits (#1252)
* Change %v to %w in errors and other nits
Other are things I noticed when fixing the main %v->%w conversion

* fold
2020-04-27 15:04:51 -07:00
Markus Thömmes 689dff7dc0
Replace deprecated 'Track' with 'TrackReference'. (#1198) 2020-04-06 08:15:19 -07:00
Ville Aikas 95163c65ac
Rename KnativeReference to KReference (#1039) 2020-02-03 12:58:30 -08:00
Ville Aikas 99abcc2ff5
add SetDefaults from parent (using context), change Destination to us… (#1031)
* add SetDefaults from parent (using context), change Destination to use KnativeReference

* address pr comments, change address resolver to use kref
2020-02-01 11:59:29 -08:00
Victor Agababov 8eb13fa842 Some cleanups in the URI tests (#914)
As referenced in the previous PRs

/assign @vaikas mattmoor
2019-11-28 13:42:22 -08:00
Ville Aikas cac31abb7f Change URIFromDestinationV1 to return apis.URL instead of string (#909) 2019-11-27 13:13:22 -08:00
Ville Aikas 9a81fcece3 Resolvev1destination (#905)
* support v1.Destination

* rebase

* remove leftover crud from rebase

* address pr feedback

* moar feedback from pr
2019-11-26 14:00:21 -08:00
Matt Moore 43ca049cdb Reduce the boilerplate for setting up duck.InformerFactory's. (#896)
This augments the injection codegen with the capability to produce a duck.InformerFactory
attached to context for each type that we process.

Now a `duck.InformerFactory` for "Addressable" can be produced by "Get"ing it from the context.

This is triggered by placing `// +genduck` on the type that implements `duck.Implementable`.
2019-11-25 09:57:10 -08:00
Matt Moore 285df36be4 Move Destination under knative.dev/pkg/apis/duck/v1. (#851)
Destination sits in a strange versioned directory without a group under APIs.  Destination is in fact part of our duck type space, so it belongs under the `duck` group.  This moves the definition (previously v1alpha1) to `v1` because it is referenced from source types that have been designated `v1`.
2019-11-06 15:59:02 -08:00
mattmoor-sockpuppet 7dc1697d41 golang format tools (#804)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-10-25 07:08:35 -07:00
capri-xiyue a9458a30c0 add DeprecatedObjectReference in Destination to support backwards compatibility (#790)
* added DeprecatedObjectReference as a field in Destination to support backwards compatible

* updated code-gen

* added four deprecated fields
2019-10-24 12:55:34 -07:00
capri-xiyue 5dcae770a9 change Destination api and addressable resolver, fixed unit tests and… (#774)
* change Destination api and addressable resolver, fixed unit tests and added more unit tests

* make validateDestination visible

* rename error msg, added comments, added unit tests

* reformat error msg and change positive case order

* modified error msg when ref is not valid

* fixed typo
2019-10-21 14:42:25 -07:00
Markus Thömmes b55b842259 Adjust tracker to take structured keys as well. (#706)
* Use structured keys in the tracker.

* Adjust the addressable resolver too.
2019-09-20 09:44:06 -07:00
Spencer Peterson 2e33eeae84 Test for and fix URIResolver being idempotent (#606)
* write test for modify original

* test idempotency in an easier way

* and fix the bug
2019-08-27 10:43:39 -07:00
Spencer Peterson 39a29cf1bf Resolver package for resolving addressables to URI (#578)
* addressable resolver and tests

* lint

* update deps

* fix dependency loop

* rebrand package

* 2019 copyright

* note that k8s services are not verified

* rebrand to URIResolver

* correct fmt for error type

* upstream cluster domain resolution

* eliminate eventing import

* fix issues

* errorf -> errors new

* document newuriresolver

* break up returning paths

* move cluster domain name resolution to pkg/network
2019-08-23 15:15:14 -07:00