Skip to content
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

inbound: connections wait for ServerPolicy discovery #2186

Merged
merged 28 commits into from
Feb 23, 2023
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8934ce0
make server policy store async
hawkw Jan 25, 2023
91a8f40
worky (direct stack is gross)
hawkw Jan 25, 2023
31d7622
Update linkerd/app/inbound/src/policy/store.rs
hawkw Jan 26, 2023
c561eed
always use `Error` as the error type
hawkw Jan 26, 2023
f60833f
clean up direct stack a bit
hawkw Jan 26, 2023
228b1f7
misc cleanup
hawkw Jan 26, 2023
bf4b3de
Merge branch 'main' into eliza/no-default-policy
hawkw Jan 31, 2023
48375bf
Merge branch 'main' into eliza/no-default-policy
hawkw Feb 1, 2023
f5564e7
put ready back
hawkw Feb 22, 2023
5752a5b
pull GetPolicy bounds to trait-level
hawkw Feb 22, 2023
cdeeaba
Merge branch 'main' into eliza/no-default-policy
hawkw Feb 22, 2023
2c34acf
GetPolicy can be passed as `impl GetPolicy`
hawkw Feb 22, 2023
3a2e376
fixups
olix0r Feb 22, 2023
1252ca7
separately newtype `policy::LookupAddr`s
hawkw Feb 22, 2023
c910ca9
disembreak gateway tests
hawkw Feb 23, 2023
635afad
Revert "disembreak gateway tests"
hawkw Feb 23, 2023
2e82c61
Revert "separately newtype `policy::LookupAddr`s"
hawkw Feb 23, 2023
9a54acc
review feedback
hawkw Feb 23, 2023
2476c77
blanket impl GetPolicy for Service
hawkw Feb 23, 2023
f481cd5
Update linkerd/app/inbound/src/policy.rs
olix0r Feb 23, 2023
bc5d93e
Update linkerd/app/inbound/src/policy/store.rs
olix0r Feb 23, 2023
973b9e6
cascade through `lift_new_with_target`
hawkw Feb 23, 2023
0006083
diff ensmalleration
hawkw Feb 23, 2023
35b08e5
-check
hawkw Feb 23, 2023
01f56be
further diff ensmalleration
hawkw Feb 23, 2023
744feff
ensmallerate direct stack diff a bit more
hawkw Feb 23, 2023
604bbf7
implement Service for Store (instead of GetProfile)
olix0r Feb 23, 2023
c3deef4
simplify idlecache api change
olix0r Feb 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
diff ensmalleration
`(A, B)` is already `From<(A, B)>` via identity
  • Loading branch information
hawkw committed Feb 23, 2023
commit 0006083644daa39896e0e6daa2aebbc0fefbbac1
23 changes: 7 additions & 16 deletions linkerd/app/inbound/src/accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ impl<N> Inbound<N> {
self.map_stack(|cfg, rt, accept| {
accept
.push_on_service(svc::MapErr::layer_boxed())
.push_map_target(|accept: Accept| {
tracing::debug!(policy = ?&*accept.policy.borrow(), "Accepted");
accept
.push_map_target(|(policy, t): (AllowPolicy, T)| {
tracing::debug!(policy = ?&*policy.borrow(), "Accepted");
Accept {
client_addr: t.param(),
orig_dst_addr: t.param(),
policy,
}
})
.lift_new_with_target()
.check_new_new::<T, AllowPolicy>()
Expand Down Expand Up @@ -110,19 +114,6 @@ impl svc::Param<AllowPolicy> for Accept {
}
}

impl<T> From<(AllowPolicy, T)> for Accept
where
T: svc::Param<Remote<ClientAddr>> + svc::Param<OrigDstAddr>,
{
fn from((policy, t): (AllowPolicy, T)) -> Self {
Accept {
client_addr: t.param(),
orig_dst_addr: t.param(),
policy,
}
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down