Skip to content

Commit 290c878

Browse files
committed
Add documentation description for feature gate ALBSingleSubnet
1 parent 3120390 commit 290c878

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docs/deploy/configurations.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,4 @@ They are a set of kye=value pairs that describe AWS load balance controller feat
172172
| EnableRGTAPI | string | false | If enabled, the tagging manager will describe resource tags via RGT APIs, otherwise via ELB APIs. In order to enable RGT API, `tag:GetResources` is needed in controller IAM policy. |
173173
| SubnetsClusterTagCheck | string | true | Enable or disable the check for `kubernetes.io/cluster/${cluster-name}` during subnet auto-discovery |
174174
| NLBHealthCheckAdvancedConfiguration | string | true | Enable or disable advanced health check configuration for NLB, for example health check timeout |
175+
| ALBSingleSubnet | string | false | If enabled, controller will allow using only 1 subnet for provisioning ALB, which need to get whitelisted by ELB in advance |

docs/deploy/subnet_discovery.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Subnet auto-discovery
2-
By default, the AWS Load Balancer Controller (LBC) auto-discovers network subnets that it can create AWS Network Load Balancers (NLB) and AWS Application Load Balancers (ALB) in. ALBs require at least two subnets across Availability Zones. NLBs require one subnet.
2+
By default, the AWS Load Balancer Controller (LBC) auto-discovers network subnets that it can create AWS Network Load Balancers (NLB) and AWS Application Load Balancers (ALB) in. ALBs require at least two subnets across Availability Zones by default,
3+
set [Feature Gate ALBSingleSubnet](https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/deploy/configurations/#feature-gates) to "true" allows using only 1 subnet for provisioning ALB. NLBs require one subnet.
34
The subnets must be tagged appropriately for auto-discovery to work. The controller chooses one subnet from each Availability Zone. During auto-discovery, the controller
45
considers subnets with at least eight available IP addresses. In the case of multiple qualified tagged subnets in an Availability Zone, the controller chooses the first one in lexicographical
56
order by the subnet IDs.

pkg/networking/subnet_resolver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type SubnetsResolveOptions struct {
4848
AvailableIPAddressCount int64
4949
// whether to check the cluster tag
5050
SubnetsClusterTagCheck bool
51-
// Disable subnet minimal count restriction
51+
// whether to allow using only 1 subnet for provisioning ALB, default to false
5252
ALBSingleSubnet bool
5353
}
5454

@@ -97,7 +97,7 @@ func WithSubnetsClusterTagCheck(SubnetsClusterTagCheck bool) SubnetsResolveOptio
9797
}
9898
}
9999

100-
// WithALBSingleSubnet generate an option that foncigure ALBSingleSubnet
100+
// WithALBSingleSubnet generate an option that configures ALBSingleSubnet
101101
func WithALBSingleSubnet(ALBSingleSubnet bool) SubnetsResolveOption {
102102
return func(opts *SubnetsResolveOptions) {
103103
opts.ALBSingleSubnet = ALBSingleSubnet

0 commit comments

Comments
 (0)