全部產品
Search
文件中心

Alibaba Cloud Service Mesh:DescribeNamespaceScopeSidecarConfig - 查詢Sidecar配置

更新時間:Feb 06, 2026

調用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程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

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:啟用 DNS 代理功能。

  • false:不啟用 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

日誌等級,取值:infodebugtraceerror

info

HoldApplicationUntilProxyStarts

boolean

應用程式啟動前是否等待 istio-proxy 啟動完成,取值:

  • true:應用程式啟動前等待 istio-proxy 啟動完成。

  • false:應用程式啟動前不等待 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 物件類型,可以選擇填入以下欄位之一。

  • literal:鏈路追蹤標籤值將取固定值,JSON 物件類型,其中必須包含value欄位,指定固定的字面量值,例如{"value":"test"}

  • header:鏈路追蹤標籤值將取指定的要求標頭,JSON 物件類型,其中必須包含name欄位和defaultValue欄位,指定要求標頭的名稱和取不到時的預設值,例如{"name":"test","defaultValue":"test"}

  • environment:鏈路追蹤標籤值將取指定的環境變數,JSON 物件類型,其中必須包含name欄位和defaultValue欄位,指定環境變數的名稱和取不到時的預設值,例如{"name":"test","defaultValue":"test"}

{"test":{"literal":{"value":"test"}}}

MaxPathTagLength

integer

鏈路追蹤標籤最大長度限制。

10

InterceptionMode

string

Sidecar 對入向流量的攔截策略,取值如下:

  • REDIRECT:預設的攔截策略,Sidecar 將使用重新導向方式攔截入向流量。

  • TPROXY:透明代理攔截策略,Sidecar 將以透明代理的方式攔截入向流量。

TPROXY

ProxyMetadata

object

在 Sidecar 代理中額外添加的環境變數,對象中的鍵和值分別代表添加至 Sidecar 代理環境變數的鍵和值。

string

在 Sidecar 代理中額外添加的環境變數值。

"true"

SidecarProxyInitAckSloResource

object

Sidecar 代理初始化容器資源設定(ACK 動態超賣資源形式),當 Pod 帶有 ACK 動態資源超賣標籤labelkoordinator.sh/qosClass時,使用此值設定 Sidecar 代理初始化容器資源。

Requests

object

Sidecar 代理初始化容器資源最低申請額度設定(ACK 動態超賣資源形式)。當 Pod 帶有 ACK 動態資源超賣標籤labelkoordinator.sh/qosClass時,使用此值設定 Sidecar 代理初始化容器資源最低申請額度。 對象中可能包含兩種鍵,對應兩種類型的資源:

  • kubernetes.io/batch-cpu:ACK 超賣類型 CPU 資源,單位為千分之一核。

  • kubernetes.io/batch-memory:ACK 超賣類型記憶體資源。

string

Sidecar 代理初始化容器資源最低申請額度值。

128Mi

Limits

object

Sidecar 代理初始化容器資源限制設定(ACK 動態超賣資源形式)。當 Pod 帶有 ACK 動態資源超賣標籤labelkoordinator.sh/qosClass時,使用此值設定 Sidecar 代理初始化容器資源限制。 對象中可能包含兩種鍵,對應兩種類型的資源:

  • kubernetes.io/batch-cpu:ACK 超賣類型 CPU 資源,單位為千分之一核。

  • kubernetes.io/batch-memory:ACK 超賣類型記憶體資源。

string

Sidecar 代理初始化容器資源限制值。

2048Mi

SidecarProxyAckSloResource

object

Sidecar 代理容器資源設定(ACK 動態超賣資源形式),當 Pod 帶有 ACK 動態資源超賣標籤labelkoordinator.sh/qosClass時,使用此值設定 Sidecar 代理容器資源。

Requests

object

Sidecar 代理容器資源最低申請額度設定(ACK 動態超賣資源形式)。當 Pod 帶有 ACK 動態資源超賣標籤labelkoordinator.sh/qosClass時,使用此值設定 Sidecar 代理容器資源最低申請額度。 對象中可能包含兩種鍵,對應兩種類型的資源:

  • kubernetes.io/batch-cpu:ACK 超賣類型 CPU 資源,單位為千分之一核。

  • kubernetes.io/batch-memory:ACK 超賣類型記憶體資源。

string

Sidecar 代理容器資源最低申請額度值。

128Mi

Limits

object

Sidecar 代理容器資源限制設定(ACK 動態超賣資源形式)。當 Pod 帶有 ACK 動態資源超賣標籤labelkoordinator.sh/qosClass時,使用此值設定 Sidecar 代理容器資源限制。 對象中可能包含兩種鍵,對應兩種類型的資源:

  • kubernetes.io/batch-cpu:ACK 超賣類型 CPU 資源,單位為千分之一核。

  • kubernetes.io/batch-memory:ACK 超賣類型記憶體資源。

string

Sidecar 代理容器資源限制值。

2048Mi

Privileged

boolean

是否在 Sidecar 代理容器的安全上下文中為 Sidecar 代理容器設定為特權,取值:

  • true:Sidecar 代理容器具有特權。

  • false:Sidecar 代理容器沒有特權。

false

EnableCoreDump

boolean

是否為 Sidecar 代理容器啟用 Core Dump(程式崩潰時轉儲記憶體狀態),取值:

  • true:為 Sidecar 代理容器啟用 Core Dump。

  • false:不為 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
    }
  }
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情