Skip to main content
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

自定义Trident操作员安装

贡献者 netapp-aruldeepa juliantap netapp-mwallis

Trident操作员允许您使用规范中的属性自定义Trident安装 TridentOrchestrator。如果要在允许的参数之外自定义安装 TridentOrchestrator、请考虑使用生成自定义YAML清单、 `tridentctl`以便根据需要进行修改。

了解控制器Pod和节点Pod

Trident在集群中的每个工作节点上以单个控制器 pod 和节点 pod 的形式运行。节点 pod 必须运行在您希望挂载Trident卷的任何主机上。

Kubernetes "节点选择器""容忍和损害" 用于限制Pod在特定节点或首选节点上运行。使用`ControllerPlugin`和 NodePlugin、您可以指定约束和覆盖。

  • 控制器插件负责卷配置和管理、例如快照和调整大小。

  • 节点插件负责将存储连接到节点。

配置选项

警告 spec.namespace`在中指定 `TridentOrchestrator`以表示安装Trident的命名空间。安装Trident后无法更新此参数*。尝试执行此操作会导致 `TridentOrchestrator`状态更改为 `Failed。Trident不应跨多个名称卷进行迁移。

此表详细介绍了相关信息 TridentOrchestrator 属性。

参数 Description Default

namespace

要安装Trident的命名空间

"default"

debug

为Trident启用调试

false

enableForceDetach

ontap-sanontap-san-economyontap-nas , 和 `ontap-nas-economy`仅有的。与 Kubernetes 非优雅节点关闭 (NGNS) 配合使用,使集群管理员能够在节点出现故障时安全地将挂载卷的工作负载迁移到新节点。有关信息,请参阅"使用Trident实现有状态应用程序的故障转移自动化"

false

windows

设置为 true 启用在Windows工作节点上的安装。

false

cloudProvider

如果在AKS集群上使用托管身份或云身份、请设置为 "Azure"。如果在EKS集群上使用云标识、请设置为 "AWS"。在GKE集群上使用云标识时、将设置为 "GCP"

""

cloudIdentity

在AKS集群上使用云标识时、设置为工作负载标识("azure.Workload .Identity /client-id:XXXXXX-xxxx-xxxx-xxxx-xxxxxxxxxxx")。在Trident集群上使用云身份时、设置为eks.amazonaws.com/role-arn: AWS IAM角色("eks arn:aws:iam:::12356:roe/EAM-roe"")。在GKE集群上使用云标识时、请设置为云标识("iam.GKE.IO/GCP-service-account:xxxx@mygcpproject.iam.gserviceaccount.com ")。

""

IPv6

安装基于IPv6的Trident

false

k8sTimeout

Kubernetes 操作超时。

备注 这 `k8sTimeout`参数仅适用于Trident安装。

180sec

silenceAutosupport

不要向NetApp发送AutoSupport捆绑包
自动

false

autosupport 映像

AutoSupport 遥测的容器映像

"netapp/trident-autosupport10"

autosupport 代理

用于发送AutoSupport的代理的地址/端口
遥测

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

卸载

用于卸载Trident的标志

false

logFormat

要使用的Trident日志记录格式[text,json]

"text"

TridentImage

要安装的Trident映像

"netapp/trident:25.10"

imageRegistry

内部注册表的路径、格式
<registry FQDN>[:port][/subpath]

"registry.k8s.io"

kubeletDir

主机上的 kubelet 目录的路径

"/var/lib/kubelet"

wipeout

要删除以执行Trident完全删除的资源列表

imagePullSecs

从内部注册表中提取映像的机密信息

imagePullPolicy

设置Trident运算符的映像提取策略。有效值为:
Always 以始终提取映像。
IfNotPresent 仅当节点上尚不存在映像时才提取该映像。
Never 从不提取映像。

IfNotPresent

控制器插件节点选择器

Pod的其他节点选择器。 遵循与相同的格式 pod.spec.nodeSelector

无默认值;可选

控制器插件公差

覆盖Kubernetes对Pod的容错。遵循与相同的格式 pod.spec.Tolerations

无默认值;可选

nodePluginNodeSelector

Pod的其他节点选择器。遵循与相同的格式 pod.spec.nodeSelector

无默认值;可选

nodePluginTholeations

覆盖Kubernetes对Pod的容错。遵循与相同的格式 pod.spec.Tolerations

无默认值;可选

nodePrep

使Trident能够使Kubbernetes集群的节点做好准备、以便使用指定的数据存储协议管理卷。目前, `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)驱动程序的有限并行工作流程。

false

resources

设置 Kubernetes 对Trident控制器和节点 pod 的资源限制和请求。您可以为每个容器和边车配置 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。

false

hostNetwork

为Trident控制器启用主机联网功能。在多宿主网络中,当需要分离前端和后端流量时,这非常有用。

false

备注 有关格式化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