Microsoft.KubernetesConfiguration fluxConfigurations
Bicep 資源定義
fluxConfigurations 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.KubernetesConfiguration/fluxConfigurations 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.KubernetesConfiguration/fluxConfigurations@2024-04-01-preview' = {
scope: resourceSymbolicName or scope
name: 'string'
properties: {
azureBlob: {
accountKey: 'string'
containerName: 'string'
localAuthRef: 'string'
managedIdentity: {
clientId: 'string'
}
sasToken: 'string'
servicePrincipal: {
clientCertificate: 'string'
clientCertificatePassword: 'string'
clientCertificateSendChain: bool
clientId: 'string'
clientSecret: 'string'
tenantId: 'string'
}
syncIntervalInSeconds: int
timeoutInSeconds: int
url: 'string'
}
bucket: {
accessKey: 'string'
bucketName: 'string'
insecure: bool
localAuthRef: 'string'
syncIntervalInSeconds: int
timeoutInSeconds: int
url: 'string'
}
configurationProtectedSettings: {
{customized property}: 'string'
}
gitRepository: {
httpsCACert: 'string'
httpsUser: 'string'
localAuthRef: 'string'
repositoryRef: {
branch: 'string'
commit: 'string'
semver: 'string'
tag: 'string'
}
sshKnownHosts: 'string'
syncIntervalInSeconds: int
timeoutInSeconds: int
url: 'string'
}
kustomizations: {
{customized property}: {
dependsOn: [
'string'
]
force: bool
path: 'string'
postBuild: {
substitute: {
{customized property}: 'string'
}
substituteFrom: [
{
kind: 'string'
name: 'string'
optional: bool
}
]
}
prune: bool
retryIntervalInSeconds: int
syncIntervalInSeconds: int
timeoutInSeconds: int
wait: bool
}
}
namespace: 'string'
ociRepository: {
insecure: bool
layerSelector: {
mediaType: 'string'
operation: 'string'
}
localAuthRef: 'string'
repositoryRef: {
digest: 'string'
semver: 'string'
tag: 'string'
}
serviceAccountName: 'string'
syncIntervalInSeconds: int
timeoutInSeconds: int
tlsConfig: {
caCertificate: 'string'
clientCertificate: 'string'
privateKey: 'string'
}
url: 'string'
useWorkloadIdentity: bool
verify: {
matchOidcIdentity: [
{
issuer: 'string'
subject: 'string'
}
]
provider: 'string'
verificationConfig: {
{customized property}: 'string'
}
}
}
reconciliationWaitDuration: 'string'
scope: 'string'
sourceKind: 'string'
suspend: bool
waitForReconciliation: bool
}
}
屬性值
AzureBlobDefinition
名字 | 描述 | 價值 |
---|---|---|
accountKey | 用來存取記憶體帳戶的帳戶金鑰 (共用金鑰 ) | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
containerName | 要從 flux 組態的 URL 端點同步處理的 Azure Blob 容器名稱。 | 字串 |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
managedIdentity | 使用受控識別進行驗證的參數。 | ManagedIdentityDefinition |
sasToken | 存取記憶體容器的共用存取令牌 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
servicePrincipal | 使用服務主體進行驗證的參數。 | ServicePrincipalDefinition |
syncIntervalInSeconds | 重新協調叢集 Azure Blob 來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試將叢集 Azure Blob 來源與遠端協調的時間上限。 | int |
url | 要同步處理變更組態 Azure Blob 記憶體帳戶的 URL。 | 字串 |
BucketDefinition
名字 | 描述 | 價值 |
---|---|---|
accessKey | 用來安全地存取 S3 貯體的純文字存取密鑰 | 字串 |
bucketName | 要從 flux 組態的 URL 端點同步的貯體名稱。 | 字串 |
不安全的 | 指定在從 S3 貯體將數據拼入時,是否要使用不安全的通訊。 | bool |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
syncIntervalInSeconds | 重新協調叢集貯體來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試與遠端協調叢集貯體來源的時間上限。 | int |
url | 要同步處理 flux 組態 S3 貯體之 URL。 | 字串 |
FluxConfigurationProperties
名字 | 描述 | 價值 |
---|---|---|
azureBlob | 與 AzureBlob 來源類型協調的參數。 | AzureBlobDefinition |
桶 | 與 Bucket 來源類型協調的參數。 | BucketDefinition |
configurationProtectedSettings | 組態受保護組態設定的索引鍵/值組 | FluxConfigurationPropertiesConfigurationProtectedSettings |
gitRepository | 與 GitRepository 來源類型協調的參數。 | GitRepositoryDefinition |
kustomizations | 用來協調叢集上來源類型所提取成品的 kustomization 陣列。 | FluxConfigurationPropertiesKustomizations |
Namespace | 此組態安裝至其中的命名空間。 最多253個小寫英數位元、連字元和句點。 | 字串 |
ociRepository | 與 OCIRepository 來源類型協調的參數。 | OCIRepositoryDefinition |
reconciliationWaitDuration | 等候 flux 設定對帳的最大持續時間。 例如 PT1H、PT5M、P1D | 字串 |
範圍 | 將安裝運算子的範圍。 | 'cluster' 'namespace' |
sourceKind | 要從中提取組態數據的來源種類。 | 'AzureBlob' 'Bucket' 'GitRepository' 'OCIRepository' |
暫停 | 此組態是否應暫停其 Kustomizations 和 sources 的對帳。 | bool |
waitForReconciliation | flux 組態部署是否應該等候叢集協調 kustomizations。 | bool |
FluxConfigurationPropertiesConfigurationProtectedSettings
名字 | 描述 | 價值 |
---|
FluxConfigurationPropertiesKustomizations
名字 | 描述 | 價值 |
---|
GitRepositoryDefinition
名字 | 描述 | 價值 |
---|---|---|
httpsCACert | Base64 編碼的 HTTPS 證書頒發機構單位內容,用來透過 HTTPS 存取 Git 私人 Git 存放庫 | 字串 |
httpsUser | 純文本 HTTPS 使用者名稱,用來透過 HTTPS 存取私人 Git 存放庫 | 字串 |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
repositoryRef | GitRepository 物件的來源參考。 | RepositoryRefDefinition |
sshKnownHosts | Base64 編碼known_hosts值,其中包含透過 SSH 存取私人 Git 存放庫所需的公用 SSH 金鑰 | 字串 |
syncIntervalInSeconds | 重新協調叢集 Git 存放庫來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試將叢集 Git 存放庫來源與遠端協調的時間上限。 | int |
url | 要同步處理 flux 組態 Git 存放庫的 URL。 | 字串 |
KustomizationDefinition
名字 | 描述 | 價值 |
---|---|---|
dependsOn | 指定這個 Kustomization 相依的其他 Kustomization。 在完成所有相依性完成對帳之前,此 Kustomization 將不會協調。 | string[] |
力 | 當修補因為不可變的字段變更而失敗時,啟用/停用叢集上的 Kubernetes 資源重新建立。 | bool |
路徑 | 來源參考中要協調叢集的路徑。 | 字串 |
postBuild | 用於 kustomize 組建之後此 Kustomization 的變數替代。 | PostBuildDefinition |
修剪 | 啟用/停用這個 Kustomization 所建立 Kubernetes 物件的垃圾收集。 | bool |
retryIntervalInSeconds | 在對帳失敗時,重新協調叢集上 Kustomization 的間隔。 | int |
syncIntervalInSeconds | 重新協調叢集上 Kustomization 的間隔。 | int |
timeoutInSeconds | 嘗試協調叢集上 Kustomization 的最大時間。 | int |
等 | 啟用/停用此 Kustomization 所建立之所有 Kubernetes 物件的健康情況檢查。 | bool |
LayerSelectorDefinition
名字 | 描述 | 價值 |
---|---|---|
mediaType | 將會使用符合指定媒體類型的第一層。 | 字串 |
操作 | 要對選取圖層執行的作業。 默認值為 'extract',但可以設定為 'copy'。 | 'copy' 'extract' |
ManagedIdentityDefinition
名字 | 描述 | 價值 |
---|---|---|
clientId | 用來驗證受控識別的用戶端標識碼。 | 字串 |
MatchOidcIdentityDefinition
名字 | 描述 | 價值 |
---|---|---|
發行 | 要與 相符的 regex 模式,以驗證 OIDC 簽發者。 | 字串 |
主題 | 要與 相符的 regex 模式,以驗證身分識別主體。 | 字串 |
Microsoft.KubernetesConfiguration/fluxConfigurations
名字 | 描述 | 價值 |
---|---|---|
名字 | 資源名稱 | 字串 (必要) |
性能 | 用來建立 Flux 設定資源的屬性 | FluxConfigurationProperties |
範圍 | 在與部署範圍不同的範圍內建立資源時,請使用 。 | 將此屬性設定為資源的符號名稱,以套用 擴充資源。 |
OCIRepositoryDefinition
名字 | 描述 | 價值 |
---|---|---|
不安全的 | 指定是否允許連線到非 TLS HTTP 容器登錄。 | bool |
layerSelector | 要從 OCI 成品提取的圖層。 | LayerSelectorDefinition |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
repositoryRef | OCIRepository 物件的來源參考。 | OCIRepositoryRefDefinition |
serviceAccountName | 要向 OCI 存放庫進行驗證的服務帳戶名稱。 | 字串 |
syncIntervalInSeconds | 重新協調叢集 OCI 存放庫來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試與遠端協調叢集 OCI 存放庫來源的時間上限。 | int |
tlsConfig | 使用 OCI 存放庫的 TLS 組態進行驗證的參數。 | TlsConfigDefinition |
url | 要同步處理 flux 組態 OCI 存放庫的 URL。 | 字串 |
useWorkloadIdentity | 指定是否要使用工作負載識別向 OCI 存放庫進行驗證。 | bool |
驗證 | 驗證 OCI 成品的真實性。 | VerifyDefinition |
OCIRepositoryRefDefinition
名字 | 描述 | 價值 |
---|---|---|
消化 | 要從 OCI 存放庫提取的映射摘要,此值的格式應該是 『sha256:』。 這會優先於 semver。 | 字串 |
semver | 用來比對 OCI 存放庫卷標的 semver 範圍。 這會優先於標籤。 | 字串 |
標記 | 要提取的 OCI 存放庫映像標記名稱。 這會預設為 『latest』。 | 字串 |
PostBuildDefinition
名字 | 描述 | 價值 |
---|---|---|
替代 | 保存要在此 Kustomization 中取代變數的索引鍵/值組。 | PostBuildDefinitionSubstitute |
substituteFrom | ConfigMaps/Secrets 的陣列,變數會用來取代這個 Kustomization。 | SubstituteFromDefinition[] |
PostBuildDefinitionSubstitute
名字 | 描述 | 價值 |
---|
RepositoryRefDefinition
名字 | 描述 | 價值 |
---|---|---|
分支 | 要簽出的 Git 存放庫分支名稱。 | 字串 |
犯 | 要簽出的認可SHA。 此值必須與分支名稱結合,才能有效。 這會優先於 semver。 | 字串 |
semver | 用來比對 git 存放庫卷標的 semver 範圍。 這會優先於標籤。 | 字串 |
標記 | 要簽出的 Git 存放庫標記名稱。 這會優先於分支。 | 字串 |
ServicePrincipalDefinition
名字 | 描述 | 價值 |
---|---|---|
clientCertificate | 用來驗證服務主體的Base64編碼憑證 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
clientCertificatePassword | 用來驗證服務主體之憑證的密碼 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
clientCertificateSendChain | 指定取得令牌時是否要在用戶端宣告中包含 x5c 標頭,以啟用用戶端憑證的主體名稱/簽發者型驗證 | bool |
clientId | 用來驗證服務主體的用戶端標識碼。 | 字串 |
clientSecret | 驗證服務主體的客戶端密碼 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
tenantId | 驗證服務主體的租用戶標識碼 | 字串 |
SubstituteFromDefinition
名字 | 描述 | 價值 |
---|---|---|
類 | 定義是否為 ConfigMap 或 Secret,保留要用於替代的變數。 | 字串 |
名字 | 保留要替代之變數的 ConfigMap/Secret 名稱。 | 字串 |
自選 | 如果 ConfigMap/Secret 不存在,請將 設定為 True 以繼續。 | bool |
TlsConfigDefinition
名字 | 描述 | 價值 |
---|---|---|
caCertificate | 用來驗證伺服器的Base64編碼CA憑證。 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
clientCertificate | 用來向 OCI 存放庫驗證用戶端的Base64編碼憑證。 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
privateKey | 用來向 OCI 存放庫驗證用戶端的 Base64 編碼私鑰。 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
VerifyDefinition
名字 | 描述 | 價值 |
---|---|---|
matchOidcIdentity | 數位,定義在驗證 OCI 成品時比對身分識別的準則。 | MatchOidcIdentityDefinition[] |
供應商 | 驗證提供者名稱。 | 字串 |
verificationConfig | 物件,包含受信任作者的受信任公鑰。 | VerifyDefinitionVerificationConfig |
VerifyDefinitionVerificationConfig
名字 | 描述 | 價值 |
---|
使用範例
Azure 已驗證的模組
下列 Azure 驗證模組 可用來部署此資源類型。
模組 | 描述 |
---|---|
Kubernetes 設定 Flux 組態 | 適用於 Kubernetes 設定 Flux 設定的 AVM 資源模組 |
ARM 樣本資源定義
fluxConfigurations 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.KubernetesConfiguration/fluxConfigurations 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.KubernetesConfiguration/fluxConfigurations",
"apiVersion": "2024-04-01-preview",
"name": "string",
"properties": {
"azureBlob": {
"accountKey": "string",
"containerName": "string",
"localAuthRef": "string",
"managedIdentity": {
"clientId": "string"
},
"sasToken": "string",
"servicePrincipal": {
"clientCertificate": "string",
"clientCertificatePassword": "string",
"clientCertificateSendChain": "bool",
"clientId": "string",
"clientSecret": "string",
"tenantId": "string"
},
"syncIntervalInSeconds": "int",
"timeoutInSeconds": "int",
"url": "string"
},
"bucket": {
"accessKey": "string",
"bucketName": "string",
"insecure": "bool",
"localAuthRef": "string",
"syncIntervalInSeconds": "int",
"timeoutInSeconds": "int",
"url": "string"
},
"configurationProtectedSettings": {
"{customized property}": "string"
},
"gitRepository": {
"httpsCACert": "string",
"httpsUser": "string",
"localAuthRef": "string",
"repositoryRef": {
"branch": "string",
"commit": "string",
"semver": "string",
"tag": "string"
},
"sshKnownHosts": "string",
"syncIntervalInSeconds": "int",
"timeoutInSeconds": "int",
"url": "string"
},
"kustomizations": {
"{customized property}": {
"dependsOn": [ "string" ],
"force": "bool",
"path": "string",
"postBuild": {
"substitute": {
"{customized property}": "string"
},
"substituteFrom": [
{
"kind": "string",
"name": "string",
"optional": "bool"
}
]
},
"prune": "bool",
"retryIntervalInSeconds": "int",
"syncIntervalInSeconds": "int",
"timeoutInSeconds": "int",
"wait": "bool"
}
},
"namespace": "string",
"ociRepository": {
"insecure": "bool",
"layerSelector": {
"mediaType": "string",
"operation": "string"
},
"localAuthRef": "string",
"repositoryRef": {
"digest": "string",
"semver": "string",
"tag": "string"
},
"serviceAccountName": "string",
"syncIntervalInSeconds": "int",
"timeoutInSeconds": "int",
"tlsConfig": {
"caCertificate": "string",
"clientCertificate": "string",
"privateKey": "string"
},
"url": "string",
"useWorkloadIdentity": "bool",
"verify": {
"matchOidcIdentity": [
{
"issuer": "string",
"subject": "string"
}
],
"provider": "string",
"verificationConfig": {
"{customized property}": "string"
}
}
},
"reconciliationWaitDuration": "string",
"scope": "string",
"sourceKind": "string",
"suspend": "bool",
"waitForReconciliation": "bool"
}
}
屬性值
AzureBlobDefinition
名字 | 描述 | 價值 |
---|---|---|
accountKey | 用來存取記憶體帳戶的帳戶金鑰 (共用金鑰 ) | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
containerName | 要從 flux 組態的 URL 端點同步處理的 Azure Blob 容器名稱。 | 字串 |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
managedIdentity | 使用受控識別進行驗證的參數。 | ManagedIdentityDefinition |
sasToken | 存取記憶體容器的共用存取令牌 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
servicePrincipal | 使用服務主體進行驗證的參數。 | ServicePrincipalDefinition |
syncIntervalInSeconds | 重新協調叢集 Azure Blob 來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試將叢集 Azure Blob 來源與遠端協調的時間上限。 | int |
url | 要同步處理變更組態 Azure Blob 記憶體帳戶的 URL。 | 字串 |
BucketDefinition
名字 | 描述 | 價值 |
---|---|---|
accessKey | 用來安全地存取 S3 貯體的純文字存取密鑰 | 字串 |
bucketName | 要從 flux 組態的 URL 端點同步的貯體名稱。 | 字串 |
不安全的 | 指定在從 S3 貯體將數據拼入時,是否要使用不安全的通訊。 | bool |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
syncIntervalInSeconds | 重新協調叢集貯體來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試與遠端協調叢集貯體來源的時間上限。 | int |
url | 要同步處理 flux 組態 S3 貯體之 URL。 | 字串 |
FluxConfigurationProperties
名字 | 描述 | 價值 |
---|---|---|
azureBlob | 與 AzureBlob 來源類型協調的參數。 | AzureBlobDefinition |
桶 | 與 Bucket 來源類型協調的參數。 | BucketDefinition |
configurationProtectedSettings | 組態受保護組態設定的索引鍵/值組 | FluxConfigurationPropertiesConfigurationProtectedSettings |
gitRepository | 與 GitRepository 來源類型協調的參數。 | GitRepositoryDefinition |
kustomizations | 用來協調叢集上來源類型所提取成品的 kustomization 陣列。 | FluxConfigurationPropertiesKustomizations |
Namespace | 此組態安裝至其中的命名空間。 最多253個小寫英數位元、連字元和句點。 | 字串 |
ociRepository | 與 OCIRepository 來源類型協調的參數。 | OCIRepositoryDefinition |
reconciliationWaitDuration | 等候 flux 設定對帳的最大持續時間。 例如 PT1H、PT5M、P1D | 字串 |
範圍 | 將安裝運算子的範圍。 | 'cluster' 'namespace' |
sourceKind | 要從中提取組態數據的來源種類。 | 'AzureBlob' 'Bucket' 'GitRepository' 'OCIRepository' |
暫停 | 此組態是否應暫停其 Kustomizations 和 sources 的對帳。 | bool |
waitForReconciliation | flux 組態部署是否應該等候叢集協調 kustomizations。 | bool |
FluxConfigurationPropertiesConfigurationProtectedSettings
名字 | 描述 | 價值 |
---|
FluxConfigurationPropertiesKustomizations
名字 | 描述 | 價值 |
---|
GitRepositoryDefinition
名字 | 描述 | 價值 |
---|---|---|
httpsCACert | Base64 編碼的 HTTPS 證書頒發機構單位內容,用來透過 HTTPS 存取 Git 私人 Git 存放庫 | 字串 |
httpsUser | 純文本 HTTPS 使用者名稱,用來透過 HTTPS 存取私人 Git 存放庫 | 字串 |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
repositoryRef | GitRepository 物件的來源參考。 | RepositoryRefDefinition |
sshKnownHosts | Base64 編碼known_hosts值,其中包含透過 SSH 存取私人 Git 存放庫所需的公用 SSH 金鑰 | 字串 |
syncIntervalInSeconds | 重新協調叢集 Git 存放庫來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試將叢集 Git 存放庫來源與遠端協調的時間上限。 | int |
url | 要同步處理 flux 組態 Git 存放庫的 URL。 | 字串 |
KustomizationDefinition
名字 | 描述 | 價值 |
---|---|---|
dependsOn | 指定這個 Kustomization 相依的其他 Kustomization。 在完成所有相依性完成對帳之前,此 Kustomization 將不會協調。 | string[] |
力 | 當修補因為不可變的字段變更而失敗時,啟用/停用叢集上的 Kubernetes 資源重新建立。 | bool |
路徑 | 來源參考中要協調叢集的路徑。 | 字串 |
postBuild | 用於 kustomize 組建之後此 Kustomization 的變數替代。 | PostBuildDefinition |
修剪 | 啟用/停用這個 Kustomization 所建立 Kubernetes 物件的垃圾收集。 | bool |
retryIntervalInSeconds | 在對帳失敗時,重新協調叢集上 Kustomization 的間隔。 | int |
syncIntervalInSeconds | 重新協調叢集上 Kustomization 的間隔。 | int |
timeoutInSeconds | 嘗試協調叢集上 Kustomization 的最大時間。 | int |
等 | 啟用/停用此 Kustomization 所建立之所有 Kubernetes 物件的健康情況檢查。 | bool |
LayerSelectorDefinition
名字 | 描述 | 價值 |
---|---|---|
mediaType | 將會使用符合指定媒體類型的第一層。 | 字串 |
操作 | 要對選取圖層執行的作業。 默認值為 'extract',但可以設定為 'copy'。 | 'copy' 'extract' |
ManagedIdentityDefinition
名字 | 描述 | 價值 |
---|---|---|
clientId | 用來驗證受控識別的用戶端標識碼。 | 字串 |
MatchOidcIdentityDefinition
名字 | 描述 | 價值 |
---|---|---|
發行 | 要與 相符的 regex 模式,以驗證 OIDC 簽發者。 | 字串 |
主題 | 要與 相符的 regex 模式,以驗證身分識別主體。 | 字串 |
Microsoft.KubernetesConfiguration/fluxConfigurations
名字 | 描述 | 價值 |
---|---|---|
apiVersion | API 版本 | '2024-04-01-preview' |
名字 | 資源名稱 | 字串 (必要) |
性能 | 用來建立 Flux 設定資源的屬性 | FluxConfigurationProperties |
類型 | 資源類型 | 'Microsoft.KubernetesConfiguration/fluxConfigurations' |
OCIRepositoryDefinition
名字 | 描述 | 價值 |
---|---|---|
不安全的 | 指定是否允許連線到非 TLS HTTP 容器登錄。 | bool |
layerSelector | 要從 OCI 成品提取的圖層。 | LayerSelectorDefinition |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
repositoryRef | OCIRepository 物件的來源參考。 | OCIRepositoryRefDefinition |
serviceAccountName | 要向 OCI 存放庫進行驗證的服務帳戶名稱。 | 字串 |
syncIntervalInSeconds | 重新協調叢集 OCI 存放庫來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試與遠端協調叢集 OCI 存放庫來源的時間上限。 | int |
tlsConfig | 使用 OCI 存放庫的 TLS 組態進行驗證的參數。 | TlsConfigDefinition |
url | 要同步處理 flux 組態 OCI 存放庫的 URL。 | 字串 |
useWorkloadIdentity | 指定是否要使用工作負載識別向 OCI 存放庫進行驗證。 | bool |
驗證 | 驗證 OCI 成品的真實性。 | VerifyDefinition |
OCIRepositoryRefDefinition
名字 | 描述 | 價值 |
---|---|---|
消化 | 要從 OCI 存放庫提取的映射摘要,此值的格式應該是 『sha256:』。 這會優先於 semver。 | 字串 |
semver | 用來比對 OCI 存放庫卷標的 semver 範圍。 這會優先於標籤。 | 字串 |
標記 | 要提取的 OCI 存放庫映像標記名稱。 這會預設為 『latest』。 | 字串 |
PostBuildDefinition
名字 | 描述 | 價值 |
---|---|---|
替代 | 保存要在此 Kustomization 中取代變數的索引鍵/值組。 | PostBuildDefinitionSubstitute |
substituteFrom | ConfigMaps/Secrets 的陣列,變數會用來取代這個 Kustomization。 | SubstituteFromDefinition[] |
PostBuildDefinitionSubstitute
名字 | 描述 | 價值 |
---|
RepositoryRefDefinition
名字 | 描述 | 價值 |
---|---|---|
分支 | 要簽出的 Git 存放庫分支名稱。 | 字串 |
犯 | 要簽出的認可SHA。 此值必須與分支名稱結合,才能有效。 這會優先於 semver。 | 字串 |
semver | 用來比對 git 存放庫卷標的 semver 範圍。 這會優先於標籤。 | 字串 |
標記 | 要簽出的 Git 存放庫標記名稱。 這會優先於分支。 | 字串 |
ServicePrincipalDefinition
名字 | 描述 | 價值 |
---|---|---|
clientCertificate | 用來驗證服務主體的Base64編碼憑證 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
clientCertificatePassword | 用來驗證服務主體之憑證的密碼 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
clientCertificateSendChain | 指定取得令牌時是否要在用戶端宣告中包含 x5c 標頭,以啟用用戶端憑證的主體名稱/簽發者型驗證 | bool |
clientId | 用來驗證服務主體的用戶端標識碼。 | 字串 |
clientSecret | 驗證服務主體的客戶端密碼 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
tenantId | 驗證服務主體的租用戶標識碼 | 字串 |
SubstituteFromDefinition
名字 | 描述 | 價值 |
---|---|---|
類 | 定義是否為 ConfigMap 或 Secret,保留要用於替代的變數。 | 字串 |
名字 | 保留要替代之變數的 ConfigMap/Secret 名稱。 | 字串 |
自選 | 如果 ConfigMap/Secret 不存在,請將 設定為 True 以繼續。 | bool |
TlsConfigDefinition
名字 | 描述 | 價值 |
---|---|---|
caCertificate | 用來驗證伺服器的Base64編碼CA憑證。 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
clientCertificate | 用來向 OCI 存放庫驗證用戶端的Base64編碼憑證。 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
privateKey | 用來向 OCI 存放庫驗證用戶端的 Base64 編碼私鑰。 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
VerifyDefinition
名字 | 描述 | 價值 |
---|---|---|
matchOidcIdentity | 數位,定義在驗證 OCI 成品時比對身分識別的準則。 | MatchOidcIdentityDefinition[] |
供應商 | 驗證提供者名稱。 | 字串 |
verificationConfig | 物件,包含受信任作者的受信任公鑰。 | VerifyDefinitionVerificationConfig |
VerifyDefinitionVerificationConfig
名字 | 描述 | 價值 |
---|
使用範例
Terraform (AzAPI 提供者) 資源定義
fluxConfigurations 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.KubernetesConfiguration/fluxConfigurations 資源,請將下列 Terraform 新增至您的範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.KubernetesConfiguration/fluxConfigurations@2024-04-01-preview"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
azureBlob = {
accountKey = "string"
containerName = "string"
localAuthRef = "string"
managedIdentity = {
clientId = "string"
}
sasToken = "string"
servicePrincipal = {
clientCertificate = "string"
clientCertificatePassword = "string"
clientCertificateSendChain = bool
clientId = "string"
clientSecret = "string"
tenantId = "string"
}
syncIntervalInSeconds = int
timeoutInSeconds = int
url = "string"
}
bucket = {
accessKey = "string"
bucketName = "string"
insecure = bool
localAuthRef = "string"
syncIntervalInSeconds = int
timeoutInSeconds = int
url = "string"
}
configurationProtectedSettings = {
{customized property} = "string"
}
gitRepository = {
httpsCACert = "string"
httpsUser = "string"
localAuthRef = "string"
repositoryRef = {
branch = "string"
commit = "string"
semver = "string"
tag = "string"
}
sshKnownHosts = "string"
syncIntervalInSeconds = int
timeoutInSeconds = int
url = "string"
}
kustomizations = {
{customized property} = {
dependsOn = [
"string"
]
force = bool
path = "string"
postBuild = {
substitute = {
{customized property} = "string"
}
substituteFrom = [
{
kind = "string"
name = "string"
optional = bool
}
]
}
prune = bool
retryIntervalInSeconds = int
syncIntervalInSeconds = int
timeoutInSeconds = int
wait = bool
}
}
namespace = "string"
ociRepository = {
insecure = bool
layerSelector = {
mediaType = "string"
operation = "string"
}
localAuthRef = "string"
repositoryRef = {
digest = "string"
semver = "string"
tag = "string"
}
serviceAccountName = "string"
syncIntervalInSeconds = int
timeoutInSeconds = int
tlsConfig = {
caCertificate = "string"
clientCertificate = "string"
privateKey = "string"
}
url = "string"
useWorkloadIdentity = bool
verify = {
matchOidcIdentity = [
{
issuer = "string"
subject = "string"
}
]
provider = "string"
verificationConfig = {
{customized property} = "string"
}
}
}
reconciliationWaitDuration = "string"
scope = "string"
sourceKind = "string"
suspend = bool
waitForReconciliation = bool
}
})
}
屬性值
AzureBlobDefinition
名字 | 描述 | 價值 |
---|---|---|
accountKey | 用來存取記憶體帳戶的帳戶金鑰 (共用金鑰 ) | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
containerName | 要從 flux 組態的 URL 端點同步處理的 Azure Blob 容器名稱。 | 字串 |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
managedIdentity | 使用受控識別進行驗證的參數。 | ManagedIdentityDefinition |
sasToken | 存取記憶體容器的共用存取令牌 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
servicePrincipal | 使用服務主體進行驗證的參數。 | ServicePrincipalDefinition |
syncIntervalInSeconds | 重新協調叢集 Azure Blob 來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試將叢集 Azure Blob 來源與遠端協調的時間上限。 | int |
url | 要同步處理變更組態 Azure Blob 記憶體帳戶的 URL。 | 字串 |
BucketDefinition
名字 | 描述 | 價值 |
---|---|---|
accessKey | 用來安全地存取 S3 貯體的純文字存取密鑰 | 字串 |
bucketName | 要從 flux 組態的 URL 端點同步的貯體名稱。 | 字串 |
不安全的 | 指定在從 S3 貯體將數據拼入時,是否要使用不安全的通訊。 | bool |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
syncIntervalInSeconds | 重新協調叢集貯體來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試與遠端協調叢集貯體來源的時間上限。 | int |
url | 要同步處理 flux 組態 S3 貯體之 URL。 | 字串 |
FluxConfigurationProperties
名字 | 描述 | 價值 |
---|---|---|
azureBlob | 與 AzureBlob 來源類型協調的參數。 | AzureBlobDefinition |
桶 | 與 Bucket 來源類型協調的參數。 | BucketDefinition |
configurationProtectedSettings | 組態受保護組態設定的索引鍵/值組 | FluxConfigurationPropertiesConfigurationProtectedSettings |
gitRepository | 與 GitRepository 來源類型協調的參數。 | GitRepositoryDefinition |
kustomizations | 用來協調叢集上來源類型所提取成品的 kustomization 陣列。 | FluxConfigurationPropertiesKustomizations |
Namespace | 此組態安裝至其中的命名空間。 最多253個小寫英數位元、連字元和句點。 | 字串 |
ociRepository | 與 OCIRepository 來源類型協調的參數。 | OCIRepositoryDefinition |
reconciliationWaitDuration | 等候 flux 設定對帳的最大持續時間。 例如 PT1H、PT5M、P1D | 字串 |
範圍 | 將安裝運算子的範圍。 | 'cluster' 'namespace' |
sourceKind | 要從中提取組態數據的來源種類。 | 'AzureBlob' 'Bucket' 'GitRepository' 'OCIRepository' |
暫停 | 此組態是否應暫停其 Kustomizations 和 sources 的對帳。 | bool |
waitForReconciliation | flux 組態部署是否應該等候叢集協調 kustomizations。 | bool |
FluxConfigurationPropertiesConfigurationProtectedSettings
名字 | 描述 | 價值 |
---|
FluxConfigurationPropertiesKustomizations
名字 | 描述 | 價值 |
---|
GitRepositoryDefinition
名字 | 描述 | 價值 |
---|---|---|
httpsCACert | Base64 編碼的 HTTPS 證書頒發機構單位內容,用來透過 HTTPS 存取 Git 私人 Git 存放庫 | 字串 |
httpsUser | 純文本 HTTPS 使用者名稱,用來透過 HTTPS 存取私人 Git 存放庫 | 字串 |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
repositoryRef | GitRepository 物件的來源參考。 | RepositoryRefDefinition |
sshKnownHosts | Base64 編碼known_hosts值,其中包含透過 SSH 存取私人 Git 存放庫所需的公用 SSH 金鑰 | 字串 |
syncIntervalInSeconds | 重新協調叢集 Git 存放庫來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試將叢集 Git 存放庫來源與遠端協調的時間上限。 | int |
url | 要同步處理 flux 組態 Git 存放庫的 URL。 | 字串 |
KustomizationDefinition
名字 | 描述 | 價值 |
---|---|---|
dependsOn | 指定這個 Kustomization 相依的其他 Kustomization。 在完成所有相依性完成對帳之前,此 Kustomization 將不會協調。 | string[] |
力 | 當修補因為不可變的字段變更而失敗時,啟用/停用叢集上的 Kubernetes 資源重新建立。 | bool |
路徑 | 來源參考中要協調叢集的路徑。 | 字串 |
postBuild | 用於 kustomize 組建之後此 Kustomization 的變數替代。 | PostBuildDefinition |
修剪 | 啟用/停用這個 Kustomization 所建立 Kubernetes 物件的垃圾收集。 | bool |
retryIntervalInSeconds | 在對帳失敗時,重新協調叢集上 Kustomization 的間隔。 | int |
syncIntervalInSeconds | 重新協調叢集上 Kustomization 的間隔。 | int |
timeoutInSeconds | 嘗試協調叢集上 Kustomization 的最大時間。 | int |
等 | 啟用/停用此 Kustomization 所建立之所有 Kubernetes 物件的健康情況檢查。 | bool |
LayerSelectorDefinition
名字 | 描述 | 價值 |
---|---|---|
mediaType | 將會使用符合指定媒體類型的第一層。 | 字串 |
操作 | 要對選取圖層執行的作業。 默認值為 'extract',但可以設定為 'copy'。 | 'copy' 'extract' |
ManagedIdentityDefinition
名字 | 描述 | 價值 |
---|---|---|
clientId | 用來驗證受控識別的用戶端標識碼。 | 字串 |
MatchOidcIdentityDefinition
名字 | 描述 | 價值 |
---|---|---|
發行 | 要與 相符的 regex 模式,以驗證 OIDC 簽發者。 | 字串 |
主題 | 要與 相符的 regex 模式,以驗證身分識別主體。 | 字串 |
Microsoft.KubernetesConfiguration/fluxConfigurations
名字 | 描述 | 價值 |
---|---|---|
名字 | 資源名稱 | 字串 (必要) |
parent_id | 要套用此延伸模組資源之資源的標識碼。 | 字串 (必要) |
性能 | 用來建立 Flux 設定資源的屬性 | FluxConfigurationProperties |
類型 | 資源類型 | “Microsoft.KubernetesConfiguration/fluxConfigurations@2024-04-01-preview” |
OCIRepositoryDefinition
名字 | 描述 | 價值 |
---|---|---|
不安全的 | 指定是否允許連線到非 TLS HTTP 容器登錄。 | bool |
layerSelector | 要從 OCI 成品提取的圖層。 | LayerSelectorDefinition |
localAuthRef | Kubernetes 叢集上的本機密碼名稱,以做為驗證密碼,而不是受控或使用者提供的組態秘密。 | 字串 |
repositoryRef | OCIRepository 物件的來源參考。 | OCIRepositoryRefDefinition |
serviceAccountName | 要向 OCI 存放庫進行驗證的服務帳戶名稱。 | 字串 |
syncIntervalInSeconds | 重新協調叢集 OCI 存放庫來源與遠端的間隔。 | int |
timeoutInSeconds | 嘗試與遠端協調叢集 OCI 存放庫來源的時間上限。 | int |
tlsConfig | 使用 OCI 存放庫的 TLS 組態進行驗證的參數。 | TlsConfigDefinition |
url | 要同步處理 flux 組態 OCI 存放庫的 URL。 | 字串 |
useWorkloadIdentity | 指定是否要使用工作負載識別向 OCI 存放庫進行驗證。 | bool |
驗證 | 驗證 OCI 成品的真實性。 | VerifyDefinition |
OCIRepositoryRefDefinition
名字 | 描述 | 價值 |
---|---|---|
消化 | 要從 OCI 存放庫提取的映射摘要,此值的格式應該是 『sha256:』。 這會優先於 semver。 | 字串 |
semver | 用來比對 OCI 存放庫卷標的 semver 範圍。 這會優先於標籤。 | 字串 |
標記 | 要提取的 OCI 存放庫映像標記名稱。 這會預設為 『latest』。 | 字串 |
PostBuildDefinition
名字 | 描述 | 價值 |
---|---|---|
替代 | 保存要在此 Kustomization 中取代變數的索引鍵/值組。 | PostBuildDefinitionSubstitute |
substituteFrom | ConfigMaps/Secrets 的陣列,變數會用來取代這個 Kustomization。 | SubstituteFromDefinition[] |
PostBuildDefinitionSubstitute
名字 | 描述 | 價值 |
---|
RepositoryRefDefinition
名字 | 描述 | 價值 |
---|---|---|
分支 | 要簽出的 Git 存放庫分支名稱。 | 字串 |
犯 | 要簽出的認可SHA。 此值必須與分支名稱結合,才能有效。 這會優先於 semver。 | 字串 |
semver | 用來比對 git 存放庫卷標的 semver 範圍。 這會優先於標籤。 | 字串 |
標記 | 要簽出的 Git 存放庫標記名稱。 這會優先於分支。 | 字串 |
ServicePrincipalDefinition
名字 | 描述 | 價值 |
---|---|---|
clientCertificate | 用來驗證服務主體的Base64編碼憑證 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
clientCertificatePassword | 用來驗證服務主體之憑證的密碼 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
clientCertificateSendChain | 指定取得令牌時是否要在用戶端宣告中包含 x5c 標頭,以啟用用戶端憑證的主體名稱/簽發者型驗證 | bool |
clientId | 用來驗證服務主體的用戶端標識碼。 | 字串 |
clientSecret | 驗證服務主體的客戶端密碼 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
tenantId | 驗證服務主體的租用戶標識碼 | 字串 |
SubstituteFromDefinition
名字 | 描述 | 價值 |
---|---|---|
類 | 定義是否為 ConfigMap 或 Secret,保留要用於替代的變數。 | 字串 |
名字 | 保留要替代之變數的 ConfigMap/Secret 名稱。 | 字串 |
自選 | 如果 ConfigMap/Secret 不存在,請將 設定為 True 以繼續。 | bool |
TlsConfigDefinition
名字 | 描述 | 價值 |
---|---|---|
caCertificate | 用來驗證伺服器的Base64編碼CA憑證。 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
clientCertificate | 用來向 OCI 存放庫驗證用戶端的Base64編碼憑證。 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
privateKey | 用來向 OCI 存放庫驗證用戶端的 Base64 編碼私鑰。 | 字串 約束: 敏感性值。 以安全參數的形式傳入。 |
VerifyDefinition
名字 | 描述 | 價值 |
---|---|---|
matchOidcIdentity | 數位,定義在驗證 OCI 成品時比對身分識別的準則。 | MatchOidcIdentityDefinition[] |
供應商 | 驗證提供者名稱。 | 字串 |
verificationConfig | 物件,包含受信任作者的受信任公鑰。 | VerifyDefinitionVerificationConfig |
VerifyDefinitionVerificationConfig
名字 | 描述 | 價值 |
---|