Skip to content

Commit

Permalink
change egress ipv6 cidr from fd00::/8 to fd00::ac:00/118 and update R…
Browse files Browse the repository at this point in the history
…EADME.md
  • Loading branch information
wanyufe committed May 2, 2023
1 parent 36e44ac commit 5cdee7d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,23 @@ The following environment variables are available, and all of them are optional.

---

#### `ENABLE_V6_EGRESS` (v1.13.0+)

Type: Boolean as a String

Default: `false`

Specifies whether PODs in v4 cluster support IPv6 egress. If env is set to `true`, range fd00::ac:00/118 is reserved for PODs IPv6 egress.

---

#### `AWS_MANAGE_ENIS_NON_SCHEDULABLE` (v1.12.6+)

Type: Boolean as a String

Default: `false`

Specifies whether IPAMD should allocate or deallocate ENIs on a non-schedulable node.
Specifies whether IPAMD should allocate or deallocate ENIs on a non-schedulable node.

---

Expand Down
2 changes: 1 addition & 1 deletion cmd/aws-vpc-cni/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import (

const (
egressPluginIpamSubnetV4 = "169.254.172.0/22"
egressPluginIpamSubnetV6 = "fd00::/8"
egressPluginIpamSubnetV6 = "fd00::ac:00/118"
egressPluginIpamDstV4 = "0.0.0.0/0"
egressPluginIpamDstV6 = "::/0"
egressPluginIpamDataDirV4 = "/run/cni/v6pd/egress-v4-ipam"
Expand Down
4 changes: 2 additions & 2 deletions cmd/egress-cni-plugin/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func TestCmdAddV6(t *testing.T) {
"name":"aws-cni",
"enabled":"true",
"nodeIP": "2600::",
"ipam": {"type":"host-local","ranges":[[{"subnet": "fd00::/8"}]],"routes":[{"dst":"::/0"}],"dataDir":"/run/cni/v4pd/egress-v6-ipam"},
"ipam": {"type":"host-local","ranges":[[{"subnet": "fd00::ac:00/118"}]],"routes":[{"dst":"::/0"}],"dataDir":"/run/cni/v4pd/egress-v6-ipam"},
"pluginLogFile":"egress-plugin.log",
"pluginLogLevel":"DEBUG",
"podSGEnforcingMode":"strict",
Expand Down Expand Up @@ -243,7 +243,7 @@ func TestCmdDelV6(t *testing.T) {
"name":"aws-cni",
"enabled":"true",
"nodeIP": "2600::",
"ipam": {"type":"host-local","ranges":[[{"subnet": "fd00::/8"}]],"routes":[{"dst":"::/0"}],"dataDir":"/run/cni/v4pd/egress-v6-ipam"},
"ipam": {"type":"host-local","ranges":[[{"subnet": "fd00::ac:00/118"}]],"routes":[{"dst":"::/0"}],"dataDir":"/run/cni/v4pd/egress-v6-ipam"},
"pluginLogFile":"egress-plugin.log",
"pluginLogLevel":"DEBUG",
"podSGEnforcingMode":"strict",
Expand Down
2 changes: 1 addition & 1 deletion pkg/networkutils/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (n *linuxNetwork) setupRuleToBlockNodeLocalAccess(protocol iptables.Protoco
iptableCmd := "iptables"
if protocol == iptables.ProtocolIPv6 {
ipVersion = "v6"
localIpCidr = "fd00::/8"
localIpCidr = "fd00::ac:00/118"
iptableCmd = "ip6tables"
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/networkutils/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func TestSetupHostNetworkNodePortEnabledAndSNATDisabled(t *testing.T) {
"filter": {
"FORWARD": [][]string{
{
"-d", "fd00::/8", "-m", "conntrack", "--ctstate", "NEW", "-m", "comment",
"-d", "fd00::ac:00/118", "-m", "conntrack", "--ctstate", "NEW", "-m", "comment",
"--comment", "Block Node Local Pod access via IPv6", "-j", "REJECT",
},
},
Expand Down Expand Up @@ -725,7 +725,7 @@ func TestUpdateHostIptablesRules(t *testing.T) {
"filter": {
"FORWARD": [][]string{
{
"-d", "fd00::/8", "-m", "conntrack", "--ctstate", "NEW", "-m", "comment",
"-d", "fd00::ac:00/118", "-m", "conntrack", "--ctstate", "NEW", "-m", "comment",
"--comment", "Block Node Local Pod access via IPv6", "-j", "REJECT",
},
},
Expand Down

0 comments on commit 5cdee7d

Please sign in to comment.