Skip to content

Added tolerations support for dcgmexporter and neuronmonitor. #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apis/v1alpha1/dcgmexpoter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ type DcgmExporterSpec struct {
// consumed in the config file for the Collector.
// +optional
Env []v1.EnvVar `json:"env,omitempty"`
// Toleration to schedule DCGM Exporter pods.
// This is only relevant to daemonset, statefulset, and deployment mode
// +optional
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
// Volumes represents which volumes to use in the underlying collector deployment(s).
// +optional
// +listType=atomic
Expand Down
4 changes: 4 additions & 0 deletions apis/v1alpha1/neuronmonitor_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ type NeuronMonitorSpec struct {
// consumed in the config file for the Collector.
// +optional
Env []v1.EnvVar `json:"env,omitempty"`
// Toleration to schedule Neuron Monitor Exporter pods.
// This is only relevant to daemonset, statefulset, and deployment mode
// +optional
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
// Volumes represents which volumes to use in the underlying collector deployment(s).
// +optional
// +listType=atomic
Expand Down
1 change: 1 addition & 0 deletions internal/manifests/dcgmexporter/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func DaemonSet(params manifests.Params) *appsv1.DaemonSet {
ServiceAccountName: ServiceAccountName(params.DcgmExp),
Containers: []corev1.Container{Container(params.Config, params.Log, params.DcgmExp)},
Volumes: Volumes(params.DcgmExp),
Tolerations: params.DcgmExp.Spec.Tolerations,
NodeSelector: params.DcgmExp.Spec.NodeSelector,
Affinity: params.DcgmExp.Spec.Affinity,
},
Expand Down
1 change: 1 addition & 0 deletions internal/manifests/neuronmonitor/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func DaemonSet(params manifests.Params) *appsv1.DaemonSet {
ServiceAccountName: ServiceAccountName(params.NeuronExp),
Containers: []corev1.Container{Container(params.Config, params.Log, params.NeuronExp)},
Volumes: Volumes(params.NeuronExp),
Tolerations: params.NeuronExp.Spec.Tolerations,
NodeSelector: params.NeuronExp.Spec.NodeSelector,
Affinity: params.NeuronExp.Spec.Affinity,
},
Expand Down
Loading