Skip to content

Commit 01ad6ca

Browse files
committed
fix(terraform): enusre node ports can be accessed by load balancer
This is a band-aid fix over the underlying issues where the DigitalOcean CCM-managed firewall can only open allow traffic for NodePort services. Once digitalocean/digitalocean-cloud-controller-manager#588 is merged, this can be removed.
1 parent 95bc4e0 commit 01ad6ca

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

terraform/networking.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ resource "digitalocean_firewall" "control_plane" {
3232
source_addresses = ["0.0.0.0/0", "::/0"]
3333
}
3434

35+
# Allow traffic from the VPC to NodePorts
36+
# Temporary fix until https://github.com/digitalocean/digitalocean-cloud-controller-manager/pull/588 is merged
37+
inbound_rule {
38+
protocol = "tcp"
39+
port_range = "30000-32767"
40+
source_addresses = [digitalocean_vpc.vpc.ip_range]
41+
}
42+
3543
dynamic "outbound_rule" {
3644
for_each = ["tcp", "udp"]
3745
content {
@@ -65,6 +73,14 @@ resource "digitalocean_firewall" "agent" {
6573
source_addresses = ["0.0.0.0/0", "::/0"]
6674
}
6775

76+
# Allow traffic from the VPC to NodePorts
77+
# Temporary fix until https://github.com/digitalocean/digitalocean-cloud-controller-manager/pull/588 is merged
78+
inbound_rule {
79+
protocol = "tcp"
80+
port_range = "30000-32767"
81+
source_addresses = [digitalocean_vpc.vpc.ip_range]
82+
}
83+
6884
dynamic "outbound_rule" {
6985
for_each = ["tcp", "udp"]
7086
content {

0 commit comments

Comments
 (0)