-
Notifications
You must be signed in to change notification settings - Fork 1.3k
refactor(policy): Use gateway API bindings from the official gateway-api crate #13643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
8a98113
build(deps): bump linkerd/dev from v44 to v45
olix0r 5229b3c
wip: update kube and hyper
olix0r 347be22
build(deps): bump hyper from 0.3 to 1.0
olix0r b059d62
chore: bump kubert v0.23.0-alpha6
olix0r 69f3406
Merge branch 'main' into ver/kube-alpha
olix0r 9982985
Merge branch 'main' into ver/kube-alpha
olix0r 668a0e2
WIP
adleong 1099bde
policy-controller compiles
adleong e3d2641
Merge branch 'main' into ver/kube-alpha
olix0r 36e4eab
Prep for gateway api binding upgrade
adleong 276c48a
Revert unintended http version bump
adleong 2a1c7b2
Revert unintended http version bump
adleong abf2245
update policy-test
adleong 198790d
Merge branch 'main' into ver/kube-alpha
olix0r 989ac54
build(deps): bump kubert to v0.23.0-alpha8
olix0r 2267a80
feat(policy): instrument runtime metrics
olix0r c3914ba
build(deps): bump kubert to v0.23.0-alpha9
olix0r f86886a
build(deps): bump kubert to v0.23.0-alpha10
olix0r 47f8b85
Merge branch 'main' into ver/kube-alpha
olix0r 983ce06
build(deps): address dependency auditing lints
olix0r b542e14
chore(policy): fix lint
olix0r a3dbbf6
lessen diff
olix0r eb9c78a
Merge branch 'main' into ver/kube-alpha
olix0r c389c0b
refactor(policy): extract lease init into a separate module
olix0r 24146ce
Merge branch 'ver/lease-prep' into ver/kube-alpha
olix0r 013f1e3
Merge branch 'main' into ver/kube-alpha
olix0r f3e09a9
chore(policy): disable runtime-diagnostics initially
olix0r 11586a7
chore(policy): lessen diff
olix0r 6a880fc
chore(cargo): make tower a workspace dep
olix0r b812771
build(deps): bump kubert to v0.23.0
olix0r e9d2983
build(deps): bump kubert to v0.23.0
olix0r 992e2c0
Merge branch 'main' into ver/kube-alpha
olix0r 9903a91
updated
adleong 8ea93c3
Resolve merge conflicts
adleong 6fbc076
fix merge issue
adleong f705d62
merge
adleong 2a0741d
Resolve merge conflicts
adleong 0b2b97a
fix merge
adleong 8180f87
Merge branch 'main' into alex/kube-alpha
adleong f1b161c
Resolve merge conflict
adleong baf5b80
Fix filter type field in tests
adleong 22bcbc2
Fix test
adleong 66d8613
fix tests
adleong 3cdff9d
cargo and dependabot
adleong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| use gateway_api::apis::experimental::grpcroutes::{GRPCRouteParentRefs, GRPCRouteRulesBackendRefs}; | ||
|
|
||
| pub fn parent_ref_targets_kind<T>(parent_ref: &GRPCRouteParentRefs) -> bool | ||
| where | ||
| T: kube::Resource, | ||
| T::DynamicType: Default, | ||
| { | ||
| let kind = match parent_ref.kind { | ||
| Some(ref kind) => kind, | ||
| None => return false, | ||
| }; | ||
|
|
||
| super::targets_kind::<T>(parent_ref.group.as_deref(), kind) | ||
| } | ||
|
|
||
| pub fn backend_ref_targets_kind<T>(backend_ref: &GRPCRouteRulesBackendRefs) -> bool | ||
| where | ||
| T: kube::Resource, | ||
| T::DynamicType: Default, | ||
| { | ||
| // Default kind is assumed to be service for backend ref objects | ||
| super::targets_kind::<T>( | ||
| backend_ref.group.as_deref(), | ||
| backend_ref.kind.as_deref().unwrap_or("Service"), | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| use gateway_api::apis::experimental::tcproutes::{TCPRouteParentRefs, TCPRouteRulesBackendRefs}; | ||
|
|
||
| pub fn parent_ref_targets_kind<T>(parent_ref: &TCPRouteParentRefs) -> bool | ||
| where | ||
| T: kube::Resource, | ||
| T::DynamicType: Default, | ||
| { | ||
| let kind = match parent_ref.kind { | ||
| Some(ref kind) => kind, | ||
| None => return false, | ||
| }; | ||
|
|
||
| super::targets_kind::<T>(parent_ref.group.as_deref(), kind) | ||
| } | ||
|
|
||
| pub fn backend_ref_targets_kind<T>(backend_ref: &TCPRouteRulesBackendRefs) -> bool | ||
| where | ||
| T: kube::Resource, | ||
| T::DynamicType: Default, | ||
| { | ||
| // Default kind is assumed to be service for backend ref objects | ||
| super::targets_kind::<T>( | ||
| backend_ref.group.as_deref(), | ||
| backend_ref.kind.as_deref().unwrap_or("Service"), | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| use gateway_api::apis::experimental::tlsroutes::{TLSRouteParentRefs, TLSRouteRulesBackendRefs}; | ||
|
|
||
| pub fn parent_ref_targets_kind<T>(parent_ref: &TLSRouteParentRefs) -> bool | ||
| where | ||
| T: kube::Resource, | ||
| T::DynamicType: Default, | ||
| { | ||
| let kind = match parent_ref.kind { | ||
| Some(ref kind) => kind, | ||
| None => return false, | ||
| }; | ||
|
|
||
| super::targets_kind::<T>(parent_ref.group.as_deref(), kind) | ||
| } | ||
|
|
||
| pub fn backend_ref_targets_kind<T>(backend_ref: &TLSRouteRulesBackendRefs) -> bool | ||
| where | ||
| T: kube::Resource, | ||
| T::DynamicType: Default, | ||
| { | ||
| // Default kind is assumed to be service for backend ref objects | ||
| super::targets_kind::<T>( | ||
| backend_ref.group.as_deref(), | ||
| backend_ref.kind.as_deref().unwrap_or("Service"), | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.