Microsoft.AppPlatform Spring/apps/deployments
Bicep 資源定義
Spring/apps/deployments 資源類型可以使用目標作業進行部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄。
資源格式
若要建立 Microsoft.AppPlatform/Spring/apps/deployments 資源,請將下列 Bicep 新增至您的範本。
resource symbolicname 'Microsoft.AppPlatform/Spring/apps/deployments@2023-03-01-preview' = {
name: 'string'
sku: {
capacity: int
name: 'string'
tier: 'string'
}
parent: resourceSymbolicName
properties: {
active: bool
deploymentSettings: {
addonConfigs: {}
containerProbeSettings: {
disableProbe: bool
}
environmentVariables: {}
livenessProbe: {
disableProbe: bool
failureThreshold: int
initialDelaySeconds: int
periodSeconds: int
probeAction: {
type: 'string'
// For remaining properties, see ProbeAction objects
}
successThreshold: int
timeoutSeconds: int
}
readinessProbe: {
disableProbe: bool
failureThreshold: int
initialDelaySeconds: int
periodSeconds: int
probeAction: {
type: 'string'
// For remaining properties, see ProbeAction objects
}
successThreshold: int
timeoutSeconds: int
}
resourceRequests: {
cpu: 'string'
memory: 'string'
}
scale: {
maxReplicas: int
minReplicas: int
rules: [
{
azureQueue: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
queueLength: int
queueName: 'string'
}
custom: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
metadata: {}
type: 'string'
}
http: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
metadata: {}
}
name: 'string'
tcp: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
metadata: {}
}
}
]
}
startupProbe: {
disableProbe: bool
failureThreshold: int
initialDelaySeconds: int
periodSeconds: int
probeAction: {
type: 'string'
// For remaining properties, see ProbeAction objects
}
successThreshold: int
timeoutSeconds: int
}
terminationGracePeriodSeconds: int
}
source: {
version: 'string'
type: 'string'
// For remaining properties, see UserSourceInfo objects
}
}
}
ProbeAction 物件
設定 type 屬性以指定物件的類型。
針對 ExecAction,請使用:
type: 'ExecAction'
command: [
'string'
]
針對 HTTPGetAction,請使用:
type: 'HTTPGetAction'
path: 'string'
scheme: 'string'
針對 TCPSocketAction,請使用:
type: 'TCPSocketAction'
UserSourceInfo 物件
設定 type 屬性以指定物件的類型。
針對 BuildResult,請使用:
type: 'BuildResult'
buildResultId: 'string'
針對 容器,請使用:
type: 'Container'
customContainer: {
args: [
'string'
]
command: [
'string'
]
containerImage: 'string'
imageRegistryCredential: {
password: 'string'
username: 'string'
}
languageFramework: 'string'
server: 'string'
}
針對 Jar,請使用:
type: 'Jar'
jvmOptions: 'string'
relativePath: 'string'
runtimeVersion: 'string'
針對 NetCoreZip,請使用:
type: 'NetCoreZip'
netCoreMainEntryPath: 'string'
relativePath: 'string'
runtimeVersion: 'string'
針對 [來源],請使用:
type: 'Source'
artifactSelector: 'string'
relativePath: 'string'
runtimeVersion: 'string'
屬性值
Spring/apps/deployments
名稱 | 描述 | 值 |
---|---|---|
NAME | 資源名稱 瞭解如何在 Bicep中設定子資源的名稱和類型。 |
字串 (必要) |
sku | 部署資源的 SKU | Sku |
父系 (parent) | 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源之外宣告子資源時,才需要新增這個屬性。 如需詳細資訊,請參閱 父資源外部的子資源。 |
類型資源的符號名稱: 應用程式 |
properties | 部署資源的屬性 | DeploymentResourceProperties |
DeploymentResourceProperties
名稱 | 描述 | 值 |
---|---|---|
作用中 | 指出部署是否為使用中 | bool |
deploymentSettings | 部署的部署設定 | DeploymentSettings |
source | 已上傳部署的來源資訊。 | UserSourceInfo |
DeploymentSettings
名稱 | 描述 | 值 |
---|---|---|
addonConfigs | 附加元件的集合 | 物件 (object) |
containerProbeSettings | 容器即時性和整備探查設定 | ContainerProbeSettings |
environmentVariables | 環境變數的集合 | 物件 (object) |
livenessProbe | 應用程式實例即時的定期探查。 如果探查失敗,應用程式實例將會重新開機。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
探查 |
readinessProbe | 定期探查應用程式實例服務整備程度。 如果探查失敗,應用程式實例將會從服務端點中移除。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
探查 |
resourceRequests | 所需 CPU 和記憶體的要求資源數量。 建議使用此欄位來代表必要的 CPU 和記憶體,舊欄位 cpu 和 memoryInGB 稍後將會淘汰。 | ResourceRequests |
級別 | 調整 Azure Spring Apps 應用程式實例的屬性。 | 縮放比例 |
startupProbe | StartupProbe 表示應用程式實例已成功初始化。 如果指定,則不會執行其他探查,直到順利完成為止。 如果此探查失敗,Pod 將會重新開機,就像 livenessProbe 失敗一樣。 這可用來在應用程式實例生命週期的開頭提供不同的探查參數,而當載入資料或暖快取時可能需要很長的時間,而不是在穩定狀態作業期間。 這無法更新。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
探查 |
terminationGracePeriodSeconds | 應用程式實例必須正常終止的選擇性持續時間,以秒為單位。 刪除要求可能會減少。 值必須是非負整數。 零值表示透過終止訊號立即停止, (沒有機會關閉) 。 如果此值為 nil,則會改用預設寬限期。 寬限期是在應用程式實例中執行的進程傳送終止訊號,以及強制終止進程終止訊號後,以秒為單位的持續時間。 將此值設為超過程序的預期清除時間。 預設值為 90 秒。 | int |
ContainerProbeSettings
名稱 | 描述 | 值 |
---|---|---|
disableProbe | 指出是否停用即時性和整備探查 | bool |
探查
名稱 | 描述 | 值 |
---|---|---|
disableProbe | 指出探查是否已停用。 | bool (必要) |
failureThreshold | 探查在成功之後視為失敗的最小連續失敗。 最小值為 1。 | int |
initialDelaySeconds | 啟動應用程式實例之後的秒數,才會起始探查。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
int |
periodSeconds | 執行探查的頻率 (以秒為單位)。 最小值為 1。 | int |
probeAction | 探查的動作。 | ProbeAction |
successThreshold | 探查在失敗後視為成功的最小連續成功。 必須是 1,才能進行即時和啟動。 最小值為 1。 | int |
timeoutSeconds | 探查逾時後的秒數。最小值為 1。 | int |
ProbeAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 設定物件類型 | ExecAction HTTPGetAction 需要 TCPSocketAction () |
ExecAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 執行健康情況檢查所要採取的動作類型。 | 必要) ('ExecAction' |
命令 | 命令是在容器內執行的命令列,命令的工作目錄是容器檔案系統中的根目錄 ('/') 。 命令不會在殼層內執行,因此傳統殼層指令 ('、' 等) 將無法運作。 若要使用殼層,您必須明確呼叫該殼層。 結束狀態為 0 會被視為即時/狀況良好,且非零狀況不良。 | string[] |
HttpGetAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 執行健康情況檢查所要採取的動作類型。 | 必要 ('HTTPGetAction') |
path | HTTP 伺服器上存取的路徑。 | 字串 |
scheme | 用於連線至主機的配置。 預設為 HTTP。 可能的列舉值: - "HTTP" 表示所使用的配置將會是 http:// - "HTTPS" 表示所使用的配置將會是 https:// |
'HTTP' 'HTTPS' |
TCPSocketAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 執行健康情況檢查所要採取的動作類型。 | 'TCPSocketAction' (必要) |
ResourceRequests
名稱 | 描述 | 值 |
---|---|---|
cpu | 必要的 CPU。 1 個核心可以以 1 或 1000m 表示。 這應該是基本層的 500 公分或 1,標準層應為 {500m、1、2、3、4}。 | 字串 |
記憶體 | 必要的記憶體。 1 GB 可由 1Gi 或 1024Mi 表示。 這應該是基本層的 {512Mi、1Gi、2Gi},以及標準層的 {512Mi、1Gi、2Gi、...、8Gi}。 | 字串 |
調整
名稱 | 描述 | 值 |
---|---|---|
maxReplicas | 選擇性。 容器複本的數目上限。 如果未設定,則預設為 10。 | int |
minReplicas | 選擇性。 容器複本數目下限。 | int |
規則 | 調整規則。 | ScaleRule[] |
ScaleRule
名稱 | 描述 | 值 |
---|---|---|
azureQueue | 以 Azure 佇列為基礎的調整。 | QueueScaleRule |
自訂 | 自訂縮放規則。 | CustomScaleRule |
http | HTTP 要求型調整。 | HttpScaleRule |
NAME | 調整規則名稱 | 字串 |
tcp | Tcp 要求型調整。 | TcpScaleRule |
QueueScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | 佇列調整規則的驗證秘密。 | ScaleRuleAuth[] |
queueLength | 佇列長度。 | int |
queueName | 佇列名稱。 | 字串 |
ScaleRuleAuth
名稱 | 描述 | 值 |
---|---|---|
secretRef | 要從中提取驗證參數的 Azure Spring Apps 應用程式實例秘密名稱。 | 字串 |
triggerParameter | 使用秘密的觸發程式參數 | 字串 |
CustomScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | 自訂調整規則的驗證秘密。 | ScaleRuleAuth[] |
中繼資料 | 描述自訂縮放規則的中繼資料屬性。 | 物件 (object) |
類型 | 自訂調整規則的類型 例如:azure-servicebus、redis 等。 |
字串 |
HttpScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | 自訂調整規則的驗證秘密。 | ScaleRuleAuth[] |
中繼資料 | 用來描述 HTTP 縮放規則的中繼資料屬性。 | 物件 (object) |
TcpScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | tcp 調整規則的驗證秘密。 | ScaleRuleAuth[] |
中繼資料 | 描述 tcp 縮放規則的中繼資料屬性。 | 物件 (object) |
UserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
version | 來源的版本 | 字串 |
type | 設定物件類型 | BuildResult 容器 Jar NetCoreZip 來源 (必要) |
BuildResultUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 'BuildResult' (必要) |
buildResultId | 相同 Spring 實例下現有成功組建結果的資源識別碼。 | 字串 |
CustomContainerUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 'Container' (必要) |
customContainer | 自訂容器承載 | CustomContainer |
CustomContainer
名稱 | 描述 | 值 |
---|---|---|
args | 進入點的引數。 如果未提供,則會使用 Docker 映射的 CMD。 | string[] |
命令 | Entrypoint 陣列。 未在殼層內執行。 如果未提供此專案,則會使用 Docker 映射的 ENTRYPOINT。 | string[] |
containerImage | 自訂容器的容器映射。 這應該以 {repository}:{tag} 的形式呈現,而不需登錄的伺服器名稱 | 字串 |
imageRegistryCredential | 映射登錄的認證 | ImageRegistryCredential |
languageFramework | 上傳之容器映射的語言架構 | 字串 |
伺服器 | 包含容器映射的登錄名稱 | 字串 |
ImageRegistryCredential
名稱 | 描述 | 值 |
---|---|---|
密碼 | 映射登錄認證的密碼 | 字串 |
username | 映射登錄認證的使用者名稱 | 字串 |
JarUploadedUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 'Jar' (必要) |
jvmOptions | JVM 參數 | 字串 |
relativePath | 儲存來源之儲存體的相對路徑 | 字串 |
runtimeVersion | Jar 檔案的執行時間版本 | 字串 |
NetCoreZipUploadedUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 'NetCoreZip' (必要) |
netCoreMainEntryPath | 相對於 zip 根目錄的 .NET 可執行檔路徑 | 字串 |
relativePath | 儲存來源之儲存體的相對路徑 | 字串 |
runtimeVersion | .Net 檔案的執行時間版本 | 字串 |
SourceUploadedUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 必要) 'Source' ( |
artifactSelector | 要用於多模組專案部署之成品的選取器。 這應該是 目的模組/專案的相對路徑。 |
字串 |
relativePath | 儲存來源之儲存體的相對路徑 | 字串 |
runtimeVersion | 來源檔案的執行時間版本 | 字串 |
SKU
名稱 | 描述 | 值 |
---|---|---|
處理能力 | 目標資源的目前容量 | int |
NAME | Sku 的名稱 | 字串 |
tier | Sku 的階層 | 字串 |
ARM 範本資源定義
Spring/apps/deployments 資源類型可以使用目標作業進行部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.AppPlatform/Spring/apps/deployments 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.AppPlatform/Spring/apps/deployments",
"apiVersion": "2023-03-01-preview",
"name": "string",
"sku": {
"capacity": "int",
"name": "string",
"tier": "string"
},
"properties": {
"active": "bool",
"deploymentSettings": {
"addonConfigs": {},
"containerProbeSettings": {
"disableProbe": "bool"
},
"environmentVariables": {},
"livenessProbe": {
"disableProbe": "bool",
"failureThreshold": "int",
"initialDelaySeconds": "int",
"periodSeconds": "int",
"probeAction": {
"type": "string"
// For remaining properties, see ProbeAction objects
},
"successThreshold": "int",
"timeoutSeconds": "int"
},
"readinessProbe": {
"disableProbe": "bool",
"failureThreshold": "int",
"initialDelaySeconds": "int",
"periodSeconds": "int",
"probeAction": {
"type": "string"
// For remaining properties, see ProbeAction objects
},
"successThreshold": "int",
"timeoutSeconds": "int"
},
"resourceRequests": {
"cpu": "string",
"memory": "string"
},
"scale": {
"maxReplicas": "int",
"minReplicas": "int",
"rules": [
{
"azureQueue": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"queueLength": "int",
"queueName": "string"
},
"custom": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"metadata": {},
"type": "string"
},
"http": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"metadata": {}
},
"name": "string",
"tcp": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"metadata": {}
}
}
]
},
"startupProbe": {
"disableProbe": "bool",
"failureThreshold": "int",
"initialDelaySeconds": "int",
"periodSeconds": "int",
"probeAction": {
"type": "string"
// For remaining properties, see ProbeAction objects
},
"successThreshold": "int",
"timeoutSeconds": "int"
},
"terminationGracePeriodSeconds": "int"
},
"source": {
"version": "string",
"type": "string"
// For remaining properties, see UserSourceInfo objects
}
}
}
ProbeAction 物件
設定 type 屬性以指定物件的類型。
針對 ExecAction,請使用:
"type": "ExecAction",
"command": [ "string" ]
針對 HTTPGetAction,請使用:
"type": "HTTPGetAction",
"path": "string",
"scheme": "string"
針對 TCPSocketAction,請使用:
"type": "TCPSocketAction"
UserSourceInfo 物件
設定 type 屬性以指定物件的類型。
針對 BuildResult,請使用:
"type": "BuildResult",
"buildResultId": "string"
針對 容器,請使用:
"type": "Container",
"customContainer": {
"args": [ "string" ],
"command": [ "string" ],
"containerImage": "string",
"imageRegistryCredential": {
"password": "string",
"username": "string"
},
"languageFramework": "string",
"server": "string"
}
針對 Jar,請使用:
"type": "Jar",
"jvmOptions": "string",
"relativePath": "string",
"runtimeVersion": "string"
針對 NetCoreZip,請使用:
"type": "NetCoreZip",
"netCoreMainEntryPath": "string",
"relativePath": "string",
"runtimeVersion": "string"
針對 [來源],請使用:
"type": "Source",
"artifactSelector": "string",
"relativePath": "string",
"runtimeVersion": "string"
屬性值
Spring/apps/deployments
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | 'Microsoft.AppPlatform/Spring/apps/deployments' |
apiVersion | 資源 API 版本 | '2023-03-01-preview' |
NAME | 資源名稱 瞭解如何在 JSON ARM 範本中設定子資源的名稱和類型。 |
需要字串 () |
sku | 部署資源的 SKU | Sku |
properties | 部署資源的屬性 | DeploymentResourceProperties |
DeploymentResourceProperties
名稱 | 描述 | 值 |
---|---|---|
作用中 | 指出部署是否為作用中 | bool |
deploymentSettings | 部署的部署設定 | DeploymentSettings |
source | 已上傳部署的來源資訊。 | UserSourceInfo |
DeploymentSettings
名稱 | 描述 | 值 |
---|---|---|
addonConfigs | 附加元件的集合 | 物件 (object) |
containerProbeSettings | 容器即時性和整備探查設定 | ContainerProbeSettings |
environmentVariables | 環境變數的集合 | 物件 (object) |
livenessProbe | 應用程式實例即時的定期探查。 如果探查失敗,應用程式實例將會重新開機。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
探查 |
readinessProbe | 定期探查應用程式實例服務整備程度。 如果探查失敗,應用程式實例將會從服務端點中移除。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
探查 |
resourceRequests | 所需 CPU 和記憶體的要求資源數量。 建議使用此欄位來代表必要的 CPU 和記憶體,舊欄位 cpu 和 memoryInGB 稍後將會淘汰。 | ResourceRequests |
級別 | 調整 Azure Spring Apps 應用程式實例的屬性。 | 縮放比例 |
startupProbe | StartupProbe 表示應用程式實例已成功初始化。 如果指定,則不會執行其他探查,直到順利完成為止。 如果此探查失敗,Pod 將會重新開機,就像 livenessProbe 失敗一樣。 這可用來在應用程式實例生命週期的開頭提供不同的探查參數,而當載入資料或暖快取時可能需要很長的時間,而不是在穩定狀態作業期間。 這無法更新。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
探查 |
terminationGracePeriodSeconds | 應用程式實例必須正常終止的選擇性持續時間,以秒為單位。 刪除要求可能會減少。 值必須是非負整數。 零值表示透過終止訊號立即停止, (沒有機會關閉) 。 如果此值為 nil,則會改用預設寬限期。 寬限期是在應用程式實例中執行的進程傳送終止訊號,以及強制終止進程終止訊號後,以秒為單位的持續時間。 將此值設為超過程序的預期清除時間。 預設值為 90 秒。 | int |
ContainerProbeSettings
名稱 | 描述 | 值 |
---|---|---|
disableProbe | 指出是否停用即時性和整備探查 | bool |
探查
名稱 | 描述 | 值 |
---|---|---|
disableProbe | 指出探查是否已停用。 | bool (必要) |
failureThreshold | 探查在成功之後視為失敗的最小連續失敗。 最小值為 1。 | int |
initialDelaySeconds | 啟動應用程式實例之後的秒數,才會起始探查。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
int |
periodSeconds | 執行探查的頻率 (以秒為單位)。 最小值為 1。 | int |
probeAction | 探查的動作。 | ProbeAction |
successThreshold | 探查在失敗後視為成功的最小連續成功。 必須是 1,才能進行即時和啟動。 最小值為 1。 | int |
timeoutSeconds | 探查逾時後的秒數。最小值為 1。 | int |
ProbeAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 設定物件類型 | ExecAction HTTPGetAction 需要 TCPSocketAction () |
ExecAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 執行健康情況檢查所要採取的動作類型。 | 必要) ('ExecAction' |
命令 | 命令是在容器內執行的命令列,命令的工作目錄是容器檔案系統中的根目錄 ('/') 。 命令不會在殼層內執行,因此傳統殼層指令 ('、' 等) 將無法運作。 若要使用殼層,您必須明確呼叫該殼層。 結束狀態為 0 會被視為即時/狀況良好,且非零狀況不良。 | string[] |
HttpGetAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 執行健康情況檢查所要採取的動作類型。 | 必要 ('HTTPGetAction') |
path | HTTP 伺服器上存取的路徑。 | 字串 |
scheme | 用於連線至主機的配置。 預設為 HTTP。 可能的列舉值: - "HTTP" 表示所使用的配置將會是 http:// - "HTTPS" 表示所使用的配置將會是 https:// |
'HTTP' 'HTTPS' |
TCPSocketAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 執行健康情況檢查所要採取的動作類型。 | 必要 ('TCPSocketAction') |
ResourceRequests
名稱 | 描述 | 值 |
---|---|---|
cpu | 必要的 CPU。 1 核心可以以 1 或 1000m 表示。 這應該是基本層的 500m 或 1,而標準層則為 {500m、1、2、3、4}。 | 字串 |
記憶體 | 必要的記憶體。 1 GB 可由 1Gi 或 1024Mi 表示。 這應該是標準層的 {512Mi、1Gi、2Gi} 和 {512Mi、1Gi、2Gi、...、8Gi}。 | 字串 |
調整
名稱 | 描述 | 值 |
---|---|---|
maxReplicas | 選擇性。 容器複本的數目上限。 如果未設定,則預設為 10。 | int |
minReplicas | 選擇性。 容器複本數目下限。 | int |
規則 | 調整規則。 | ScaleRule[] |
ScaleRule
名稱 | 描述 | 值 |
---|---|---|
azureQueue | 以 Azure 佇列為基礎的調整。 | QueueScaleRule |
自訂 | 自訂縮放規則。 | CustomScaleRule |
http | HTTP 要求型調整。 | HttpScaleRule |
NAME | 調整規則名稱 | 字串 |
tcp | Tcp 要求型調整。 | TcpScaleRule |
QueueScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | 佇列調整規則的驗證秘密。 | ScaleRuleAuth[] |
queueLength | 佇列長度。 | int |
queueName | 佇列名稱。 | 字串 |
ScaleRuleAuth
名稱 | 描述 | 值 |
---|---|---|
secretRef | 要從中提取驗證參數的 Azure Spring Apps 應用程式實例秘密名稱。 | 字串 |
triggerParameter | 使用秘密的觸發程式參數 | 字串 |
CustomScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | 自訂調整規則的驗證秘密。 | ScaleRuleAuth[] |
中繼資料 | 描述自訂縮放規則的中繼資料屬性。 | 物件 (object) |
類型 | 自訂縮放規則的類型 例如:azure-servicebus、redis 等。 |
字串 |
HttpScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | 自訂調整規則的驗證秘密。 | ScaleRuleAuth[] |
中繼資料 | 描述 HTTP 縮放規則的中繼資料屬性。 | 物件 (object) |
TcpScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | tcp 調整規則的驗證秘密。 | ScaleRuleAuth[] |
中繼資料 | 描述 tcp 縮放規則的中繼資料屬性。 | 物件 (object) |
UserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
version | 來源的版本 | 字串 |
type | 設定物件類型 | BuildResult 容器 Jar NetCoreZip 來源 (必要) |
BuildResultUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 'BuildResult' (必要) |
buildResultId | 相同 Spring 實例下現有成功組建結果的資源識別碼。 | 字串 |
CustomContainerUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 'Container' (必要) |
customContainer | 自訂容器承載 | CustomContainer |
CustomContainer
名稱 | 描述 | 值 |
---|---|---|
args | 進入點的引數。 如果未提供,則會使用 Docker 映射的 CMD。 | string[] |
命令 | Entrypoint 陣列。 未在殼層內執行。 如果未提供此專案,則會使用 Docker 映射的 ENTRYPOINT。 | string[] |
containerImage | 自訂容器的容器映射。 這應該以 {repository}:{tag} 的形式呈現,而不需登錄的伺服器名稱 | 字串 |
imageRegistryCredential | 映射登錄的認證 | ImageRegistryCredential |
languageFramework | 上傳之容器映射的語言架構 | 字串 |
伺服器 | 包含容器映射的登錄名稱 | 字串 |
ImageRegistryCredential
名稱 | 描述 | 值 |
---|---|---|
密碼 | 映射登錄認證的密碼 | 字串 |
username | 映射登錄認證的使用者名稱 | 字串 |
JarUploadedUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 需要 'Jar' () |
jvmOptions | JVM 參數 | 字串 |
relativePath | 儲存來源之儲存體的相對路徑 | 字串 |
runtimeVersion | Jar 檔案的執行時間版本 | 字串 |
NetCoreZipUploadedUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 需要 'NetCoreZip' () |
netCoreMainEntryPath | 相對於 zip 根目錄的 .NET 可執行檔路徑 | 字串 |
relativePath | 儲存來源之儲存體的相對路徑 | 字串 |
runtimeVersion | .Net 檔案的執行時間版本 | 字串 |
SourceUploadedUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 必要) 'Source' ( |
artifactSelector | 要用於多模組專案部署之成品的選取器。 這應該是 目的模組/專案的相對路徑。 |
字串 |
relativePath | 儲存來源之儲存體的相對路徑 | 字串 |
runtimeVersion | 來源檔案的執行時間版本 | 字串 |
SKU
名稱 | 描述 | 值 |
---|---|---|
處理能力 | 目標資源的目前容量 | int |
NAME | Sku 的名稱 | 字串 |
tier | Sku 的階層 | 字串 |
Terraform (AzAPI 提供者) 資源定義
Spring/apps/deployments 資源類型可以使用目標作業進行部署:
- 資源群組
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.AppPlatform/Spring/apps/deployments 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.AppPlatform/Spring/apps/deployments@2023-03-01-preview"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
active = bool
deploymentSettings = {
addonConfigs = {}
containerProbeSettings = {
disableProbe = bool
}
environmentVariables = {}
livenessProbe = {
disableProbe = bool
failureThreshold = int
initialDelaySeconds = int
periodSeconds = int
probeAction = {
type = "string"
// For remaining properties, see ProbeAction objects
}
successThreshold = int
timeoutSeconds = int
}
readinessProbe = {
disableProbe = bool
failureThreshold = int
initialDelaySeconds = int
periodSeconds = int
probeAction = {
type = "string"
// For remaining properties, see ProbeAction objects
}
successThreshold = int
timeoutSeconds = int
}
resourceRequests = {
cpu = "string"
memory = "string"
}
scale = {
maxReplicas = int
minReplicas = int
rules = [
{
azureQueue = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
queueLength = int
queueName = "string"
}
custom = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
metadata = {}
type = "string"
}
http = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
metadata = {}
}
name = "string"
tcp = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
metadata = {}
}
}
]
}
startupProbe = {
disableProbe = bool
failureThreshold = int
initialDelaySeconds = int
periodSeconds = int
probeAction = {
type = "string"
// For remaining properties, see ProbeAction objects
}
successThreshold = int
timeoutSeconds = int
}
terminationGracePeriodSeconds = int
}
source = {
version = "string"
type = "string"
// For remaining properties, see UserSourceInfo objects
}
}
sku = {
capacity = int
name = "string"
tier = "string"
}
})
}
ProbeAction 物件
設定 type 屬性以指定物件的類型。
針對 ExecAction,請使用:
type = "ExecAction"
command = [
"string"
]
針對 HTTPGetAction,請使用:
type = "HTTPGetAction"
path = "string"
scheme = "string"
針對 TCPSocketAction,請使用:
type = "TCPSocketAction"
UserSourceInfo 物件
設定 type 屬性以指定物件的類型。
針對 BuildResult,請使用:
type = "BuildResult"
buildResultId = "string"
針對 容器,請使用:
type = "Container"
customContainer = {
args = [
"string"
]
command = [
"string"
]
containerImage = "string"
imageRegistryCredential = {
password = "string"
username = "string"
}
languageFramework = "string"
server = "string"
}
針對 Jar,請使用:
type = "Jar"
jvmOptions = "string"
relativePath = "string"
runtimeVersion = "string"
針對 NetCoreZip,請使用:
type = "NetCoreZip"
netCoreMainEntryPath = "string"
relativePath = "string"
runtimeVersion = "string"
針對 [來源],請使用:
type = "Source"
artifactSelector = "string"
relativePath = "string"
runtimeVersion = "string"
屬性值
Spring/apps/deployments
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | 「Microsoft.AppPlatform/Spring/apps/deployments@2023-03-01-preview」 |
NAME | 資源名稱 | 需要字串 () |
parent_id | 此資源父系之資源的識別碼。 | 類型資源的識別碼: 應用程式 |
sku | 部署資源的 SKU | Sku |
properties | 部署資源的屬性 | DeploymentResourceProperties |
DeploymentResourceProperties
名稱 | 描述 | 值 |
---|---|---|
作用中 | 指出部署是否為作用中 | bool |
deploymentSettings | 部署的部署設定 | DeploymentSettings |
source | 已上傳部署的來源資訊。 | UserSourceInfo |
DeploymentSettings
名稱 | 描述 | 值 |
---|---|---|
addonConfigs | 附加元件的集合 | 物件 (object) |
containerProbeSettings | 容器活躍度和整備探查設定 | ContainerProbeSettings |
environmentVariables | 環境變數的集合 | 物件 (object) |
livenessProbe | 定期探查應用程式實例活躍度。 如果探查失敗,將會重新開機應用程式實例。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
探查 |
readinessProbe | 應用程式實例服務整備的定期探查。 如果探查失敗,應用程式實例將會從服務端點中移除。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
探查 |
resourceRequests | 所需 CPU 和記憶體的要求資源數量。 建議您使用此欄位來代表必要的 CPU 和記憶體,舊欄位 CPU 和 memoryInGB 稍後將會被取代。 | ResourceRequests |
級別 | 調整 Azure Spring Apps 應用程式實例的屬性。 | 縮放比例 |
startupProbe | StartupProbe 表示應用程式實例已成功初始化。 如果指定,則不會執行其他探查,直到順利完成為止。 如果此探查失敗,Pod 將會重新開機,就像 livenessProbe 失敗一樣。 這可用來在應用程式實例生命週期開始時提供不同的探查參數,其可能需要很長的時間才能載入資料或暖快取,而不是在穩定狀態作業期間。 這無法更新。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
探查 |
terminationGracePeriodSeconds | 應用程式實例需要正常終止的選擇性持續時間,以秒為單位。 刪除要求可能會減少。 值必須是非負整數。 值零表示透過終止訊號立即停止, (沒有機會關閉) 。 如果此值為 nil,則會改用預設寬限期。 寬限期是在應用程式實例中執行的進程傳送終止訊號後,以秒為單位的持續時間,以及強制終止訊號停止進程的時間。 將此值設為超過程序的預期清除時間。 預設值為 90 秒。 | int |
ContainerProbeSettings
名稱 | 描述 | 值 |
---|---|---|
disableProbe | 指出是否停用活躍度和整備探查 | bool |
探查
名稱 | 描述 | 值 |
---|---|---|
disableProbe | 指出探查是否已停用。 | bool (必要) |
failureThreshold | 探查在成功之後視為失敗的最小連續失敗。 最小值為 1。 | int |
initialDelaySeconds | 啟動應用程式實例之後的秒數,再起始探查。 詳細資訊: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
int |
periodSeconds | 執行探查的頻率 (以秒為單位)。 最小值為 1。 | int |
probeAction | 探查的動作。 | ProbeAction |
successThreshold | 在失敗之後,探查要視為成功的最小連續成功。 必須為 1,才能讓活躍度和啟動。 最小值為 1。 | int |
timeoutSeconds | 探查逾時後的秒數。最小值為 1。 | int |
ProbeAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 設定物件類型 | ExecAction HTTPGetAction 需要 TCPSocketAction () |
ExecAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 要採取的動作類型,以執行健康情況檢查。 | 「ExecAction」 (必要) |
命令 | 命令是在容器內執行的命令列,命令的工作目錄是容器檔案系統中的根目錄 ('/') 。 命令不會在殼層內執行,因此傳統殼層指令 ('、' 等) 將無法運作。 若要使用殼層,您必須明確呼叫該殼層。 結束狀態為 0 會被視為即時/狀況良好,且非零狀況不良。 | string[] |
HttpGetAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 要採取的動作類型,以執行健康情況檢查。 | 「HTTPGetAction」 (必要) |
path | 在 HTTP 伺服器上存取的路徑。 | 字串 |
scheme | 用於連線到主機的配置。 預設為 HTTP。 可能的列舉值: - "HTTP" 表示所使用的配置將會是 http:// - "HTTPS" 表示所使用的配置將會是 https:// |
"HTTP" 「HTTPS」 |
TCPSocketAction
名稱 | 描述 | 值 |
---|---|---|
類型 | 要採取的動作類型,以執行健康情況檢查。 | 「TCPSocketAction」 (必要) |
ResourceRequests
名稱 | 描述 | 值 |
---|---|---|
cpu | 必要的 CPU。 1 個核心可以以 1 或 1000m 表示。 這應該是基本層的 500 公分或 1,標準層應為 {500m、1、2、3、4}。 | 字串 |
記憶體 | 必要的記憶體。 1 GB 可由 1Gi 或 1024Mi 表示。 這應該是基本層的 {512Mi、1Gi、2Gi},以及標準層的 {512Mi、1Gi、2Gi、...、8Gi}。 | 字串 |
調整
名稱 | 描述 | 值 |
---|---|---|
maxReplicas | 選擇性。 容器複本的數目上限。 如果未設定,則預設為 10。 | int |
minReplicas | 選擇性。 容器複本數目下限。 | int |
規則 | 調整規則。 | ScaleRule[] |
ScaleRule
名稱 | 描述 | 值 |
---|---|---|
azureQueue | 以 Azure 佇列為基礎的調整。 | QueueScaleRule |
自訂 | 自訂縮放規則。 | CustomScaleRule |
http | HTTP 要求型調整。 | HttpScaleRule |
NAME | 調整規則名稱 | 字串 |
tcp | Tcp 要求型調整。 | TcpScaleRule |
QueueScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | 佇列調整規則的驗證秘密。 | ScaleRuleAuth[] |
queueLength | 佇列長度。 | int |
queueName | 佇列名稱。 | 字串 |
ScaleRuleAuth
名稱 | 描述 | 值 |
---|---|---|
secretRef | 要從中提取驗證參數的 Azure Spring Apps 應用程式實例秘密名稱。 | 字串 |
triggerParameter | 使用秘密的觸發程式參數 | 字串 |
CustomScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | 自訂調整規則的驗證秘密。 | ScaleRuleAuth[] |
中繼資料 | 描述自訂縮放規則的中繼資料屬性。 | 物件 (object) |
類型 | 自訂縮放規則的類型 例如:azure-servicebus、redis 等。 |
字串 |
HttpScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | 自訂調整規則的驗證秘密。 | ScaleRuleAuth[] |
中繼資料 | 描述 HTTP 縮放規則的中繼資料屬性。 | 物件 (object) |
TcpScaleRule
名稱 | 描述 | 值 |
---|---|---|
auth | tcp 調整規則的驗證秘密。 | ScaleRuleAuth[] |
中繼資料 | 描述 tcp 縮放規則的中繼資料屬性。 | 物件 (object) |
UserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
version | 來源的版本 | 字串 |
type | 設定物件類型 | BuildResult 容器 Jar NetCoreZip 來源 (必要) |
BuildResultUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 必要) 「BuildResult」 ( |
buildResultId | 相同 Spring 實例下現有成功組建結果的資源識別碼。 | 字串 |
CustomContainerUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 「容器」 (必要) |
customContainer | 自訂容器承載 | CustomContainer |
CustomContainer
名稱 | 描述 | 值 |
---|---|---|
args | 進入點的引數。 如果未提供,則會使用 Docker 映射的 CMD。 | string[] |
命令 | Entrypoint 陣列。 未在殼層內執行。 如果未提供此專案,則會使用 Docker 映射的 ENTRYPOINT。 | string[] |
containerImage | 自訂容器的容器映射。 這應該是 {repository}:{tag} 的形式,不含登錄的伺服器名稱 | 字串 |
imageRegistryCredential | 映射登錄的認證 | ImageRegistryCredential |
languageFramework | 上傳容器映射的語言架構 | 字串 |
伺服器 | 包含容器映射的登錄名稱 | 字串 |
ImageRegistryCredential
名稱 | 描述 | 值 |
---|---|---|
密碼 | 映射登錄認證的密碼 | 字串 |
username | 映射登錄認證的使用者名稱 | 字串 |
JarUploadedUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 「Jar」 (必要) |
jvmOptions | JVM 參數 | 字串 |
relativePath | 儲存來源之儲存體的相對路徑 | 字串 |
runtimeVersion | Jar 檔案的執行時間版本 | 字串 |
NetCoreZipUploadedUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 「NetCoreZip」 (必要) |
netCoreMainEntryPath | 相對於 zip 根目錄的 .NET 可執行檔路徑 | 字串 |
relativePath | 儲存來源之儲存體的相對路徑 | 字串 |
runtimeVersion | .Net 檔案的執行時間版本 | 字串 |
SourceUploadedUserSourceInfo
名稱 | 描述 | 值 |
---|---|---|
類型 | 上傳的來源類型 | 「來源」 (必要) |
artifactSelector | 要用於多模組專案部署之成品的選取器。 這應該是 目的模組/專案的相對路徑。 |
字串 |
relativePath | 儲存來源之儲存體的相對路徑 | 字串 |
runtimeVersion | 來源檔案的執行時間版本 | 字串 |
SKU
名稱 | 描述 | 值 |
---|---|---|
處理能力 | 目標資源的目前容量 | int |
NAME | Sku 的名稱 | 字串 |
tier | Sku 的階層 | 字串 |