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

定制Trident Protect 安装

贡献者 netapp-revathid netapp-aruldeepa

您可以自定义Trident Protect 的默认配置,以满足您环境的特定要求。

指定Trident Protect 容器资源限制

安装Trident Protect 后,您可以使用配置文件来指定Trident Protect 容器的资源限制。设置资源限制可以控制Trident Protect 操作消耗集群资源的程度。

步骤
  1. 创建一个名为的文件 resourceLimits.yaml

  2. 根据您的环境需求,在文件中填充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: ""
  3. 应用文件中的值 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 的安全限制。

步骤
  1. 创建一个名为的文件 sccconfig.yaml

  2. 将scc选项添加到文件中、然后根据环境的需要修改参数。

    以下示例显示了SCC选项参数的默认值:

    scc:
      create: true
      name: trident-protect-job
      priority: 1

    下表介绍了SCC选项的参数:

    参数 说明 默认

    创建

    确定是否可以创建SCC资源。只有在将设置为 true`且Helm安装过程标识OpenShift环境时、才会创建SCC资源 `scc.create。如果不在OpenShift上运行,或者如果 scc.create`设置为 `false,则不会创建任何SCC资源。

    true

    name

    指定SCC的名称。

    Trident保护作业

    优先级

    定义SCC的优先级。优先级值较高的SCC会在优先级值较低的SCC之前进行评估。

    1

  3. 应用文件中的值 sccconfig.yaml

    helm upgrade trident-protect netapp-trident-protect/trident-protect -f sccconfig.yaml --reuse-values

    此操作会将默认值替换为文件中指定的值 sccconfig.yaml

配置NetApp AutoSupport连接以启用Trident Protect

您可以配置连接代理来更改Trident Protect 连接到NetApp Support 以上传支持包的方式。您可以根据需要将代理配置为使用安全连接或不安全连接。

配置安全代理连接
步骤
  1. 为Trident Protect 支持包上传配置安全代理连接:

    helm upgrade trident-protect -n trident-protect netapp-trident-protect/trident-protect --set autoSupport.proxy=http://my.proxy.url --reuse-values
配置不安全的代理连接
步骤
  1. 配置一个不安全的代理连接,用于上传Trident Protect 支持包,跳过 TLS 验证:

    helm upgrade trident-protect -n trident-protect netapp-trident-protect/trident-protect --set autoSupport.proxy=http://my.proxy.url --set autoSupport.insecure=true --reuse-values

将Trident Protect Pod 限制在特定节点上

您可以使用 Kubernetes nodeSelector 节点选择约束,根据节点标签来控制哪些节点有资格运行Trident Protect pod。默认情况下, Trident Protect 仅限于运行 Linux 的节点。您可以根据需要进一步自定义这些限制条件。

步骤
  1. 创建一个名为的文件 nodeSelectorConfig.yaml

  2. 将nodeSelector选项添加到文件中、然后修改文件以添加或更改节点标签、从而根据环境需求进行限制。例如、以下文件包含默认操作系统限制、但也针对特定区域和应用程序名称:

    nodeSelector:
      kubernetes.io/os: linux
      region: us-west
      app.kubernetes.io/name: mysql
  3. 应用文件中的值 nodeSelectorConfig.yaml

    helm upgrade trident-protect -n trident-protect netapp-trident-protect/trident-protect -f nodeSelectorConfig.yaml --reuse-values

    此操作会将默认限制替换为您在文件中指定的限制 nodeSelectorConfig.yaml

禁用每日Trident ProtectAutoSupport捆绑包上传。

您也可以选择禁用每日定期上传的Trident Protect AutoSupport支持包。

备注 默认情况下, Trident Protect 会收集有助于处理您可能提交的任何NetApp支持案例的支持信息,包括集群和受管应用程序的日志、指标和拓扑信息。 Trident Protect 会按计划每日向NetApp发送这些支持包。您可以手动操作"生成支持包"随时。
步骤
  1. 创建一个名为的文件 autosupportconfig.yaml

  2. 将AutoSupport选项添加到文件中、然后根据您的环境需求修改参数。

    以下示例显示了AutoSupport选项参数的默认值:

    autoSupport:
      enabled: true

    如果 autoSupport.enabled`将设置为 `false,则会禁用AutoSupport支持包的每日上传。

  3. 应用文件中的值 autosupportconfig.yaml

    helm upgrade trident-protect netapp-trident-protect/trident-protect -f autosupportconfig.yaml --reuse-values