跳到主要内容

Resource Pool Manager Chart 0.0.8

Chart:0.0.8 · appVersion:0.0.4 · RPM Release:rpm-0.0.4 · 发布时间:2026-11-26(UTC)

软件变更​

命名空间正则授权​

RPM 0.0.4 新增集群级别的 ResourcePoolRegexBinding 资源,按 Go RE2 正则表达式对命名空间全名进行匹配(长度限制为 1 至 256 字节),将匹配到的命名空间授权给指定资源池。Pod 准入时,RPM 直接结合精确绑定 ResourcePoolBinding 和正则规则计算可用资源池,不在命名空间内生成 ResourcePoolBinding 对象。

同一资源池同时存在精确绑定与正则规则时,精确绑定优先;多条正则规则同时匹配同一命名空间和资源池时,按规则名称字典序取第一条。创建或更新 ResourcePoolRegexBinding 需要集群级 CRD 写权限以及目标 ResourcePool 的 bind 权限。只要仍有 ResourcePoolRegexBinding 引用某资源池,RPM 会阻止删除该资源池。删除正则规则仅影响后续准入,不会驱逐已运行的 Pod。

运行时准入选项与配额记账​

运行时策略 ConfigMap(data.config.yaml)新增两个布尔配置项,省略时均默认为 false:

  • dryRun:Pod 创建时不修改 Pod 对象,仅模拟执行准入校验与配额检查而不写入配额账本;若实际准入会被拒绝,则返回 ResourcePoolWouldDeny 警告。
  • allowFallback:当受管 GPU Pod 未设置显式资源池注解、资源池标签或 hami.io/resource-pool-exempt 注解,且所在命名空间未获得任何资源池授权时,保持 Pod 原样放行并返回 ResourcePoolFallback 警告,交由常规调度流程处理。

配额记账与资源池校验仅统计带有资源池归属元数据(资源池标签、授权快照或配额预留注解)的 Pod。未通过资源池准入的 Pod(例如在 dryRun 模式下创建的 Pod)执行更新操作时,配额 Webhook 不再拦截。

MetaX sGPU 支持​

RPM 0.0.4 在启用 devices.metax.enabled: true 后支持 MetaX sGPU 的设备库存发现、资源池选择与分配准入。RPM 从调度器设备 ConfigMap 读取 metax.resourceVCountName、metax.resourceVMemoryName 和 metax.resourceVCoreName,解析节点上的 metax-tech.com/node-gpu-devices 库存注解,并校验 hami.io/metax-sgpu-devices-to-allocate、hami.io/metax-sgpu-devices-allocated、metax-tech.com/gpu-devices-allocated 和 metax-tech.com/predicate-time 等分配注解。GPUDevice 状态中的物理卡型号取自节点的 metax-tech.com/gpu.product 标签。

许可证校验​

Resource Pool Manager(RPM)属于闭源商业收费组件,采用与 HAMi Enterprise 一致的许可证校验方式。使用 RPM 0.0.4 及以上版本创建新的资源池、绑定、入池 GPUDevice 或受管工作负载前,需确保 HAMi Enterprise 已正确完成许可证激活。

未激活许可证或续期期间,已运行的 Pod 不会被驱逐,资源清理与删除操作仍可正常执行。许可证申请、激活与验证步骤见许可证申请与激活验证手册。

库存修订号稳定化与 64 位设备字段​

RPM 按 GPU UUID 排序后再计算 NVIDIA 设备注册信息的哈希值。Pod 变更与校验阶段之间如果仅发生设备列表顺序变化,不再导致已准入 Pod 的授权修订号失效;设备健康状态或容量变化仍会使过期授权失效。

节点库存协调在设备注册注解、节点 UID 和 Ascend 节点能力均未变化时,跳过注解反序列化与聚合索引重建,减少节点心跳和无关元数据更新带来的开销。GPUDevice 状态及分配字段中的 corePercent、memoryMiB 和 vgpuCount 从 32 位整数扩展为 64 位整数。

Chart 变更​

  • appVersion 从 0.0.3 升至 0.0.4;默认镜像从 ghcr.io/dynamia-ai/resource-pool-manager:v0.0.3 更新为 ghcr.io/dynamia-ai/resource-pool-manager:v0.0.4。
  • 新增 hami.existingConfigMapNamespace(默认 "")。指定后,Helm 从该命名空间读取调度器设备 ConfigMap,并将 manager 的所有命名空间级资源(Deployment、Service、证书资源、RBAC 和运行时策略 ConfigMap)部署至该命名空间;留空时默认使用 Helm Release 所在命名空间。
  • 新增 devices.metax.enabled(默认 false),启用后向 manager 传入 --metax-enabled=true 和 --metax-resource-names,并将 MetaX 资源名与注解加入 Pod Webhook 匹配规则。
  • 在模板层增加 Kubernetes 版本校验(>= 1.30.0-0),确保作为子 Chart 渲染时同样校验版本下限。
  • 新增 vresourcepoolregexbinding.resource.hami.io 校验 Webhook(路径为 /validate-resource-hami-io-v1alpha1-resourcepoolregexbinding,failurePolicy: Fail)。
  • 更新 RBAC 权限:
    • manager 的 ClusterRole 新增 resourcepoolregexbindings 的 get、list、watch 权限。
    • 管理员 ClusterRole 新增 resourcepoolregexbindings 的管理权限。
    • 命名空间级配置 Role 新增 manager 配置命名空间内 secrets 的 list 和 watch 权限,用于许可证校验。
  • 资源池 CRD Chart 从 hami-enterprise-crds 0.4.2(appVersion: 0.4.0)升级至 0.4.3(appVersion: 0.4.1),新增 resourcepoolregexbindings.resource.hami.io CRD,并将 gpudevices.resource.hami.io 中的 corePercent、memoryMiB 和 vgpuCount 字段从 int32 调整为 int64。

升级说明​

先将 hami-enterprise-crds 升级至 0.4.3,待 resourcepoolregexbindings.resource.hami.io 进入 Established 状态后再升级 Manager Chart。

在创建新的资源池、绑定、入池 GPUDevice 或受管工作负载前,确认 HAMi Enterprise 已正确完成许可证激活。激活与验证步骤见许可证申请与激活验证手册。

同时升级 Manager Chart 和 RPM 镜像。安装配置覆盖了 image.tag 时,将其显式设为 v0.0.4。升级 Chart 会补充许可证校验所需的 RBAC 权限,并注册 ResourcePoolRegexBinding 对应的 Webhook 与 RBAC 规则。

如果 Helm Release 与 HAMi 调度器不在同一命名空间,通过 hami.existingConfigMapNamespace 指定调度器设备 ConfigMap 所在的命名空间。该命名空间必须已存在且包含 hami.existingConfigMap 指定的 ConfigMap;Helm 会将 manager 的所有命名空间级资源(Deployment、Service、证书资源、RBAC 和运行时策略 ConfigMap)安装到该目标命名空间,Helm Release 记录仍保留在原 Release 命名空间。

启用 MetaX sGPU 时,设置 devices.metax.enabled: true,并确认调度器设备 ConfigMap 的 metax 配置段中已定义三个互不相同的资源名(resourceVCountName、resourceVMemoryName 和 resourceVCoreName)。新增设备后端或修改资源名期间,在 Webhook 规则与服务副本收敛前,新建 Pod 准入可能短暂被拒绝。

使用 ResourcePoolRegexBinding 时,按需收紧可以创建命名空间的权限,因为任何名称命中生效规则的新建命名空间都会获得对应资源池的访问权限。

Chart 继续要求 Kubernetes 1.30 或更新版本、单独安装的资源池 CRD、HAMi extender 调度模式,以及通过 hami.existingConfigMap 指定现有调度器设备 ConfigMap。安装操作见 HAMi Enterprise 安装文档中的 RPM 章节。

Values 说明​

以下参数说明取自 Chart 0.0.8 发布包随附的 README,保留原文。默认配置以该版本的 values.yaml 为准。

展开参数表
KeyTypeDefaultDescription
config.createbooltrueInitialize the runtime ConfigMap if absent. It is retained outside Helm ownership for external policy updates. For render-and-apply GitOps, precreate the ConfigMap and set this to false.
config.namestring""Runtime ConfigMap name; defaults to <workload name>-config. With config.create=false it must already exist in the manager namespace.
config.poolSchedulerPolicystring"binpack"Initial pool selection policy. Later changes belong in the runtime ConfigMap, not Helm values.
devices.ascend.enabledboolfalseInclude Ascend profiles from the scheduler device ConfigMap in resource-pool admission.
devices.hygon.enabledboolfalseInclude Hygon HCU resources from the scheduler device ConfigMap in resource-pool admission.
devices.metax.enabledboolfalse
devices.nvidia.enabledbooltrueInclude NVIDIA resources from the scheduler device ConfigMap in resource-pool admission.
fullnameOverridestring""Override the workload name. Names are limited to 43 characters to leave room for resource suffixes.
hami.existingConfigMapstring""Required name of the scheduler device ConfigMap. Helm reads data.device-config.yaml and the manager mounts the same ConfigMap. Upgrade the manager after scheduler device configuration changes.
hami.existingConfigMapNamespacestring""Namespace of the scheduler device ConfigMap and all namespaced manager resources. Defaults to the Helm release namespace when empty.
hami.schedulerNamestring"hami-scheduler"Scheduler name used by the existing HAMi installation. The scheduler must use HAMi extender admission and scheduling, not DRA.
healthProbeBindAddressstring":8081"Health server listen address.
image.pullPolicystring"IfNotPresent"Resource-pool-manager image pull policy.
image.repositorystring"ghcr.io/dynamia-ai/resource-pool-manager"Resource-pool-manager image repository, including registry.
image.tagstring"v0.0.4"Required published image tag. Independent of this chart's appVersion; update explicitly when releasing a new manager image.
imagePullSecretslist[]Registry Secret names used by the manager and certificate Jobs.
leaderElectbooltrueElect a leader for inventory and status reconcilers.
metricsBindAddressstring":8080"Metrics server listen address.
nameOverridestring""Override the chart name used in names and labels.
nodeSelectorobject{}Node selector for the manager.
podAnnotationsobject{}Additional annotations for manager Pods.
replicasint1Number of manager replicas. Use leader election when running multiple replicas.
resourcesobject{}Resource requests and limits for the manager.
timeoutSecondsint10Admission webhook timeout in seconds.
tolerationslist[]Tolerations for the manager.
webhook.tls.certManagerboolfalseUse an installed cert-manager controller for certificates and CA injection. When false, certgen hook Jobs manage webhook certificates.
webhook.tls.certgen.image.pullPolicystring"IfNotPresent"Certificate generator image pull policy.
webhook.tls.certgen.image.repositorystring"registry.k8s.io/ingress-nginx/kube-webhook-certgen"Certificate generator image repository, including registry.
webhook.tls.certgen.image.tagstring"v1.6.9"Certificate generator image tag.
webhook.tls.certgen.nodeSelectorobject{}Node selector for certificate Jobs.
webhook.tls.certgen.podAnnotationsobject{}Additional annotations for certificate Job Pods.
webhook.tls.certgen.priorityClassNamestring""Priority class for certificate Jobs.
webhook.tls.certgen.runAsUserint65532Non-root UID for certificate Jobs.
webhook.tls.certgen.tolerationslist[]Tolerations for certificate Jobs.
webhookPortint9443HTTPS port in the manager container.