Skip to main content
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

自訂Trident操作員安裝

貢獻者 netapp-aruldeepa juliantap netapp-mwallis

Trident 運算子可讓您使用規格中的屬性來自訂 Trident 安裝 TridentOrchestrator。如果您想自訂超出引數允許範圍的安裝 TridentOrchestrator、請考慮使用 `tridentctl`產生自訂的 YAML 資訊清單、以視需要進行修改。

瞭解控制器 Pod 和節點 Pod

Trident在叢集中的每個工作節點上以單一控制器 pod 和節點 pod 的形式運作。節點 pod 必須運行在您希望掛載Trident磁碟區的任何主機上。

Kubernetes "節點選取器""容忍和污染" 用於限制 Pod 在特定或偏好的節點上執行。使用「 ControllerPlugin' 」和 NodePlugin,您可以指定限制和置換。

  • 控制器外掛程式可處理磁碟區資源配置與管理、例如快照和調整大小。

  • 節點外掛程式會處理將儲存設備附加至節點的問題。

組態選項

警告 spec.namespace`在中指定 `TridentOrchestrator、表示安裝 Trident 的命名空間。此參數 * 安裝 Trident 後無法更新 * 。嘗試這樣做會導致 TridentOrchestrator`狀態變更為 `Failed。Trident 不打算跨命名空間移轉。

本表詳細說明 TridentOrchestrator 屬性。

參數 說明 預設

namespace

安裝 Trident 的命名空間

"default"

「Debug」

啟用 Trident 的偵錯功能

「假」

enableForceDetach

ontap-sanontap-san-economyontap-nas , 和 `ontap-nas-economy`僅有的。與 Kubernetes 非優雅節點關閉 (NGNS) 配合使用,使叢集管理員能夠在節點發生故障時安全地將掛載磁碟區的工作負載遷移到新節點。有關信息,請參閱"使用Trident實現有狀態應用程式的故障轉移自動化"

「假」

windows

設定為 true 可在Windows工作節點上安裝。

「假」

cloudProvider

在 AKS 叢集上使用託管身分識別或雲端身分識別時、請設定為 "Azure"。在 EKS 叢集上使用雲端身分識別時設為 "AWS"。在 GKE 叢集上使用雲端身分識別時設為 "GCP"

""

cloudIdentity

在 AKS 叢集上使用雲端身分識別時、請設定為工作負載身分識別(「 azure.Workload .idental/client-id : XXXXXXXX-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxx 」)。在 EKS 叢集上使用雲端身分識別時、請設定為 AWS IAM 角色(「 eks.amazonaws.com/role-arn: arn:AWS:iam::123456 :角色 Trident 角色」)。在 GKE 叢集上使用雲端身分識別時,請設定為雲端身分識別(「 iam.GKE 。 IO/GCP 服務帳戶: xxxx@mygcpproject.iam.gserviceaccount.com 」)。

""

IPv6

透過 IPv6 安裝 Trident

k8sTimeout

Kubernetes 操作逾時。

註 這 `k8sTimeout`參數僅適用於Trident安裝。

180sec

silenceAutosupport

請勿將 AutoSupport 套裝組合傳送至 NetApp
自動

「假」

「autosupportImage」

遙測的容器影像AutoSupport

"netapp/trident-autosupport10"

「autosupportProxy」

用於傳送 AutoSupport 的 Proxy 位址 / 連接埠
遙測

"http://proxy.example.com:8888"

解除安裝

用於解除安裝 Trident 的旗標

「假」

logFormat

要使用的 Trident 記錄格式 [text,json]

"text"

「TridentImage」

要安裝的 Trident 映像

"netapp/trident:25.10"

「影像登錄」

內部登錄的路徑、格式
<registry FQDN>[:port][/subpath]

"registry.k8s.io"

《kubeletDir

主機上的kubelet目錄路徑

"/var/lib/kubelet"

wipeout

要刪除以執行 Trident 完整移除的資源清單

「imagePullSecrets」

從內部登錄擷取映像的機密

imagePullPolicy

設定Trident運算子的影像提取原則。有效值包括:
Always 永遠拉出映像。
IfNotPresent 僅當節點上尚未存在映像時才提取映像。
Never 永遠不要拉動映像。

IfNotPresent

「controllerPluginNodeSelector」

用於 Pod 的其他節點選取器。 格式與相同 pod.spec.nodeSelector

無預設值;選用

「控制器插件」

覆寫 Pod 的 Kubernetes 公差。遵循與相同的格式 pod.spec.Tolerations

無預設值;選用

「nodePluginNodeSelector」

用於 Pod 的其他節點選取器。格式與相同 pod.spec.nodeSelector

無預設值;選用

「nodePluginBolerations」

覆寫 Pod 的 Kubernetes 公差。遵循與相同的格式 pod.spec.Tolerations

無預設值;選用

nodePrep

可讓 Trident 準備 Kubernetes 叢集的節點、以使用指定的資料儲存傳輸協定來管理磁碟區。* 目前 `iscsi`是唯一支援的值。 *

註 從 OpenShift 4.19 開始,此功能支援的最低Trident版本為 25.06.1。

k8sAPIQPS

控制器與 Kubernetes API 伺服器通訊時所使用的每秒查詢數 (QPS) 限制。 Burst 值會根據 QPS 值自動設定。

100; 選修的

enableConcurrency

支援並發Trident控制器操作以提高吞吐量。

註 技術預覽:此功能為實驗性功能,目前除了現有的ONTAP -SAN 驅動程式(統一ONTAP 9 中的 iSCSI 和 FCP 協定)技術預覽版外,還支援ONTAP-NAS(僅限 NFS)和ONTAP -SAN(統一ONTAP 9 中的 NVMe)驅動程式的有限並行工作流程。

resources

設定Trident控制器和節點 pod 的 Kubernetes 資源限制和請求。您可以為每個容器和邊車配置 CPU 和內存,以管理 Kubernetes 中的資源分配。

有關配置資源請求和限制的更多信息,請參閱"Pod 和容器的資源管理"

警告
  • 請勿變更任何容器或欄位的名稱。

  • 請勿更改縮排 - YAML 縮排對於正確解析至關重要。

註
  • 預設不套用任何限制-只有請求才有預設值,如果未指定則會自動套用。

  • 容器名稱依其在 pod 規格中的顯示方式列出。

  • 邊車列在每個主貨櫃下方。

  • 查看TORC的 `status.CurrentInstallationParams`用於查看目前應用值的欄位。

resources:
  controller:
    trident-main:
      requests:
        cpu: 10m
        memory: 80Mi
      limits:
          cpu:
          memory:
    csi-provisioner:
      requests:
        cpu: 2m
        memory: 20Mi
      limits:
        cpu:
        memory:
    csi-attacher:
      requests:
        cpu: 2m
        memory: 20Mi
      limits:
        cpu:
        memory:
    csi-resizer:
      requests:
        cpu: 3m
        memory: 20Mi
      limits:
        cpu:
        memory:
    csi-snapshotter:
      requests:
        cpu: 2m
        memory: 20Mi
      limits:
        cpu:
        memory:
    trident-autosupport:
      requests:
        cpu: 1m
        memory: 30Mi
      limits:
        cpu:
        memory:
  node:
    linux:
      trident-main:
        requests:
          cpu: 10m
          memory: 60Mi
        limits:
          cpu:
          memory:
      node-driver-registrar:
        requests:
          cpu: 1m
          memory: 10Mi
        limits:
          cpu:
          memory:
    windows:
      trident-main:
        requests:
          cpu: 6m
          memory: 40Mi
        limits:
          cpu:
          memory:
      node-driver-registrar:
        requests:
          cpu: 6m
          memory: 40Mi
        limits:
          cpu:
          memory:
      liveness-probe:
        requests:
          cpu: 2m
          memory: 40Mi
        limits:
          cpu:
          memory:

httpsMetrics

為 Prometheus 指標端點啟用 HTTPS。

「主機網路」

為Trident控制器啟用主機聯網功能。在多宿主網路中,當需要分離前端和後端流量時,這非常有用。

註 如需格式化 Pod 參數的詳細資訊、請參閱 "將Pod指派給節點"

組態範例

您可以使用下列屬性組態選項在定義時 `TridentOrchestrator`自訂您的安裝。

基本自訂配置

這個範例是在運行以下命令後創建的: `cat deploy/crds/tridentorchestrator_cr_imagepullsecrets.yaml`該命令代表一個基本的自訂安裝:

apiVersion: trident.netapp.io/v1
kind: TridentOrchestrator
metadata:
  name: trident
spec:
  debug: true
  namespace: trident
  imagePullSecrets:
  - thisisasecret
節點選擇器

此範例使用節點選擇器安裝Trident 。

apiVersion: trident.netapp.io/v1
kind: TridentOrchestrator
metadata:
  name: trident
spec:
  debug: true
  namespace: trident
  controllerPluginNodeSelector:
    nodetype: master
  nodePluginNodeSelector:
    storage: netapp
Windows 工作節點

這個範例是在運行以下命令後創建的: `cat deploy/crds/tridentorchestrator_cr.yaml`該指令在 Windows 工作節點上安裝Trident 。

apiVersion: trident.netapp.io/v1
kind: TridentOrchestrator
metadata:
  name: trident
spec:
  debug: true
  namespace: trident
  windows: true
AKS 叢集上的託管身份

本範例安裝Trident以在 AKS 叢集上啟用託管身分。

apiVersion: trident.netapp.io/v1
kind: TridentOrchestrator
metadata:
  name: trident
spec:
  debug: true
  namespace: trident
  cloudProvider: "Azure"
AKS 叢集上的雲端身份

本範例在 AKS 叢集上安裝Trident以用於雲端身分。

apiVersion: trident.netapp.io/v1
kind: TridentOrchestrator
metadata:
  name: trident
spec:
  debug: true
  namespace: trident
  cloudProvider: "Azure"
  cloudIdentity: 'azure.workload.identity/client-id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx'
EKS 叢集上的雲端身份

本範例在 AKS 叢集上安裝Trident以用於雲端身分。

apiVersion: trident.netapp.io/v1
kind: TridentOrchestrator
metadata:
  name: trident
spec:
  debug: true
  namespace: trident
  cloudProvider: "AWS"
  cloudIdentity: "'eks.amazonaws.com/role-arn: arn:aws:iam::123456:role/trident-role'"
GKE 的雲端身分識別

本範例在 GKE 叢集上安裝Trident以用於雲端身分。

apiVersion: trident.netapp.io/v1
kind: TridentBackendConfig
metadata:
  name: backend-tbc-gcp-gcnv
spec:
  version: 1
  storageDriverName: google-cloud-netapp-volumes
  projectNumber: '012345678901'
  network: gcnv-network
  location: us-west2
  serviceLevel: Premium
  storagePool: pool-premium1
Trident控制器和Trident Linux 節點 Pod 的 Kubernetes 資源請求和限製配置

本範例為Trident控制器和Trident Linux 節點 pod 設定 Kubernetes 資源請求和限制。

警告 免責聲明:本範例中提供的請求和限制值僅用於演示目的。請根據您的環境和工作負載需求調整這些值。
apiVersion: trident.netapp.io/v1
kind: TridentOrchestrator
metadata:
  name: trident
spec:
  debug: true
  namespace: trident
  imagePullSecrets:
  - thisisasecret
  resources:
    controller:
      trident-main:
        requests:
          cpu: 10m
          memory: 80Mi
        limits:
          cpu: 200m
          memory: 256Mi
      # sidecars
      csi-provisioner:
        requests:
          cpu: 2m
          memory: 20Mi
        limits:
          cpu: 100m
          memory: 64Mi
      csi-attacher:
        requests:
          cpu: 2m
          memory: 20Mi
        limits:
          cpu: 100m
          memory: 64Mi
      csi-resizer:
        requests:
          cpu: 3m
          memory: 20Mi
        limits:
          cpu: 100m
          memory: 64Mi
      csi-snapshotter:
        requests:
          cpu: 2m
          memory: 20Mi
        limits:
          cpu: 100m
          memory: 64Mi
      trident-autosupport:
        requests:
          cpu: 1m
          memory: 30Mi
        limits:
          cpu: 50m
          memory: 128Mi
    node:
      linux:
        trident-main:
          requests:
            cpu: 10m
            memory: 60Mi
          limits:
            cpu: 200m
            memory: 256Mi
        # sidecars
        node-driver-registrar:
          requests:
            cpu: 1m
            memory: 10Mi
          limits:
            cpu: 50m
            memory: 32Mi
Kubernetes資源請求和限製配置,適用於Trident控制器以及Trident Windows和Linux節點Pod

本範例為Trident控制器和Trident Windows 和 Linux 節點 pod 設定 Kubernetes 資源請求和限制。

警告 免責聲明:本範例中提供的請求和限制值僅用於演示目的。請根據您的環境和工作負載需求調整這些值。
apiVersion: trident.netapp.io/v1
kind: TridentOrchestrator
metadata:
  name: trident
spec:
  debug: true
  namespace: trident
  imagePullSecrets:
  - thisisasecret
  windows: true
  resources:
    controller:
      trident-main:
        requests:
          cpu: 10m
          memory: 80Mi
        limits:
          cpu: 200m
          memory: 256Mi
        # sidecars
      csi-provisioner:
        requests:
          cpu: 2m
          memory: 20Mi
        limits:
          cpu: 100m
          memory: 64Mi
      csi-attacher:
        requests:
          cpu: 2m
          memory: 20Mi
        limits:
          cpu: 100m
          memory: 64Mi
      csi-resizer:
        requests:
          cpu: 3m
          memory: 20Mi
        limits:
          cpu: 100m
          memory: 64Mi
      csi-snapshotter:
        requests:
          cpu: 2m
          memory: 20Mi
        limits:
          cpu: 100m
          memory: 64Mi
      trident-autosupport:
        requests:
          cpu: 1m
          memory: 30Mi
        limits:
          cpu: 50m
          memory: 128Mi
    node:
      linux:
        trident-main:
          requests:
            cpu: 10m
            memory: 60Mi
          limits:
            cpu: 200m
            memory: 256Mi
        # sidecars
        node-driver-registrar:
          requests:
            cpu: 1m
            memory: 10Mi
          limits:
            cpu: 50m
            memory: 32Mi
      windows:
        trident-main:
          requests:
            cpu: 6m
            memory: 40Mi
          limits:
            cpu: 200m
            memory: 128Mi
        # sidecars
        node-driver-registrar:
          requests:
            cpu: 6m
            memory: 40Mi
          limits:
            cpu: 100m
            memory: 128Mi
        liveness-probe:
          requests:
            cpu: 2m
            memory: 40Mi
          limits:
            cpu: 50m
            memory: 64Mi