- Service Control
- 参数
- RuntimeConfig
- GcpServiceSetting
- Quota
Service Control
servicecontroler 适配器能够向 Google Service Control 发送日志和指标。
该适配器支持 servicecontrolreport、quota 以及 apikey 模板。
配置样例:
apiVersion: "config.istio.io/v1alpha2"kind: servicecontrolmetadata:name: testhandlernamespace: istio-systemspec:runtime_config:check_cache_size: 200check_result_expiration: 60scredential_path: "/path/to/token.json"service_configs:- mesh_service_name: "echo.local.svc"google_service_name: "echo.endpoints.cloud.goog"quotas:- name: ratelimit.quota.istio-systemgoogle_quota_metric_name: read-requestsexpiration: 1m
参数
| 字段 | 类型 | 描述 |
|---|---|---|
runtime_config | RuntimeConfig | |
credential_path | string | 一个 JSON Token 文件,一般用 Kubernetes Secret 的形式加载到 Pod 里 |
service_configs | GcpServiceSetting |
RuntimeConfig
适配器的运行时配置参数。
| 字段 | 类型 | 描述 |
|---|---|---|
checkCacheSize | int32 | |
checkResultExpiration | google.protobuf.Duration |
GcpServiceSetting
GCP 服务的适配设置。
| 字段 | 类型 | 描述 |
|---|---|---|
mesh_service_name | string | 网格中的服务名称,用于匹配 destination.service 属性 |
google_service_name | string | GCP 服务的完全限定名 |
quotas | Quota[] | 配额设置 |
Quota
| 字段 | 类型 | 描述 |
|---|---|---|
name | string | Istio 配额名称 |
google_quota_metric_name | string | Google 配额指标名称 |
expiration | google.protobuf.Duration | 配额 Token 的有效期 |
