Skip to content

Commit ec2fc0d

Browse files
committed
[Fix] amend neceassary changes and helm e2e test coverage
Signed-off-by: yansun1996 <Yan.Sun3@amd.com>
1 parent 728933e commit ec2fc0d

13 files changed

Lines changed: 94 additions & 1 deletion

File tree

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/manifests/amd-gpu-operator.clusterserviceversion.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ spec:
210210
path: devicePlugin.enableNodeLabeller
211211
x-descriptors:
212212
- urn:alm:descriptor:com.amd.deviceconfigs:enableNodeLabeller
213+
- description: HostNetwork specifies whether to use host network namespace for
214+
the device plugin DaemonSet pods.
215+
displayName: HostNetwork
216+
path: devicePlugin.hostNetwork
217+
x-descriptors:
218+
- urn:alm:descriptor:com.amd.deviceconfigs:hostNetwork
213219
- description: node labeller image registry secret used to pull/push images
214220
displayName: ImageRegistrySecret
215221
path: devicePlugin.imageRegistrySecret
@@ -572,6 +578,12 @@ spec:
572578
path: metricsExporter.enable
573579
x-descriptors:
574580
- urn:alm:descriptor:com.amd.deviceconfigs:enable
581+
- description: HostNetwork specifies whether to use host network namespace for
582+
the metrics exporter DaemonSet pods.
583+
displayName: HostNetwork
584+
path: metricsExporter.hostNetwork
585+
x-descriptors:
586+
- urn:alm:descriptor:com.amd.deviceconfigs:hostNetwork
575587
- description: metrics exporter image
576588
displayName: Image
577589
path: metricsExporter.image

bundle/manifests/amd.com_deviceconfigs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ spec:
264264
default: true
265265
description: enable or disable the node labeller
266266
type: boolean
267+
hostNetwork:
268+
description: HostNetwork specifies whether to use host network
269+
namespace for the device plugin DaemonSet pods.
270+
type: boolean
267271
imageRegistrySecret:
268272
description: node labeller image registry secret used to pull/push
269273
images
@@ -799,6 +803,10 @@ spec:
799803
enable:
800804
description: enable metrics exporter, disabled by default
801805
type: boolean
806+
hostNetwork:
807+
description: HostNetwork specifies whether to use host network
808+
namespace for the metrics exporter DaemonSet pods.
809+
type: boolean
802810
image:
803811
description: metrics exporter image
804812
pattern: ^([a-z0-9]+(?:[._-][a-z0-9]+)*(:[0-9]+)?)(/[a-z0-9]+(?:[._-][a-z0-9]+)*)*(?::[a-z0-9._-]+)?(?:@[a-zA-Z0-9]+:[a-f0-9]+)?$

config/crd/bases/amd.com_deviceconfigs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ spec:
260260
default: true
261261
description: enable or disable the node labeller
262262
type: boolean
263+
hostNetwork:
264+
description: HostNetwork specifies whether to use host network
265+
namespace for the device plugin DaemonSet pods.
266+
type: boolean
263267
imageRegistrySecret:
264268
description: node labeller image registry secret used to pull/push
265269
images
@@ -795,6 +799,10 @@ spec:
795799
enable:
796800
description: enable metrics exporter, disabled by default
797801
type: boolean
802+
hostNetwork:
803+
description: HostNetwork specifies whether to use host network
804+
namespace for the metrics exporter DaemonSet pods.
805+
type: boolean
798806
image:
799807
description: metrics exporter image
800808
pattern: ^([a-z0-9]+(?:[._-][a-z0-9]+)*(:[0-9]+)?)(/[a-z0-9]+(?:[._-][a-z0-9]+)*)*(?::[a-z0-9._-]+)?(?:@[a-zA-Z0-9]+:[a-f0-9]+)?$

config/manifests/bases/amd-gpu-operator.clusterserviceversion.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ spec:
177177
path: devicePlugin.enableNodeLabeller
178178
x-descriptors:
179179
- urn:alm:descriptor:com.amd.deviceconfigs:enableNodeLabeller
180+
- description: HostNetwork specifies whether to use host network namespace for
181+
the device plugin DaemonSet pods.
182+
displayName: HostNetwork
183+
path: devicePlugin.hostNetwork
184+
x-descriptors:
185+
- urn:alm:descriptor:com.amd.deviceconfigs:hostNetwork
180186
- description: node labeller image registry secret used to pull/push images
181187
displayName: ImageRegistrySecret
182188
path: devicePlugin.imageRegistrySecret
@@ -539,6 +545,12 @@ spec:
539545
path: metricsExporter.enable
540546
x-descriptors:
541547
- urn:alm:descriptor:com.amd.deviceconfigs:enable
548+
- description: HostNetwork specifies whether to use host network namespace for
549+
the metrics exporter DaemonSet pods.
550+
displayName: HostNetwork
551+
path: metricsExporter.hostNetwork
552+
x-descriptors:
553+
- urn:alm:descriptor:com.amd.deviceconfigs:hostNetwork
542554
- description: metrics exporter image
543555
displayName: Image
544556
path: metricsExporter.image

hack/k8s-patch/metadata-patch/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ deviceConfig:
121121
nodeLabellerArguments: []
122122
# -- image pull secret for device plugin and node labeller, e.g. {"name": "mySecretName"}
123123
imageRegistrySecret: {}
124+
# -- specify the kubelet device plugins directory path on the host, default is "/var/lib/kubelet/device-plugins", make sure this path is consistent with kubelet configuration on the cluster for device plugin to work properly
125+
kubeletSocketPath: "/var/lib/kubelet/device-plugins"
126+
# -- specify whether to use host network for device plugin daemonset
127+
hostNetwork: false
124128
upgradePolicy:
125129
# -- the type of daemonset upgrade, RollingUpdate or OnDelete
126130
upgradeStrategy: RollingUpdate
@@ -145,6 +149,8 @@ deviceConfig:
145149
tolerations: []
146150
# -- metrics exporter image pull secret, e.g. {"name": "pullSecretName"}
147151
imageRegistrySecret: {}
152+
# -- specify whether to use host network for metrics exporter daemonset
153+
hostNetwork: false
148154
# -- metrics exporter node selector, if not specified it will reuse spec.selector
149155
selector: {}
150156
upgradePolicy:

hack/k8s-patch/template-patch/default-deviceconfig.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ spec:
183183
{{- with .kubeletSocketPath }}
184184
kubeletSocketPath: {{ . }}
185185
{{- end }}
186+
187+
{{- if (hasKey . "hostNetwork") }}
188+
hostNetwork: {{ .hostNetwork }}
189+
{{- end }}
186190
{{- end }}
187191

188192
{{- with .Values.deviceConfig.spec.metricsExporter }}
@@ -255,6 +259,10 @@ spec:
255259
{{- toYaml . | nindent 6 }}
256260
{{- end }}
257261

262+
{{- if (hasKey . "hostNetwork") }}
263+
hostNetwork: {{ .hostNetwork }}
264+
{{- end }}
265+
258266
{{- with .rbacConfig }}
259267
rbacConfig:
260268
{{- if (hasKey . "enable") }}

helm-charts-k8s/Chart.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ dependencies:
99
repository: file://./charts/remediation-crds
1010
version: v1.0.0
1111
digest: sha256:4c6b1f3224839e54d1523759be597d20ca2fc6508eb17fda2992a95a00e1fd70
12-
generated: "2026-03-10T05:41:14.760044744Z"
12+
generated: "2026-03-11T23:36:30.598519294Z"

helm-charts-k8s/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ Kubernetes: `>= 1.29.0-0`
181181
| deviceConfig.spec.devicePlugin.devicePluginTolerations | list | `[]` | device plugin tolerations |
182182
| deviceConfig.spec.devicePlugin.enableDevicePlugin | bool | `true` | enable/disable the device plugin. Cannot be enabled at the same time as draDriver. |
183183
| deviceConfig.spec.devicePlugin.enableNodeLabeller | bool | `true` | enable / disable node labeller |
184+
| deviceConfig.spec.devicePlugin.hostNetwork | bool | `false` | specify whether to use host network for device plugin daemonset |
184185
| deviceConfig.spec.devicePlugin.imageRegistrySecret | object | `{}` | image pull secret for device plugin and node labeller, e.g. {"name": "mySecretName"} |
186+
| deviceConfig.spec.devicePlugin.kubeletSocketPath | string | `"/var/lib/kubelet/device-plugins"` | specify the kubelet device plugins directory path on the host, default is "/var/lib/kubelet/device-plugins", make sure this path is consistent with kubelet configuration on the cluster for device plugin to work properly |
185187
| deviceConfig.spec.devicePlugin.nodeLabellerArguments | list | `[]` | pass supported labels while starting node labeller daemonset, default ["vram", "cu-count", "simd-count", "device-id", "family", "product-name", "driver-version"], also support ["compute-memory-partition", "compute-partitioning-supported", "memory-partitioning-supported"] |
186188
| deviceConfig.spec.devicePlugin.nodeLabellerImage | string | `"rocm/k8s-device-plugin:labeller-latest"` | node labeller image |
187189
| deviceConfig.spec.devicePlugin.nodeLabellerImagePullPolicy | string | `"IfNotPresent"` | node labeller image pull policy |
@@ -219,6 +221,7 @@ Kubernetes: `>= 1.29.0-0`
219221
| deviceConfig.spec.driver.version | string | `"30.20.1"` | specify an out-of-tree driver version to install |
220222
| deviceConfig.spec.metricsExporter.config | object | `{}` | name of the metrics exporter config map, e.g. {"name": "metricConfigMapName"} |
221223
| deviceConfig.spec.metricsExporter.enable | bool | `true` | enable / disable device metrics exporter |
224+
| deviceConfig.spec.metricsExporter.hostNetwork | bool | `false` | specify whether to use host network for metrics exporter daemonset |
222225
| deviceConfig.spec.metricsExporter.image | string | `"docker.io/rocm/device-metrics-exporter:latest"` | metrics exporter image |
223226
| deviceConfig.spec.metricsExporter.imagePullPolicy | string | `"IfNotPresent"` | metrics exporter image pull policy |
224227
| deviceConfig.spec.metricsExporter.imageRegistrySecret | object | `{}` | metrics exporter image pull secret, e.g. {"name": "pullSecretName"} |

helm-charts-k8s/crds/deviceconfig-crd.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ spec:
269269
default: true
270270
description: enable or disable the node labeller
271271
type: boolean
272+
hostNetwork:
273+
description: HostNetwork specifies whether to use host network namespace
274+
for the device plugin DaemonSet pods.
275+
type: boolean
272276
imageRegistrySecret:
273277
description: node labeller image registry secret used to pull/push
274278
images
@@ -803,6 +807,10 @@ spec:
803807
enable:
804808
description: enable metrics exporter, disabled by default
805809
type: boolean
810+
hostNetwork:
811+
description: HostNetwork specifies whether to use host network namespace
812+
for the metrics exporter DaemonSet pods.
813+
type: boolean
806814
image:
807815
description: metrics exporter image
808816
pattern: ^([a-z0-9]+(?:[._-][a-z0-9]+)*(:[0-9]+)?)(/[a-z0-9]+(?:[._-][a-z0-9]+)*)*(?::[a-z0-9._-]+)?(?:@[a-zA-Z0-9]+:[a-f0-9]+)?$

0 commit comments

Comments
 (0)