調用DescribeNamespaceScopeSidecarConfig查詢命名空間層級的Sidecar配置設定。
介面說明
調用 DescribeASMSidecarExpectedVersion 可以查詢 ASM 資料面 Sidecar 的期望版本,例如升級 ASM 之前,注入 Sidecar 的版本為 v1.11,然後升級 ASM 到 v1.12,Pod 沒有重啟,Sidecar 的實際版本仍然為 v1.11,但是調用 DescribeASMSidecarExpectedVersion 這個介面將查詢到 Sidecar 版本是 v1.12。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
servicemesh:DescribeNamespaceScopeSidecarConfig |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ServiceMeshId |
string |
是 |
ASM 執行個體 ID。 |
c7120e75a202d4fd8acb028a86b6a**** |
| Namespace |
string |
否 |
命名空間。 |
default |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
響應體。 |
||
| RequestId |
string |
請求 ID。 |
31d3a0f0-07ed-4f6e-9004-1804498c**** |
| ConfigPatches |
object |
命名空間層級配置內容。 |
|
| TerminationDrainDuration |
string |
Sidecar 代理終止等待時間。 |
6s |
| SidecarProxyInitResourceLimit |
object |
Sidecar 代理初始化容器資源限制。 |
|
| ResourceCPULimit |
string |
CPU 資源限制。 |
2000 m |
| ResourceMemoryLimit |
string |
記憶體資源限制。 |
50 Mi |
| SidecarProxyInitResourceRequest |
object |
Sidecar 代理初始化容器資源最低申請額度。 |
|
| ResourceCPURequest |
string |
CPU 資源最低要求。 |
60 m |
| ResourceMemoryRequest |
string |
記憶體資源最低要求。 |
30 Mi |
| SidecarProxyResourceLimit |
object |
Sidecar 代理容器資源限制。 |
|
| ResourceCPULimit |
string |
CPU 資源限制。 |
2000 m |
| ResourceMemoryLimit |
string |
記憶體資源限制。 |
50 Mi |
| SidecarProxyResourceRequest |
object |
Sidecar 代理容器資源最低申請額度。 |
|
| ResourceCPURequest |
string |
CPU 資源最低要求。 |
60 m |
| ResourceMemoryRequest |
string |
記憶體資源限制。 |
30 Mi |
| ExcludeOutboundPorts |
string |
免於經過 Sidecar 代理的出口流量連接埠。 |
81 |
| ExcludeOutboundIPRanges |
string |
免於經過 Sidecar 代理的出口流量 IP 位址。 |
192.168.1.3/31 |
| IncludeOutboundIPRanges |
string |
經過 Sidecar 代理的出口流量 IP 位址。 |
192.168.1.4/31 |
| ExcludeInboundPorts |
string |
免於經過 Sidecar 代理的入口流量連接埠。 |
82 |
| IncludeInboundPorts |
string |
經過 Sidecar 代理的入口流量連接埠。 |
83 |
| IncludeOutboundPorts |
string |
經過 Sidecar 代理的出口流量連接埠。 |
84 |
| IstioDNSProxyEnabled |
boolean |
是否啟用 DNS 代理功能,取值:
|
true |
| LifecycleStr |
string |
Sidecar 代理生命週期 JSON 字串。 |
{"postStart":{"exec":{"command":["pilot-agent","wait"]}},"preStop":{"exec":{"command":["/bin/sh","-c","sleep 15"]}}} |
| Concurrency |
integer |
istio-proxy 並發度設定。 |
2 |
| LogLevel |
string |
日誌等級,取值: |
info |
| HoldApplicationUntilProxyStarts |
boolean |
應用程式啟動前是否等待 istio-proxy 啟動完成,取值:
|
true |
| ProxyStatsMatcher |
object |
用於 Envoy 監控統計的指標。 |
|
| InclusionPrefixes |
array |
Envoy 監控統計的指標首碼列表。 |
|
|
string |
Envoy 監控統計的指標首碼。 |
server |
|
| InclusionSuffixes |
array |
Envoy 監控統計的指標尾碼列表。 |
|
|
string |
Envoy 監控統計的指標尾碼。 |
cluster.outbound |
|
| InclusionRegexps |
array |
Envoy 監控統計的指標Regex列表。 |
|
|
string |
Envoy 監控統計的指標Regex。 |
listener.*.downstream_cx_total |
|
| Tracing |
object |
自訂的鏈路追蹤配置。 |
|
| Sampling |
number |
鏈路追蹤的採樣率。 |
99.8 |
| CustomTags |
object |
鏈路追蹤上報的自訂標籤。其中鍵為自訂鏈路追蹤標籤的鍵,String 類型;值為自訂鏈路追蹤標籤的取值,JSON 物件類型,可以選擇填入以下欄位之一。
|
{"test":{"literal":{"value":"test"}}} |
| MaxPathTagLength |
integer |
鏈路追蹤標籤最大長度限制。 |
10 |
| InterceptionMode |
string |
Sidecar 對入向流量的攔截策略,取值如下:
|
TPROXY |
| ProxyMetadata |
object |
在 Sidecar 代理中額外添加的環境變數,對象中的鍵和值分別代表添加至 Sidecar 代理環境變數的鍵和值。 |
|
|
string |
在 Sidecar 代理中額外添加的環境變數值。 |
"true" |
|
| SidecarProxyInitAckSloResource |
object |
Sidecar 代理初始化容器資源設定(ACK 動態超賣資源形式),當 Pod 帶有 ACK 動態資源超賣標籤 |
|
| Requests |
object |
Sidecar 代理初始化容器資源最低申請額度設定(ACK 動態超賣資源形式)。當 Pod 帶有 ACK 動態資源超賣標籤
|
|
|
string |
Sidecar 代理初始化容器資源最低申請額度值。 |
128Mi |
|
| Limits |
object |
Sidecar 代理初始化容器資源限制設定(ACK 動態超賣資源形式)。當 Pod 帶有 ACK 動態資源超賣標籤
|
|
|
string |
Sidecar 代理初始化容器資源限制值。 |
2048Mi |
|
| SidecarProxyAckSloResource |
object |
Sidecar 代理容器資源設定(ACK 動態超賣資源形式),當 Pod 帶有 ACK 動態資源超賣標籤 |
|
| Requests |
object |
Sidecar 代理容器資源最低申請額度設定(ACK 動態超賣資源形式)。當 Pod 帶有 ACK 動態資源超賣標籤
|
|
|
string |
Sidecar 代理容器資源最低申請額度值。 |
128Mi |
|
| Limits |
object |
Sidecar 代理容器資源限制設定(ACK 動態超賣資源形式)。當 Pod 帶有 ACK 動態資源超賣標籤
|
|
|
string |
Sidecar 代理容器資源限制值。 |
2048Mi |
|
| Privileged |
boolean |
是否在 Sidecar 代理容器的安全上下文中為 Sidecar 代理容器設定為特權,取值:
|
false |
| EnableCoreDump |
boolean |
是否為 Sidecar 代理容器啟用 Core Dump(程式崩潰時轉儲記憶體狀態),取值:
|
false |
| ReadinessInitialDelaySeconds |
integer |
在開始進行 Sidecar 代理容器的就緒性檢查前等待的時間(單位:秒)。 |
2 |
| ReadinessPeriodSeconds |
integer |
對 Sidecar 代理容器進行就緒性檢查時,兩次檢查之間的時間間隔(單位:秒)。 |
3 |
| ReadinessFailureThreshold |
integer |
判斷 Sidecar 代理容器不就緒時所需的就緒性檢查失敗次數閾值。 |
5 |
| SMCConfiguration |
object |
SMC-R 最佳化相關配置。 |
|
| Enabled |
boolean |
是否啟用 SMC-R 最佳化( SMC-R 可以最佳化跨節點通訊效能,依賴 Alibaba Cloud Linux 3 以及節點 eRDMA 網路裝置) |
true |
| RuntimeValues |
object |
指定 Sidecar 代理中 Envoy 的運行時參數。 |
|
|
string |
Envoy 運行時參數取值。 |
"65536" |
|
| ScaledSidecarResource |
object |
按比例對 sidecar 資源進行動態配置。 |
|
| ResourceCalculationStrategy |
string |
sidecar 資源計算策略。 |
|
| ContainerRef |
string |
計算 sidecar 資源的基準容器。 |
|
| ResourcePercentage |
integer |
sidecar 資源比例。 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "31d3a0f0-07ed-4f6e-9004-1804498c****",
"ConfigPatches": {
"TerminationDrainDuration": "6s",
"SidecarProxyInitResourceLimit": {
"ResourceCPULimit": "2000 m",
"ResourceMemoryLimit": "50 Mi"
},
"SidecarProxyInitResourceRequest": {
"ResourceCPURequest": "60 m",
"ResourceMemoryRequest": "30 Mi"
},
"SidecarProxyResourceLimit": {
"ResourceCPULimit": "2000 m",
"ResourceMemoryLimit": "50 Mi"
},
"SidecarProxyResourceRequest": {
"ResourceCPURequest": "60 m",
"ResourceMemoryRequest": "30 Mi"
},
"ExcludeOutboundPorts": "81",
"ExcludeOutboundIPRanges": "192.168.1.3/31",
"IncludeOutboundIPRanges": "192.168.1.4/31",
"ExcludeInboundPorts": "82",
"IncludeInboundPorts": "83",
"IncludeOutboundPorts": "84",
"IstioDNSProxyEnabled": true,
"LifecycleStr": "{\"postStart\":{\"exec\":{\"command\":[\"pilot-agent\",\"wait\"]}},\"preStop\":{\"exec\":{\"command\":[\"/bin/sh\",\"-c\",\"sleep 15\"]}}}",
"Concurrency": 2,
"LogLevel": "info",
"HoldApplicationUntilProxyStarts": true,
"ProxyStatsMatcher": {
"InclusionPrefixes": [
"server"
],
"InclusionSuffixes": [
"cluster.outbound"
],
"InclusionRegexps": [
"listener.*.downstream_cx_total"
]
},
"Tracing": {
"Sampling": 99.8,
"CustomTags": {
"test": {
"literal": {
"value": "test"
}
}
},
"MaxPathTagLength": 10
},
"InterceptionMode": "TPROXY",
"ProxyMetadata": {
"key": "\"true\""
},
"SidecarProxyInitAckSloResource": {
"Requests": {
"key": "128Mi"
},
"Limits": {
"key": "2048Mi"
}
},
"SidecarProxyAckSloResource": {
"Requests": {
"key": "128Mi"
},
"Limits": {
"key": "2048Mi"
}
},
"Privileged": false,
"EnableCoreDump": false,
"ReadinessInitialDelaySeconds": 2,
"ReadinessPeriodSeconds": 3,
"ReadinessFailureThreshold": 5,
"SMCConfiguration": {
"Enabled": true
},
"RuntimeValues": {
"key": "\"65536\""
},
"ScaledSidecarResource": {
"ResourceCalculationStrategy": "",
"ContainerRef": "",
"ResourcePercentage": 0
}
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。