自訂Trident Protect 安裝
您可以自訂Trident Protect 的預設配置,以符合您環境的特定要求。
指定Trident Protect 容器資源限制
安裝Trident Protect 後,您可以使用設定檔來指定Trident Protect 容器的資源限制。設定資源限制可以控制Trident Protect 作業消耗叢集資源的程度。
-
建立名為的檔案
resourceLimits.yaml。 -
根據您的環境需求,在檔案中填入Trident Protect 容器的資源限制選項。
以下範例組態檔顯示可用的設定,並包含每個資源限制的預設值:
--- jobResources: defaults: limits: cpu: 8000m memory: 10000Mi ephemeralStorage: "" requests: cpu: 100m memory: 100Mi ephemeralStorage: "" resticVolumeBackup: limits: cpu: "" memory: "" ephemeralStorage: "" requests: cpu: "" memory: "" ephemeralStorage: "" resticVolumeRestore: limits: cpu: "" memory: "" ephemeralStorage: "" requests: cpu: "" memory: "" ephemeralStorage: "" kopiaVolumeBackup: limits: cpu: "" memory: "" ephemeralStorage: "" requests: cpu: "" memory: "" ephemeralStorage: "" kopiaVolumeRestore: limits: cpu: "" memory: "" ephemeralStorage: "" requests: cpu: "" memory: "" ephemeralStorage: "" -
套用檔案中的值
resourceLimits.yaml:helm upgrade trident-protect -n trident-protect netapp-trident-protect/trident-protect -f resourceLimits.yaml --reuse-values
自訂安全性內容限制
安裝Trident Protect 後,您可以使用設定檔來修改Trident Protect 容器的 OpenShift 安全上下文約束 (SCC)。這些約束定義了 Red Hat OpenShift 叢集中 pod 的安全性限制。
-
建立名為的檔案
sccconfig.yaml。 -
將 SCC 選項新增至檔案,並根據環境需求修改參數。
以下範例顯示 SCC 選項參數的預設值:
scc: create: true name: trident-protect-job priority: 1下表說明 SCC 選項的參數:
參數 說明 預設 建立
決定是否可以建立 SCC 資源。只有在設定為
true`且 Helm 安裝程序識別 OpenShift 環境時,才會建立 SCC 資源 `scc.create。如果未在 OpenShift 上操作,或如果設為false,則 `scc.create`不會建立任何 SCC 資源。是的
名稱
指定SCC的名稱。
Trident 保護工作
優先順序
定義 SCC 的優先順序。優先順序值較高的 SCC 會在值較低之前進行評估。
1
-
套用檔案中的值
sccconfig.yaml:helm upgrade trident-protect -n trident-protect netapp-trident-protect/trident-protect -f sccconfig.yaml --reuse-values這會將預設值取代為檔案中指定的值
sccconfig.yaml。
設定其他Trident Protect 舵圖設置
您可以自訂AutoSupport設定和命名空間過濾以滿足您的特定要求。下表描述了可用的配置參數:
| 參數 | 類型 | 說明 |
|---|---|---|
自動支援代理 |
字串 |
為NetApp AutoSupport連線配置代理 URL。使用此功能透過代理伺服器路由支援包上傳。例子: |
自動支援.不安全 |
布林值 |
設定為時跳過AutoSupport代理連線的 TLS 驗證 |
自動支援已啟用 |
布林值 |
啟用或停用每日Trident Protect AutoSupport組合包上傳。設定為 |
恢復跳過命名空間註釋 |
字串 |
若要從備份和復原作業中排除的命名空間註解的逗號分隔清單。允許您根據註釋過濾命名空間。 |
restoreSkipNamespaceLabels |
字串 |
若要從備份和復原作業中排除的命名空間標籤的逗號分隔清單。允許您根據標籤過濾命名空間。 |
您可以使用 YAML 設定檔或命令列標誌來設定這些選項:
-
建立設定檔並命名
values.yaml。 -
在您建立的文件中,新增您想要自訂的設定選項。
autoSupport: enabled: false proxy: http://my.proxy.url insecure: true restoreSkipNamespaceAnnotations: "annotation1,annotation2" restoreSkipNamespaceLabels: "label1,label2" -
填充後 `values.yaml`具有正確值的文件,應用設定檔:
helm upgrade trident-protect -n trident-protect netapp-trident-protect/trident-protect -f values.yaml --reuse-values
-
使用以下命令 `--set`標誌來指定單一參數:
helm upgrade trident-protect -n trident-protect netapp-trident-protect/trident-protect \ --set autoSupport.enabled=false \ --set autoSupport.proxy=http://my.proxy.url \ --set-string restoreSkipNamespaceAnnotations="{annotation1,annotation2}" \ --set-string restoreSkipNamespaceLabels="{label1,label2}" \ --reuse-values
將Trident Protect Pod 限制在特定節點上
您可以使用 Kubernetes nodeSelector 節點來選擇約束,根據節點標籤來控制哪些節點有資格執行Trident Protect pod。預設情況下, Trident Protect 僅限於執行 Linux 的節點。您可以根據需要進一步自訂這些限制條件。
-
建立名為的檔案
nodeSelectorConfig.yaml。 -
將 nodeSelector 選項新增至檔案,並修改檔案以新增或變更節點標籤,以根據環境需求加以限制。例如,下列檔案包含預設的作業系統限制,但也針對特定區域和應用程式名稱:
nodeSelector: kubernetes.io/os: linux region: us-west app.kubernetes.io/name: mysql -
套用檔案中的值
nodeSelectorConfig.yaml:helm upgrade trident-protect -n trident-protect netapp-trident-protect/trident-protect -f nodeSelectorConfig.yaml --reuse-values這會將預設限制取代為您在檔案中指定的限制
nodeSelectorConfig.yaml。