Skip to content

Commit a2923ca

Browse files
committed
svc/nlb/sg: introduce cloud-config to enable NLB with SGs
Introduce the NLB Security Group Mode configuration (NLBSecurityGroupMode) to make the controller creates the Security Group by default when provisioning Service type-LoadBalancer NLB. This configuration is opt-in and global to the cluster.
1 parent 4860e26 commit a2923ca

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/providers/v1/config/config.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ const (
2323

2424
// ClusterServiceLoadBalancerHealthProbeModeServiceNodePort is the service node port health probe mode for cluster service load balancer.
2525
ClusterServiceLoadBalancerHealthProbeModeServiceNodePort = "ServiceNodePort"
26+
27+
// NLBSecurityGroupModeManaged indicates the controller is managing security groups on service type loadbalancer NLB.
28+
NLBSecurityGroupModeManaged = "Managed"
29+
30+
// NLBSecurityGroupModeUnmanaged indicates the controller is not managing security groups on service type loadbalancer NLB.
31+
NLBSecurityGroupModeUnmanaged = "Unmanaged"
2632
)
2733

2834
// CloudConfig wraps the settings for the AWS cloud provider.
@@ -97,6 +103,10 @@ type CloudConfig struct {
97103
//
98104
// WARNING: Updating the default behavior and corresponding unit tests would be a much safer option.
99105
SupportedTopologyInstanceTypePattern string `json:"supportedTopologyInstanceTypePattern,omitempty" yaml:"supportedTopologyInstanceTypePattern,omitempty"`
106+
107+
// NLBSecurityGroupMode determines if the controller manage, creates and attaches, the security group when the service type
108+
// loadbalancer NLB is created.
109+
NLBSecurityGroupMode string `json:"nlbSecurityGroupMode,omitempty" yaml:"nlbSecurityGroupMode,omitempty"`
100110
}
101111
// [ServiceOverride "1"]
102112
// Service = s3

0 commit comments

Comments
 (0)