mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
lb: support accessing backend with tls
This commit is contained in:
@@ -72,6 +72,7 @@ type SLoadbalancerBackend struct {
|
||||
Port int `nullable:"false" list:"user" create:"required" update:"user"`
|
||||
|
||||
SendProxy string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user" default:"off"`
|
||||
Ssl string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"user" default:"off"`
|
||||
}
|
||||
|
||||
func (man *SLoadbalancerBackendManager) pendingDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery) {
|
||||
|
||||
@@ -169,6 +169,7 @@ func (self *SKVMRegionDriver) ValidateCreateLoadbalancerBackendData(ctx context.
|
||||
"weight": validators.NewRangeValidator("weight", 1, 256).Default(1),
|
||||
"port": validators.NewPortValidator("port"),
|
||||
"send_proxy": validators.NewStringChoicesValidator("send_proxy", api.LB_SENDPROXY_CHOICES).Default(api.LB_SENDPROXY_OFF),
|
||||
"ssl": validators.NewStringChoicesValidator("ssl", api.LB_BOOL_VALUES).Default(api.LB_BOOL_OFF),
|
||||
}
|
||||
|
||||
if err := RunValidators(keyV, data, false); err != nil {
|
||||
@@ -270,6 +271,7 @@ func (self *SKVMRegionDriver) ValidateUpdateLoadbalancerBackendData(ctx context.
|
||||
"weight": validators.NewRangeValidator("weight", 1, 256),
|
||||
"port": validators.NewPortValidator("port"),
|
||||
"send_proxy": validators.NewStringChoicesValidator("send_proxy", api.LB_SENDPROXY_CHOICES),
|
||||
"ssl": validators.NewStringChoicesValidator("ssl", api.LB_BOOL_VALUES),
|
||||
}
|
||||
|
||||
if err := RunValidators(keyV, data, true); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user