Skip to content

Commit

Permalink
fix(aws): Support cross zone load balancing for NLB (#8557)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
aravindmd and mergify[bot] committed Oct 13, 2020
1 parent 7f266fb commit a7e8847
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/scripts/modules/amazon/src/domain/IAmazonLoadBalancer.ts
Expand Up @@ -56,6 +56,7 @@ export interface IAmazonApplicationLoadBalancer extends IAmazonLoadBalancer {
ipAddressType?: string; // returned from clouddriver
deletionProtection: boolean;
idleTimeout: number;
loadBalancingCrossZone: boolean;
}

export interface IAmazonNetworkLoadBalancer extends IAmazonLoadBalancer {
Expand All @@ -64,6 +65,7 @@ export interface IAmazonNetworkLoadBalancer extends IAmazonLoadBalancer {
ipAddressType?: string; // returned from clouddriver
deletionProtection: boolean;
idleTimeout: number;
loadBalancingCrossZone: boolean;
}

export interface IRedirectActionConfig {
Expand Down Expand Up @@ -267,6 +269,7 @@ export interface IAmazonApplicationLoadBalancerUpsertCommand extends IAmazonLoad

export interface IAmazonNetworkLoadBalancerUpsertCommand extends IAmazonLoadBalancerUpsertCommand {
deletionProtection: boolean;
loadBalancingCrossZone: boolean;
listeners: IListenerDescription[];
targetGroups: INLBTargetGroupDescription[];
}
Expand Up @@ -23,6 +23,15 @@ export class NLBAdvancedSettings extends React.Component<INLBAdvancedSettingsPro
Enable deletion protection
</label>
</div>
<div className="col-md-3 sm-label-right">
<b>Cross-Zone Load Balancing</b> <HelpField id="loadBalancer.advancedSettings.loadBalancingCrossZone" />
</div>
<div className="col-md-7 checkbox">
<label>
<Field type="checkbox" name="loadBalancingCrossZone" checked={values.loadBalancingCrossZone} />
Cross-Zone Load Balancing
</label>
</div>
</div>
);
}
Expand Down
Expand Up @@ -392,6 +392,7 @@ export class AwsLoadBalancerTransformer {
subnetType: loadBalancer.subnetType,
vpcId: undefined,
deletionProtection: loadBalancer.deletionProtection,
loadBalancingCrossZone: loadBalancer.loadBalancingCrossZone,
};

if (loadBalancer.elb) {
Expand Down Expand Up @@ -594,6 +595,7 @@ export class AwsLoadBalancerTransformer {
vpcId: null,
subnetType: defaultSubnetType,
deletionProtection: false,
loadBalancingCrossZone: true,
securityGroups: [],
targetGroups: [
{
Expand Down
2 changes: 2 additions & 0 deletions app/scripts/modules/core/src/help/help.contents.ts
Expand Up @@ -211,6 +211,8 @@ const helpContents: { [key: string]: string } = {
'<p>Configures the number of healthy observations before reinstituting an instance into the ELB’s traffic rotation.</p><p>Default: <b>10</b></p>',
'loadBalancer.advancedSettings.unhealthyThreshold':
'<p>Configures the number of unhealthy observations before deservicing an instance from the ELB.</p><p>Default: <b>2</b></p>',
'loadBalancer.advancedSettings.loadBalancingCrossZone':
'<p>Cross-zone load balancing distributes traffic evenly across all targets in the Availability Zones enabled for the load balancer.</p><p> Default: <b>True</b></p>',
'pipeline.config.resizeAsg.action': `
<p>Configures the resize action for the target server group.
<ul>
Expand Down

0 comments on commit a7e8847

Please sign in to comment.