Skip to content

Commit 66e3822

Browse files
committed
cleanup
1 parent 8b5d40c commit 66e3822

File tree

4 files changed

+50
-164
lines changed

4 files changed

+50
-164
lines changed

templates/test/ci/cluster-template-prow-azl3.yaml

Lines changed: 18 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/test/ci/cluster-template-prow-ci-version-azl3.yaml

Lines changed: 18 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/test/ci/prow-azl3/patches/kubeadm-config-template-azl3.yaml

Lines changed: 14 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -12,89 +12,35 @@
1212
tdnf install -y ca-certificates ca-certificates-legacy
1313
update-ca-trust
1414
15-
# Azure Linux 3 firewall configuration for worker nodes
16-
# Keep the default DROP policy for security, only add specific ACCEPT rules
17-
1815
# Allow Azure service IP addresses (required for Azure resources)
1916
iptables -A INPUT -s 168.63.129.16 -j ACCEPT
2017
iptables -A OUTPUT -d 168.63.129.16 -j ACCEPT
21-
ip6tables -A INPUT -s fe80::1234:5678:9abc -j ACCEPT
22-
ip6tables -A OUTPUT -d fe80::1234:5678:9abc -j ACCEPT
23-
24-
# Allow localhost traffic (required for many localhost-bound services)
25-
iptables -A INPUT -i lo -j ACCEPT
26-
iptables -A OUTPUT -o lo -j ACCEPT
27-
ip6tables -A INPUT -i lo -j ACCEPT
28-
ip6tables -A OUTPUT -o lo -j ACCEPT
29-
30-
# Allow established and related connections
31-
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
32-
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
33-
ip6tables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
34-
ip6tables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
35-
36-
# SSH (port 22) - bound to all interfaces, needs external access
37-
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
38-
ip6tables -A INPUT -p tcp --dport 22 -j ACCEPT
39-
40-
# Kubelet API (port 10250) - bound to all IPv6 interfaces, needs cluster access
41-
iptables -A INPUT -p tcp --dport 10250 -j ACCEPT
42-
ip6tables -A INPUT -p tcp --dport 10250 -j ACCEPT
43-
44-
# kube-proxy (port 10256) - bound to all IPv6 interfaces, needs cluster access
45-
iptables -A INPUT -p tcp --dport 10256 -j ACCEPT
46-
ip6tables -A INPUT -p tcp --dport 10256 -j ACCEPT
4718
48-
# Calico networking requirements
49-
# Calico Typha (port 5473) - bound to all IPv6 interfaces, needs cluster access
50-
iptables -A INPUT -p tcp --dport 5473 -j ACCEPT
51-
ip6tables -A INPUT -p tcp --dport 5473 -j ACCEPT
52-
53-
# VXLAN for overlay networking (port 4789 UDP) - bound to all interfaces
54-
iptables -A INPUT -p udp --dport 4789 -j ACCEPT
55-
ip6tables -A INPUT -p udp --dport 4789 -j ACCEPT
19+
# Kubernetes API Server (port 6443) - bound to all IPv6 interfaces, needs external access
20+
iptables -A INPUT -p tcp --dport 6443 -j ACCEPT
5621
57-
# Calico metrics ports (29603, 29605) - bound to all IPv6 interfaces
58-
iptables -A INPUT -p tcp --dport 29603 -j ACCEPT
59-
iptables -A INPUT -p tcp --dport 29605 -j ACCEPT
60-
ip6tables -A INPUT -p tcp --dport 29603 -j ACCEPT
61-
ip6tables -A INPUT -p tcp --dport 29605 -j ACCEPT
62-
63-
# BGP for node-to-node communication (port 179) - not in netstat but needed for Calico
64-
iptables -A INPUT -p tcp --dport 179 -j ACCEPT
65-
ip6tables -A INPUT -p tcp --dport 179 -j ACCEPT
66-
67-
# IP-in-IP protocol for Calico
68-
iptables -A INPUT -p 4 -j ACCEPT
69-
ip6tables -A INPUT -p 41 -j ACCEPT
22+
# etcd server communication - external access needed for cluster communication
23+
# Port 2379 is bound to node IP (10.0.0.5), needs cluster access
24+
iptables -A INPUT -p tcp --dport 2379 -j ACCEPT
25+
# Port 2380 is bound to node IP (10.0.0.5), needs cluster access
26+
iptables -A INPUT -p tcp --dport 2380 -j ACCEPT
27+
# Port 2381 is localhost only, no external rule needed
7028
71-
# DHCP client (port 68 UDP) - for IP assignment
72-
iptables -A INPUT -p udp --dport 68 -j ACCEPT
73-
ip6tables -A INPUT -p udp --dport 68 -j ACCEPT
74-
75-
# NTP (port 323 UDP) - for time synchronization
76-
iptables -A INPUT -p udp --dport 323 -j ACCEPT
77-
ip6tables -A INPUT -p udp --dport 323 -j ACCEPT
78-
79-
# Allow ICMP for connectivity checks
80-
iptables -A INPUT -p icmp -j ACCEPT
81-
ip6tables -A INPUT -p ipv6-icmp -j ACCEPT
82-
83-
# Allow traffic to Kubernetes service network (10.96.0.0/12) - required for pod-to-service communication
29+
# Allow traffic to Kubernetes service network (10.96.0.0/12) - CRITICAL: required for pod-to-service communication
8430
iptables -A OUTPUT -d 10.96.0.0/12 -j ACCEPT
8531
iptables -A INPUT -s 10.96.0.0/12 -j ACCEPT
8632
87-
# Allow traffic to/from Calico pod network (192.168.0.0/16) - required for pod-to-pod communication
88-
iptables -A OUTPUT -d 192.168.0.0/16 -j ACCEPT
89-
iptables -A INPUT -s 192.168.0.0/16 -j ACCEPT
90-
9133
# Allow traffic to/from node network (10.1.0.0/24) - required for node-to-node communication
9234
iptables -A OUTPUT -d 10.1.0.0/24 -j ACCEPT
9335
iptables -A INPUT -s 10.1.0.0/24 -j ACCEPT
9436
37+
# Allow traffic to/from Calico pod network - more restrictive than full 192.168.0.0/16
38+
# Only allow the specific pod CIDR ranges that Calico actually uses
39+
iptables -A OUTPUT -d 192.168.0.0/24 -j ACCEPT
40+
iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT
41+
9542
# Save the rules following Azure Linux 3 approach
9643
iptables-save > /etc/systemd/scripts/ip4save
97-
ip6tables-save > /etc/systemd/scripts/ip6save
9844
path: /tmp/azl3-setup.sh
9945
owner: "root:root"
10046
permissions: "0744"

test/e2e/config/azure-dev.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,6 @@ providers:
186186
targetName: "cluster-template-apiserver-ilb.yaml"
187187
- sourcePath: "${PWD}/templates/test/ci/cluster-template-prow-apiserver-ilb-custom-images.yaml"
188188
targetName: "cluster-template-apiserver-ilb-custom-images.yaml"
189-
- sourcePath: "${PWD}/templates/test/ci/cluster-template-prow-custom-builds-apiserver-ilb-custom-images.yaml"
190-
targetName: "cluster-template-custom-builds-apiserver-ilb-custom-images.yaml"
191-
- sourcePath: "${PWD}/templates/test/ci/cluster-template-prow-custom-builds-azl3.yaml"
192-
targetName: "cluster-template-custom-builds-azl3.yaml"
193189
- sourcePath: "${PWD}/templates/test/ci/cluster-template-prow-dalec-custom-builds.yaml"
194190
targetName: "cluster-template-dalec-custom-builds.yaml"
195191
- sourcePath: "${PWD}/templates/test/ci/cluster-template-prow-azl3.yaml"

0 commit comments

Comments
 (0)