应用平台 APPSTAGE-参数配置说明:SLB配置(可选)

时间:2024-05-29 10:32:25

SLB配置(可选)

表8 SLB配置

参数名称

参数类型

是否必选

默认值

说明

参数规范

举例

port

int32

必选

null

微服务在SLB上暴露的端口

-

8080

weight

int32

必选

null

微服务在SLB上负载的权重

-

20

timeout

int32

必选

null

微服务调用转发的超时时间

-

20

maxFails

int32

必选

null

微服务调用的失败次数

-

3

targetGroup

object{

name,

loadBalancer

}

必选

""

微服务注册到SLB上的后端服务器组名

  • 用于创建RouteRule,其中的name为必选,对应NuwaRuntime的backendClusterName,其它为可选。
  • 在routes配置的情况下,loadBalancer也属于必选,不配置routes的话,loadBalancer则是可选。
  • loadBalancer当前仅支持配置roundRobin(加权轮询)且不支持修改为其它策略,如需修改可登录SLB管理台修改。

name: chaosmonekey_portal_static

loadBalancer:

strategy: roundRobin

listenerGroupName

string

必选

""

微服务前端关联的SLB Listenser Group实例IaC名称

对应NuwaRuntime中的slbServiceName,长度为[1, 64]

SLB下需要存在这个监听,为空时不会创建RouteRule。

chaos_slb_listener_lhq

routes

array[

location: string]

可选

[]

微服务的路由规则

不推荐使用,请直接使用slb的iac3.0创建。

/fgc/v1

示例:

- name: WiseCloudFGCEventBuilderService_cluster1
  type: WiseCloud::MicroService::NuwaContainer
  properties:    
    bindSlb:
      - port: 8080
        grayStatus: 1
        weight: 20
        maxFails: 3
        timeout: 20
        listenerGroupName: chaos_slb_listener_lhq
        targetGroup:
          name: chaosmonekey_portal_static
          loadBalancer:
            strategy: roundRobin

support.huaweicloud.com/devg-appstage/appstage_06_0045.html