Skip to content

Commit

Permalink
feat(provider/azure): Enable dns label (#7065)
Browse files Browse the repository at this point in the history
* feat(provider/azure): Enable dns label

* feat(provider/azure): Enable dns label

* feat(provider/azure): Enable dns label
  • Loading branch information
Neil Ye authored and louisjimenez committed Jun 4, 2019
1 parent 78a9f72 commit aaf7745
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 54 deletions.
12 changes: 12 additions & 0 deletions app/scripts/modules/azure/help/azure.help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ const helpContents: { [key: string]: string } = {
} tags at most.`,
'azure.serverGroup.enableInboundNAT':
'An Azure load balancer of the basic sku will be created with adding inbound NAT port-forwarding rules to facilitate loggin on VM instances. There is no charge for creating an Azure load balancer of the basic sku. This option is disabled if Availability Zones are set which require Standard Azure Load Balancer and an extra Network Security Group with correct inbound and outbound rules configured.',
'azure.loadBalancer.dnsName':
'If there is no custom DNS label specified, a default DNS name will be created. The default value will be "GeneratedText.cloudapp.net" for Azure Application Gateway or "GeneratedText.[region].cloudapp.azure.com" for Azure Load Balancer.',
'azure.loadBalancer.probes.probeInterval':
'Probe interval in seconds. This value is the time interval between two consecutive probes.',
'azure.loadBalancer.probes.timeout':
'Probe time-out in seconds. If a valid response is not received within this time-out period, the probe is marked as failed. Note that the time-out value should not be more than the Interval value.',
'azure.loadBalancer.probes.unhealthyThreshold':
'Probe retry count. The back-end server is marked down after the consecutive probe failure count reaches the unhealthy threshold.',
'azure.loadBalancer.loadBalancingRules.idleTimeout':
'Keep a TCP or HTTP connection open without relying on clients to send keep-alive messages.',
'azure.loadBalancer.loadBalancingRules.sessionPersistence':
'Session persistence specifies that traffic from a client should be handled by the same virtual machine in the backend pool for the duration of a session. "None" specifies that successive requests from the same client may be handled by any virtual machine. "Client IP" specifies that successive requests from the same client IP address will be handled by the same virtual machine. "Client IP and protocol" specifies that successive requests from the same client IP address and protocol combination will be handled by the same virtual machine.',
};

Object.keys(helpContents).forEach(key => HelpContentsRegistry.register(key, helpContents[key]));
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<div class="container-fluid form-horizontal">
<div class="form-group">
<div class="col-md-12">
<div class="form-group">
<div class="col-md-3">
<b>Custom DNS Label</b>
<help-field key="azure.loadBalancer.dnsName"></help-field>
</div>
<div class="col-md-6">
<input class="form-control input-sm" type="text" ng-model="loadBalancer.dnsName" />
<span>.{{loadBalancer.region}}.cloudapp.azure.com</span>
</div>
</div>
<div class="form-group">
<div class="col-md-3">
<b>Health Check</b>
</div>
</div>
<div class="form-group">
<div class="col-md-4 sm-label-right">
<b>Interval</b>
<help-field key="azure.loadBalancer.probes.probeInterval"></help-field>
</div>
<div class="col-md-4">
<input class="form-control input-sm" type="number" min="0" ng-model="loadBalancer.probes[0].probeInterval" />
</div>
</div>
<div class="form-group">
<div class="col-md-4 sm-label-right">
<b>Unhealthy Threshold</b>
<help-field key="azure.loadBalancer.probes.unhealthyThreshold"></help-field>
</div>
<div class="col-md-4">
<input
class="form-control input-sm"
type="number"
min="0"
ng-model="loadBalancer.probes[0].unhealthyThreshold"
/>
</div>
</div>
<div class="form-group" ng-if="isALB">
<div class="col-md-4 sm-label-right">
<b>Idle Timeout</b>
<help-field key="azure.loadBalancer.loadBalancingRules.idleTimeout"></help-field>
</div>
<div class="col-md-4">
<input
class="form-control input-sm"
type="number"
min="0"
ng-model="loadBalancer.loadBalancingRules[0].idleTimeout"
/>
</div>
</div>
<div class="form-group" ng-if="!isALB">
<div class="col-md-4 sm-label-right">
<b>Timeout</b>
<help-field key="azure.loadBalancer.probes.timeout"></help-field>
</div>
<div class="col-md-4">
<input class="form-control input-sm" type="number" min="0" ng-model="loadBalancer.probes[0].timeout" />
</div>
</div>
<div class="form-group" ng-if="isALB">
<div class="col-md-4 sm-label-right">
<b>Session persistence</b>
<help-field key="azure.loadBalancer.loadBalancingRules.sessionPersistence"></help-field>
</div>
<div class="col-md-4">
<select
class="form-control input-sm"
ng-model="loadBalancer.sessionPersistence"
ng-init="loadBalancer.sessionPersistence = 'None'"
required
ng-options="p for p in ['None', 'Client IP', 'Client IP and protocol']"
></select>
</div>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = angular
location: require('./createLoadBalancerProperties.html'),
listeners: require('./listeners.html'),
healthCheck: require('./healthCheck.html'),
advancedSettings: require('./advancedSettings.html'),
};

$scope.isNew = isNew;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<v2-wizard-page key="Health Check" label="Health Check" done="true" hide-subheading="true">
<ng-include src="pages.healthCheck"></ng-include>
</v2-wizard-page>
<v2-wizard-page key="Advanced Settings" label="Advanced Settings" done="true">
<ng-include src="pages.advancedSettings"></ng-include>
</v2-wizard-page>
</v2-modal-wizard>
<div class="modal-footer">
<button ng-disabled="taskMonitor.submitting" class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<v2-wizard-page key="Health Check" label="Health Check" done="true" hide-subheading="true">
<ng-include src="pages.healthCheck"></ng-include>
</v2-wizard-page>
<v2-wizard-page key="Advanced Settings" label="Advanced Settings" done="true">
<ng-include src="pages.advancedSettings"></ng-include>
</v2-wizard-page>
</v2-modal-wizard>
<div class="modal-footer">
<button ng-disabled="taskMonitor.submitting" class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>
Expand Down
54 changes: 0 additions & 54 deletions app/scripts/modules/azure/loadBalancer/configure/healthCheck.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,58 +71,4 @@
</table>
</div>
</div>
<div class="form-group">
<div class="wizard-subheading">
<h4>Advanced Settings</h4>
</div>
<div class="col-md-8 nest">
<div class="form-group">
<div class="col-md-6 sm-label-right">
<b>Interval</b>
<help-field key="loadBalancer.probes.probeInterval"></help-field>
</div>
<div class="col-md-4">
<input class="form-control input-sm" type="number" min="0" ng-model="loadBalancer.probes[0].probeInterval" />
</div>
</div>
<div class="form-group">
<div class="col-md-6 sm-label-right">
<b>Unhealthy Threshold</b>
<help-field key="loadBalancer.probes.unhealthyThreshold"></help-field>
</div>
<div class="col-md-4">
<input
class="form-control input-sm"
type="number"
min="0"
ng-model="loadBalancer.probes[0].unhealthyThreshold"
/>
</div>
</div>
<div class="form-group">
<div class="col-md-6 sm-label-right">
<b>Timeout</b>
<help-field key="loadBalancer.probes.timeout"></help-field>
</div>
<div class="col-md-4">
<input class="form-control input-sm" type="number" min="0" ng-model="loadBalancer.probes[0].timeout" />
</div>
</div>
<div class="form-group" ng-if="isALB">
<div class="col-md-6 sm-label-right">
<b>Session persistence</b>
<help-field key="loadBalancer.probes.timeout"></help-field>
</div>
<div class="col-md-4">
<select
class="form-control input-sm"
ng-model="loadBalancer.sessionPersistence"
ng-init="loadBalancer.sessionPersistence = 'None'"
required
ng-options="p for p in ['None', 'Client IP', 'Client IP and protocol']"
></select>
</div>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ module.exports = angular
$uibModal.open({
templateUrl: require('../configure/editLoadBalancer.html'),
controller: 'azureCreateLoadBalancerCtrl as ctrl',
size: 'lg',
resolve: {
application: function() {
return app;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ module.exports = angular
}

toEdit.probes = elb.probes;
if (elb.dnsName && elb.dnsName !== 'dns-not-found') {
toEdit.dnsName = elb.dnsName.split('.')[0];
}
}
return toEdit;
}
Expand Down

0 comments on commit aaf7745

Please sign in to comment.