Skip to content

Commit

Permalink
Get referenced obj using dynamic GVK API Rebased (#9)
Browse files Browse the repository at this point in the history
* Get referenced obj using dynamic GVK API

Signed-off-by: Nitish Malhotra <[email protected]>

* use normal Error

* feat: implement AddressableType

fix: rebase master

* feat: switch Url for Uri in Destination with custom Option serde impl

The spec allows for sink parameters to specify both a ref and a uri. In
that case, the uri must be a path that is set on the resolved ref url.
Only if no ref is specified must the uri be an absolute url.

This makes the url type too strict for this field since url must always
be absolute.

* fix: handle kref group contained in apiVersion

* feat: custom schema for uri to handle nullable

* fix: wrong field name for AddressableStatus

* feat: addressable_type tests with mock k8s config and objects

* refactor: remove DiscoveryError, keeping only top-level Error

Some small clippy lint fixes as well

* refactor: Addressable url no longer Cow

* refactor: make AddressableTypeExt trait for transformations

* refactor: lowercase addressableerr strings

* feat: build_service_url

Use a shared fn build_service_url for both DynamicObject and Service
types when getting the url via AddressableTypeExt.

* refactor: remove error variant, rename try_get_address -> address

* fix: uri should extend kreference url, not overwrite a potential path

* fix(knative): remove unused error

---------

Signed-off-by: Nitish Malhotra <[email protected]>
Co-authored-by: Nitish Malhotra <[email protected]>
  • Loading branch information
rusty-jules and nitishm authored Feb 12, 2024
1 parent f345af0 commit d666f7f
Show file tree
Hide file tree
Showing 11 changed files with 773 additions and 35 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
target
# for build pkg_config_path on nix
.env
Loading

0 comments on commit d666f7f

Please sign in to comment.