Skip to content

Commit

Permalink
default priority of firewall rules (#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
kon-angelo authored Oct 22, 2024
1 parent 190599e commit a6bd950
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/controller/infrastructure/infraflow/ensure_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ func firewallRuleAllowInternal(name, network string, cidrs []*string) *compute.F
Name: name,
Network: network,
Direction: "INGRESS",
Priority: 1000,
Allowed: []*compute.FirewallAllowed{
{
IPProtocol: "icmp",
Expand All @@ -232,7 +233,7 @@ func firewallRuleAllowInternal(name, network string, cidrs []*string) *compute.F
Ports: []string{"1-65535"},
},
},
ForceSendFields: []string{"Disabled", "Priority"},
ForceSendFields: []string{"Disabled"},
NullFields: []string{"Denied", "DestinationRanges", "SourceServiceAccounts", "SourceTags", "TargetTags", "TargetServiceAccounts"},
}
for _, cidr := range cidrs {
Expand All @@ -256,7 +257,8 @@ func firewallRuleAllowExternal(name, network string) *compute.Firewall {
Direction: "INGRESS",
Name: name,
Network: network,
ForceSendFields: []string{"Disabled", "Priority"},
Priority: 1000,
ForceSendFields: []string{"Disabled"},
NullFields: []string{"Denied", "DestinationRanges", "SourceServiceAccounts", "SourceTags", "TargetTags", "TargetServiceAccounts"},
}
}
Expand All @@ -266,6 +268,7 @@ func firewallRuleAllowHealthChecks(name, network string) *compute.Firewall {
Name: name,
Network: network,
Direction: "INGRESS",
Priority: 1000,
SourceRanges: []string{
"35.191.0.0/16",
"209.85.204.0/22",
Expand All @@ -282,7 +285,7 @@ func firewallRuleAllowHealthChecks(name, network string) *compute.Firewall {
Ports: []string{"30000-32767"},
},
},
ForceSendFields: []string{"Disabled", "Priority"},
ForceSendFields: []string{"Disabled"},
NullFields: []string{"Denied", "DestinationRanges", "SourceServiceAccounts", "SourceTags", "TargetTags", "TargetServiceAccounts"},
}
}
Expand Down

0 comments on commit a6bd950

Please sign in to comment.