Skip to content

Commit 57e80de

Browse files
raveningweizhouapache
authored andcommitted
Load balancer configurations using HAProxy
Ported from apache/cloudstack-primate#778 This is the UI change needed for confgiuring load balancer rules using haproxy and also adding ssl certificated to load balancer rules Load balancer configs are avaiable at two scopes. one at the network level under "LB Configs" tab and another under each load balancer rule and can be configured by clicking on "Configuration" button. The SSL certificates can be added only for load balancer rules with ssl protocols To apply global load balancing configurations, navigate to "Networks" -> LB Configs
1 parent 6b6eecc commit 57e80de

File tree

4 files changed

+839
-13
lines changed

4 files changed

+839
-13
lines changed

ui/public/locales/en.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@
595595
"label.crosszones": "Cross zones",
596596
"label.currency": "Currency",
597597
"label.current": "Current",
598+
"label.currentsslcert": "Current SSL Certificate",
598599
"label.currentpassword": "Current password",
599600
"label.custom": "Custom",
600601
"label.customconstrained": "Custom constrained",
@@ -1217,6 +1218,11 @@
12171218
"label.lb.algorithm.roundrobin": "Round-robin",
12181219
"label.lb.algorithm.source": "Source",
12191220
"label.lb.cookie": "LbCookie",
1221+
"label.lb.config": "LB Configs",
1222+
"label.lb.configuration": "Configuration",
1223+
"label.lb.config.value": "Value",
1224+
"label.lb.config.name": "Lb Config name",
1225+
"label.lb.config.default.value": "Default value",
12201226
"label.lb.protocol.http": "HTTP",
12211227
"label.lb.protocol.ssl": "SSL",
12221228
"label.lbdevicededicated": "Dedicated",
@@ -1991,6 +1997,7 @@
19911997
"label.ssh.port": "SSH port",
19921998
"label.sshkeypair": "New SSH key pair",
19931999
"label.sshkeypairs": "SSH key pairs",
2000+
"label.ssl": "SSL",
19942001
"label.sslcertificates": "SSL certificates",
19952002
"label.standard.us.keyboard": "Standard (US) keyboard",
19962003
"label.start": "Start",
@@ -2551,6 +2558,9 @@
25512558
"message.remove.ip.v6.firewall.rule.failed": "Failed to remove IPv6 firewall rule",
25522559
"message.remove.ip.v6.firewall.rule.processing": "Removing IPv6 firewall rule...",
25532560
"message.remove.ip.v6.firewall.rule.success": "Removed IPv6 firewall rule",
2561+
"message.add.lbconfig.processing": "Adding new load balancer config",
2562+
"message.add.load.balancer": "Add a load balancer to zone",
2563+
"message.add.load.balancer.under.ip": "The load balancer rule has been added under IP:",
25542564
"message.add.network": "Add a new Network for zone: <b><span id=\"zone_name\"></span></b>",
25552565
"message.add.network.acl.failed": "Adding Network ACL list failed.",
25562566
"message.add.network.acl.processing": "Adding Network ACL list...",
@@ -2967,6 +2977,7 @@
29672977
"message.failed.to.add": "Failed to add",
29682978
"message.failed.to.assign.vms": "Failed to assign Instances",
29692979
"message.failed.to.remove": "Failed to remove",
2980+
"message.failed.to.remove.lbconfig": "Failed to remove load balancer config",
29702981
"message.generate.keys": "Please confirm that you would like to generate new API/Secret keys for this User.",
29712982
"message.chart.statistic.info": "The shown charts are self-adjustable, that means, if the value gets close to the limit or overpass it, it will grow to adjust the shown value",
29722983
"message.chart.statistic.info.hypervisor.additionals": "The metrics data depend on the hypervisor plugin used for each hypervisor. The behavior can vary across different hypervisors. For instance, with KVM, metrics are real-time statistics provided by libvirt. In contrast, with VMware, the metrics are averaged data for a given time interval controlled by configuration.",
@@ -3115,6 +3126,8 @@
31153126
"message.remove.instance.failed": "Failed to remove Instance",
31163127
"message.remove.instance.processing": "Removing...",
31173128
"message.remove.iprange.processing": "Removing IP range...",
3129+
"message.remove.lbconfig.processing": "Removing load balancer config",
3130+
"message.remove.lbconfig.failed": "Failed to remove Load Balancer Config",
31183131
"message.remove.ldap": "Are you sure you want to delete the LDAP configuration?",
31193132
"message.remove.nic.processing": "Removing NIC...",
31203133
"message.remove.port.forward.failed": "Removing port forwarding rule failed",
@@ -3274,6 +3287,7 @@
32743287
"message.success.remove.instance.rule": "Successfully removed Instance from rule",
32753288
"message.success.remove.ip": "Successfully removed IP",
32763289
"message.success.remove.iprange": "Successfully removed IP Range",
3290+
"message.success.remove.lbconfig": "Successfully removed load balancer config",
32773291
"message.success.remove.logical.router": "Successfully removed Logical Router",
32783292
"message.success.remove.network.policy": "Successfully removed Network Policy",
32793293
"message.success.remove.network.permissions": "Successfully removed Network Permissions",

ui/src/config/section/network.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export default {
7272
name: 'ip.v6.firewall',
7373
component: shallowRef(defineAsyncComponent(() => import('@/views/network/Ipv6FirewallRulesTab.vue'))),
7474
show: (record, route, user) => { return record.type === 'Isolated' && ['IPv6', 'DualStack'].includes(record.internetprotocol) && !('vpcid' in record) && 'listIpv6FirewallRules' in store.getters.apis && (['Admin', 'DomainAdmin'].includes(user.roletype) || record.account === user.account || record.projectid) }
75+
}, {
76+
name: 'lb.config',
77+
component: () => import('@/views/network/LbConfigTab.vue'),
78+
show: (record) => { return record.type === 'Isolated' && !('vpcid' in record) && 'listEgressFirewallRules' in store.getters.apis }
7579
}, {
7680
name: (record) => { return record.type === 'Shared' ? 'ip.addresses' : 'public.ip.addresses' },
7781
component: shallowRef(defineAsyncComponent(() => import('@/views/network/IpAddressesTab.vue'))),

0 commit comments

Comments
 (0)