Skip to content

Commit 1080145

Browse files
chore: bump egress to v1.0.3 (alibaba#435)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 53eeb49 commit 1080145

File tree

9 files changed

+30
-30
lines changed

9 files changed

+30
-30
lines changed

server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ EOF
241241
execd_image = "opensandbox/execd:v1.0.6"
242242

243243
[egress]
244-
image = "opensandbox/egress:v1.0.2"
244+
image = "opensandbox/egress:v1.0.3"
245245
```
246246
- Supported only in Docker bridge mode; requests with `networkPolicy` are rejected when `network_mode=host` or when `egress.image` is not configured.
247247
- Main container shares the sidecar netns and explicitly drops `NET_ADMIN`; the sidecar keeps `NET_ADMIN` to manage iptables.

server/README_zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ type = "docker"
240240
execd_image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:v1.0.6"
241241

242242
[egress]
243-
image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.2"
243+
image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.3"
244244
```
245245

246246
- 仅支持 Docker bridge 模式(`network_mode=host` 时会拒绝携带 `networkPolicy` 的请求,或当 `egress.image` 未配置时也会拒绝)。

server/docker-compose.example.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ configs:
1212
execd_image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:v1.0.6"
1313
1414
[egress]
15-
image = "opensandbox/egress:v1.0.2"
16-
# image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.2"
15+
image = "opensandbox/egress:v1.0.3"
16+
# image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.3"
1717
1818
[docker]
1919
network_mode = "bridge"

server/example.config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ execd_image = "opensandbox/execd:v1.0.6"
3434
[egress]
3535
# Egress configuration
3636
# -----------------------------------------------------------------
37-
image = "opensandbox/egress:v1.0.2"
37+
image = "opensandbox/egress:v1.0.3"
3838

3939
[storage]
4040
# Volume and storage configuration

server/example.config.zh.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ execd_image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd
3333
[egress]
3434
# Egress configuration
3535
# -----------------------------------------------------------------
36-
image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.2"
36+
image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.3"
3737

3838
[storage]
3939
# 卷存储配置

server/src/services/k8s/egress_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def build_egress_sidecar_container(
5959
Example:
6060
```python
6161
sidecar = build_egress_sidecar_container(
62-
egress_image="opensandbox/egress:v1.0.2",
62+
egress_image="opensandbox/egress:v1.0.3",
6363
network_policy=NetworkPolicy(
6464
default_action="deny",
6565
egress=[NetworkRule(action="allow", target="pypi.org")]

server/tests/k8s/test_agent_sandbox_provider.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def test_create_workload_with_network_policy_adds_sidecar(self, mock_k8s_client)
590590
expires_at=expires_at,
591591
execd_image="execd:latest",
592592
network_policy=network_policy,
593-
egress_image="opensandbox/egress:v1.0.2",
593+
egress_image="opensandbox/egress:v1.0.3",
594594
)
595595

596596
body = mock_api.create_namespaced_custom_object.call_args.kwargs["body"]
@@ -603,7 +603,7 @@ def test_create_workload_with_network_policy_adds_sidecar(self, mock_k8s_client)
603603
# Find sidecar container
604604
sidecar = next((c for c in containers if c["name"] == "egress"), None)
605605
assert sidecar is not None
606-
assert sidecar["image"] == "opensandbox/egress:v1.0.2"
606+
assert sidecar["image"] == "opensandbox/egress:v1.0.3"
607607

608608
# Verify sidecar has environment variable
609609
env_vars = {e["name"]: e["value"] for e in sidecar.get("env", [])}
@@ -642,7 +642,7 @@ def test_create_workload_with_network_policy_adds_ipv6_disable_sysctls(self, moc
642642
expires_at=expires_at,
643643
execd_image="execd:latest",
644644
network_policy=network_policy,
645-
egress_image="opensandbox/egress:v1.0.2",
645+
egress_image="opensandbox/egress:v1.0.3",
646646
)
647647

648648
body = mock_api.create_namespaced_custom_object.call_args.kwargs["body"]
@@ -691,7 +691,7 @@ def test_create_workload_with_network_policy_drops_net_admin_from_main_container
691691
expires_at=expires_at,
692692
execd_image="execd:latest",
693693
network_policy=network_policy,
694-
egress_image="opensandbox/egress:v1.0.2",
694+
egress_image="opensandbox/egress:v1.0.3",
695695
)
696696

697697
body = mock_api.create_namespaced_custom_object.call_args.kwargs["body"]
@@ -776,7 +776,7 @@ def test_egress_sidecar_contains_network_policy_in_env(self, mock_k8s_client):
776776
expires_at=expires_at,
777777
execd_image="execd:latest",
778778
network_policy=network_policy,
779-
egress_image="opensandbox/egress:v1.0.2",
779+
egress_image="opensandbox/egress:v1.0.3",
780780
)
781781

782782
body = mock_api.create_namespaced_custom_object.call_args.kwargs["body"]

server/tests/k8s/test_batchsandbox_provider.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ def test_create_workload_with_network_policy_adds_sidecar(self, mock_k8s_client)
13011301
expires_at=expires_at,
13021302
execd_image="execd:latest",
13031303
network_policy=network_policy,
1304-
egress_image="opensandbox/egress:v1.0.2",
1304+
egress_image="opensandbox/egress:v1.0.3",
13051305
)
13061306

13071307
body = mock_api.create_namespaced_custom_object.call_args.kwargs["body"]
@@ -1314,7 +1314,7 @@ def test_create_workload_with_network_policy_adds_sidecar(self, mock_k8s_client)
13141314
# Find sidecar container
13151315
sidecar = next((c for c in containers if c["name"] == "egress"), None)
13161316
assert sidecar is not None
1317-
assert sidecar["image"] == "opensandbox/egress:v1.0.2"
1317+
assert sidecar["image"] == "opensandbox/egress:v1.0.3"
13181318

13191319
# Verify sidecar has environment variable
13201320
env_vars = {e["name"]: e["value"] for e in sidecar.get("env", [])}
@@ -1353,7 +1353,7 @@ def test_create_workload_with_network_policy_adds_ipv6_disable_sysctls(self, moc
13531353
expires_at=expires_at,
13541354
execd_image="execd:latest",
13551355
network_policy=network_policy,
1356-
egress_image="opensandbox/egress:v1.0.2",
1356+
egress_image="opensandbox/egress:v1.0.3",
13571357
)
13581358

13591359
body = mock_api.create_namespaced_custom_object.call_args.kwargs["body"]
@@ -1402,7 +1402,7 @@ def test_create_workload_with_network_policy_drops_net_admin_from_main_container
14021402
expires_at=expires_at,
14031403
execd_image="execd:latest",
14041404
network_policy=network_policy,
1405-
egress_image="opensandbox/egress:v1.0.2",
1405+
egress_image="opensandbox/egress:v1.0.3",
14061406
)
14071407

14081408
body = mock_api.create_namespaced_custom_object.call_args.kwargs["body"]
@@ -1487,7 +1487,7 @@ def test_egress_sidecar_contains_network_policy_in_env(self, mock_k8s_client):
14871487
expires_at=expires_at,
14881488
execd_image="execd:latest",
14891489
network_policy=network_policy,
1490-
egress_image="opensandbox/egress:v1.0.2",
1490+
egress_image="opensandbox/egress:v1.0.3",
14911491
)
14921492

14931493
body = mock_api.create_namespaced_custom_object.call_args.kwargs["body"]
@@ -1580,7 +1580,7 @@ def test_create_workload_with_network_policy_works_with_template(self, mock_k8s_
15801580
expires_at=expires_at,
15811581
execd_image="execd:latest",
15821582
network_policy=network_policy,
1583-
egress_image="opensandbox/egress:v1.0.2",
1583+
egress_image="opensandbox/egress:v1.0.3",
15841584
)
15851585

15861586
body = mock_api.create_namespaced_custom_object.call_args.kwargs["body"]

server/tests/k8s/test_egress_helper.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TestBuildEgressSidecarContainer:
3333

3434
def test_builds_container_with_basic_config(self):
3535
"""Test that container is built with correct basic configuration."""
36-
egress_image = "opensandbox/egress:v1.0.2"
36+
egress_image = "opensandbox/egress:v1.0.3"
3737
network_policy = NetworkPolicy(
3838
default_action="deny",
3939
egress=[
@@ -50,7 +50,7 @@ def test_builds_container_with_basic_config(self):
5050

5151
def test_contains_egress_rules_environment_variable(self):
5252
"""Test that container includes OPENSANDBOX_EGRESS_RULES environment variable."""
53-
egress_image = "opensandbox/egress:v1.0.2"
53+
egress_image = "opensandbox/egress:v1.0.3"
5454
network_policy = NetworkPolicy(
5555
default_action="deny",
5656
egress=[NetworkRule(action="allow", target="example.com")],
@@ -65,7 +65,7 @@ def test_contains_egress_rules_environment_variable(self):
6565

6666
def test_serializes_network_policy_correctly(self):
6767
"""Test that network policy is correctly serialized to JSON."""
68-
egress_image = "opensandbox/egress:v1.0.2"
68+
egress_image = "opensandbox/egress:v1.0.3"
6969
network_policy = NetworkPolicy(
7070
default_action="deny",
7171
egress=[
@@ -92,7 +92,7 @@ def test_serializes_network_policy_correctly(self):
9292

9393
def test_handles_empty_egress_rules(self):
9494
"""Test that empty egress rules are handled correctly."""
95-
egress_image = "opensandbox/egress:v1.0.2"
95+
egress_image = "opensandbox/egress:v1.0.3"
9696
network_policy = NetworkPolicy(
9797
default_action="allow",
9898
egress=[],
@@ -108,7 +108,7 @@ def test_handles_empty_egress_rules(self):
108108

109109
def test_handles_missing_default_action(self):
110110
"""Test that missing default_action is handled (exclude_none=True)."""
111-
egress_image = "opensandbox/egress:v1.0.2"
111+
egress_image = "opensandbox/egress:v1.0.3"
112112
network_policy = NetworkPolicy(
113113
egress=[NetworkRule(action="allow", target="example.com")],
114114
)
@@ -124,7 +124,7 @@ def test_handles_missing_default_action(self):
124124

125125
def test_security_context_has_net_admin_capability(self):
126126
"""Test that security context includes NET_ADMIN capability."""
127-
egress_image = "opensandbox/egress:v1.0.2"
127+
egress_image = "opensandbox/egress:v1.0.3"
128128
network_policy = NetworkPolicy(
129129
default_action="deny",
130130
egress=[],
@@ -139,7 +139,7 @@ def test_security_context_has_net_admin_capability(self):
139139

140140
def test_container_spec_is_valid_kubernetes_format(self):
141141
"""Test that returned container spec is in valid Kubernetes format."""
142-
egress_image = "opensandbox/egress:v1.0.2"
142+
egress_image = "opensandbox/egress:v1.0.3"
143143
network_policy = NetworkPolicy(
144144
default_action="deny",
145145
egress=[NetworkRule(action="allow", target="example.com")],
@@ -161,7 +161,7 @@ def test_container_spec_is_valid_kubernetes_format(self):
161161

162162
def test_handles_wildcard_domains(self):
163163
"""Test that wildcard domains in egress rules are handled correctly."""
164-
egress_image = "opensandbox/egress:v1.0.2"
164+
egress_image = "opensandbox/egress:v1.0.3"
165165
network_policy = NetworkPolicy(
166166
default_action="deny",
167167
egress=[
@@ -251,7 +251,7 @@ def test_adds_egress_sidecar_container(self):
251251
default_action="deny",
252252
egress=[NetworkRule(action="allow", target="example.com")],
253253
)
254-
egress_image = "opensandbox/egress:v1.0.2"
254+
egress_image = "opensandbox/egress:v1.0.3"
255255

256256
apply_egress_to_spec(
257257
pod_spec=pod_spec,
@@ -272,7 +272,7 @@ def test_adds_ipv6_disable_sysctls(self):
272272
default_action="deny",
273273
egress=[NetworkRule(action="allow", target="example.com")],
274274
)
275-
egress_image = "opensandbox/egress:v1.0.2"
275+
egress_image = "opensandbox/egress:v1.0.3"
276276

277277
apply_egress_to_spec(
278278
pod_spec=pod_spec,
@@ -303,7 +303,7 @@ def test_extends_existing_sysctls(self):
303303
default_action="deny",
304304
egress=[NetworkRule(action="allow", target="example.com")],
305305
)
306-
egress_image = "opensandbox/egress:v1.0.2"
306+
egress_image = "opensandbox/egress:v1.0.3"
307307

308308
apply_egress_to_spec(
309309
pod_spec=pod_spec,
@@ -337,7 +337,7 @@ def test_no_op_when_no_network_policy(self):
337337
pod_spec=pod_spec,
338338
containers=containers,
339339
network_policy=None,
340-
egress_image="opensandbox/egress:v1.0.2",
340+
egress_image="opensandbox/egress:v1.0.3",
341341
)
342342

343343
assert len(containers) == 0

0 commit comments

Comments
 (0)