mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.3.0 -> release/2.4.0
* commit '1eec7ce09428572dd748d58f025f4055021fe6e6':
lb: 改正health_check_{domain,path}校验
This commit is contained in:
@@ -237,8 +237,8 @@ func (man *SLoadbalancerListenerManager) ValidateCreateData(ctx context.Context,
|
||||
"health_check": validators.NewStringChoicesValidator("health_check", LB_BOOL_VALUES).Default(LB_BOOL_ON),
|
||||
"health_check_type": checkTypeV,
|
||||
|
||||
"health_check_domain": validators.NewDomainNameValidator("domain").AllowEmpty(true).Default(""),
|
||||
"health_check_path": validators.NewURLPathValidator("path").Default(""),
|
||||
"health_check_domain": validators.NewDomainNameValidator("health_check_domain").AllowEmpty(true).Default(""),
|
||||
"health_check_path": validators.NewURLPathValidator("health_check_path").Default(""),
|
||||
"health_check_http_code": validators.NewStringMultiChoicesValidator("health_check_http_code", LB_HEALTH_CHECK_HTTP_CODES).Sep(",").Default(LB_HEALTH_CHECK_HTTP_CODE_DEFAULT),
|
||||
|
||||
"health_check_rise": validators.NewRangeValidator("health_check_rise", 1, 1000).Default(3),
|
||||
@@ -324,8 +324,8 @@ func (lblis *SLoadbalancerListener) ValidateUpdateData(ctx context.Context, user
|
||||
"health_check": validators.NewStringChoicesValidator("health_check", LB_BOOL_VALUES),
|
||||
"health_check_type": LoadbalancerListenerManager.checkTypeV(lblis.ListenerType),
|
||||
|
||||
"health_check_domain": validators.NewDomainNameValidator("domain").AllowEmpty(true),
|
||||
"health_check_path": validators.NewURLPathValidator("path"),
|
||||
"health_check_domain": validators.NewDomainNameValidator("health_check_domain").AllowEmpty(true),
|
||||
"health_check_path": validators.NewURLPathValidator("health_check_path"),
|
||||
"health_check_http_code": validators.NewStringMultiChoicesValidator("health_check_http_code", LB_HEALTH_CHECK_HTTP_CODES).Sep(","),
|
||||
|
||||
"health_check_rise": validators.NewRangeValidator("health_check_rise", 1, 1000),
|
||||
|
||||
Reference in New Issue
Block a user