Skip to content

Commit 4b26c94

Browse files
committed
Group struct members by type to minimize struct size
And avoid golangci-lint error.
1 parent 86a86e2 commit 4b26c94

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pkg/apis/deviceplugin/v1/gpudeviceplugin_types.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ type GpuDevicePluginSpec struct {
3131
// InitImage is a container image with tools (e.g., GPU NFD source hook) installed on each node.
3232
InitImage string `json:"initImage,omitempty"`
3333

34-
// EnableMonitoring enables the monitoring resource ('i915_monitoring')
35-
// which gives access to all GPU devices on given node.
36-
EnableMonitoring bool `json:"enableMonitoring,omitempty"`
37-
3834
// SharedDevNum is a number of containers that can share the same GPU device.
3935
// +kubebuilder:validation:Minimum=1
4036
SharedDevNum int `json:"sharedDevNum,omitempty"`
4137

42-
// ResourceManager handles the fractional resource management for multi-GPU nodes
43-
ResourceManager bool `json:"resourceManager,omitempty"`
44-
4538
// LogLevel sets the plugin's log level.
4639
// +kubebuilder:validation:Minimum=0
4740
LogLevel int `json:"logLevel,omitempty"`
4841

42+
// ResourceManager handles the fractional resource management for multi-GPU nodes
43+
ResourceManager bool `json:"resourceManager,omitempty"`
44+
45+
// EnableMonitoring enables the monitoring resource ('i915_monitoring')
46+
// which gives access to all GPU devices on given node.
47+
EnableMonitoring bool `json:"enableMonitoring,omitempty"`
48+
4949
// NodeSelector provides a simple way to constrain device plugin pods to nodes with particular labels.
5050
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
5151
}

0 commit comments

Comments
 (0)