Skip to content

Commit 506ea57

Browse files
committed
chore: Update kube and k8s-openapi dependencies to latest versions
1 parent 2e3cba1 commit 506ea57

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

agent/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ anyhow = "1"
2222
libc = "0.2"
2323
log = "0.4"
2424
ipnet = "2.9.0"
25-
kube = { version = "0.90.0", features = ["runtime", "client", "derive"] }
26-
k8s-openapi = { version = "0.21.0", features = ["latest"] }
25+
kube = { version = "0.92.1", features = ["runtime", "client", "derive"] }
26+
k8s-openapi = { version = "0.22.0", features = ["latest"] }
2727
rsln = "0.0"
2828
serde = "1.0"
2929
serde_yaml = "0.9"

agent/src/bpf_loader.rs

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
use std::net::Ipv4Addr;
22

33
use anyhow::Result;
4-
use aya::maps::{HashMap, SockHash};
5-
use aya::programs::{tc, SchedClassifier, SkMsg, SockOps, TcAttachType};
4+
use aya::maps::HashMap;
5+
use aya::programs::{tc, SchedClassifier, TcAttachType};
66
use aya::{include_bytes_aligned, Bpf};
7-
use common::{NetworkInfo, SockKey, CLUSTER_CIDR_KEY, HOST_IP_KEY};
7+
use common::{NetworkInfo, CLUSTER_CIDR_KEY, HOST_IP_KEY};
88

99
pub struct BpfLoader {
1010
pub bpf: Bpf,
1111
iface: String,
12+
#[allow(dead_code)]
1213
cgroup_path: String,
1314
}
1415

@@ -77,19 +78,19 @@ impl BpfLoader {
7778
.expect("failed to insert node ip");
7879
});
7980

80-
let tcp_accelerate: &mut SockOps =
81-
self.bpf.program_mut("tcp_accelerate").unwrap().try_into()?;
82-
let cgroup = std::fs::File::open(&self.cgroup_path)?;
83-
tcp_accelerate.load()?;
84-
tcp_accelerate.attach(cgroup)?;
81+
// let tcp_accelerate: &mut SockOps =
82+
// self.bpf.program_mut("tcp_accelerate").unwrap().try_into()?;
83+
// let cgroup = std::fs::File::open(&self.cgroup_path)?;
84+
// tcp_accelerate.load()?;
85+
// tcp_accelerate.attach(cgroup)?;
8586

86-
let sock_ops_map: SockHash<_, SockKey> =
87-
self.bpf.map("SOCK_OPS_MAP").unwrap().try_into()?;
88-
let map_fd = sock_ops_map.fd().try_clone()?;
87+
// let sock_ops_map: SockHash<_, SockKey> =
88+
// self.bpf.map("SOCK_OPS_MAP").unwrap().try_into()?;
89+
// let map_fd = sock_ops_map.fd().try_clone()?;
8990

90-
let tcp_bypass: &mut SkMsg = self.bpf.program_mut("tcp_bypass").unwrap().try_into()?;
91-
tcp_bypass.load()?;
92-
tcp_bypass.attach(&map_fd)?;
91+
// let tcp_bypass: &mut SkMsg = self.bpf.program_mut("tcp_bypass").unwrap().try_into()?;
92+
// tcp_bypass.load()?;
93+
// tcp_bypass.attach(&map_fd)?;
9394

9495
Ok(())
9596
}

tests/e2e/deploy-test/agent.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ spec:
105105
securityContext:
106106
privileged: true
107107
capabilities:
108-
add: ["NET_RAW", "NET_ADMIN"]
108+
add:
109+
- NET_RAW
110+
- NET_ADMIN
109111
volumes:
110112
- name: cni-bin
111113
hostPath:

tests/e2e/kind-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ nodes:
66
networking:
77
disableDefaultCNI: true
88
podSubnet: 10.244.0.0/16
9+
#kubeProxyMode: "none"

0 commit comments

Comments
 (0)