feat: add HostDeviceNetwork template, remove infiniband hostPath, disable privileged

- Add hostdevicenetwork.yaml template (whereabouts IPAM)
- New values: network.resourceName, networkNamespace, ipam.range/exclude
- Remove /dev/infiniband hostPath volume and volumeMount
- Set privileged: false in securityContext
- Bump chart version to 0.2.0
This commit is contained in:
Cloud User 2026-03-04 16:03:32 +09:00
parent f423a18a42
commit c4c586d57e
4 changed files with 30 additions and 10 deletions

View File

@ -2,5 +2,5 @@ apiVersion: v2
name: nccl-perftest name: nccl-perftest
description: Multi-node NCCL distributed training performance test description: Multi-node NCCL distributed training performance test
type: application type: application
version: 0.1.0 version: 0.2.0
appVersion: "1.0.0" appVersion: "1.0.0"

View File

@ -0,0 +1,21 @@
apiVersion: mellanox.com/v1alpha1
kind: HostDeviceNetwork
metadata:
name: {{ .Values.network.nadName }}
labels:
{{- include "nccl-perftest.labels" . | nindent 4 }}
spec:
ipam: |
{
"type": "whereabouts",
"datastore": "kubernetes",
"kubernetes": {
"kubeconfig": "/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig"
},
"range": {{ .Values.network.ipam.range | quote }},
"exclude": {{ .Values.network.ipam.exclude | toJson }},
"log_file": "/var/log/whereabouts.log",
"log_level": "info"
}
resourceName: {{ .Values.network.resourceName }}
networkNamespace: {{ .Values.network.networkNamespace }}

View File

@ -22,7 +22,7 @@ spec:
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext: securityContext:
privileged: true privileged: false
capabilities: capabilities:
add: add:
- IPC_LOCK - IPC_LOCK
@ -55,8 +55,6 @@ spec:
mountPath: /config_scripts mountPath: /config_scripts
- name: shared-memory - name: shared-memory
mountPath: /dev/shm mountPath: /dev/shm
- name: infiniband
mountPath: /dev/infiniband
- name: cifar-data - name: cifar-data
mountPath: /workspace/data/cifar-10-batches-py mountPath: /workspace/data/cifar-10-batches-py
volumes: volumes:
@ -68,10 +66,6 @@ spec:
emptyDir: emptyDir:
medium: Memory medium: Memory
sizeLimit: {{ .Values.shmSize }} sizeLimit: {{ .Values.shmSize }}
- name: infiniband
hostPath:
path: {{ .Values.volumes.infiniband.hostPath }}
type: Directory
- name: cifar-data - name: cifar-data
hostPath: hostPath:
path: {{ .Values.volumes.dataset.hostPath }} path: {{ .Values.volumes.dataset.hostPath }}

View File

@ -21,6 +21,13 @@ shmSize: "128Gi"
network: network:
nadName: "hostdevice-net" nadName: "hostdevice-net"
resourceName: "hostdev"
networkNamespace: "nvidia-network-operator"
ipam:
range: "10.100.0.0/28"
exclude:
- "10.100.0.0"
- "10.100.0.15"
nccl: nccl:
debug: "INFO" debug: "INFO"
@ -31,7 +38,5 @@ nccl:
debugFile: "" # 비어있으면 설정 안 함 debugFile: "" # 비어있으면 설정 안 함
volumes: volumes:
infiniband:
hostPath: "/dev/infiniband"
dataset: dataset:
hostPath: "/home/ubuntu/cifar-10-batches-py" hostPath: "/home/ubuntu/cifar-10-batches-py"