mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
gpu: avoid slice realloc in GpuDevicePlugin controller
The amount of GPU plugin parameters has increased but the args slice capacity has not been changed. Update it to avoid slice reallocations. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
parent
289fbb2eaa
commit
fb73e2ecb3
@ -320,7 +320,7 @@ func (c *controller) UpdateStatus(rawObj client.Object, ds *apps.DaemonSet, node
|
||||
}
|
||||
|
||||
func getPodArgs(gdp *devicepluginv1.GpuDevicePlugin) []string {
|
||||
args := make([]string, 0, 5)
|
||||
args := make([]string, 0, 8)
|
||||
args = append(args, "-v", strconv.Itoa(gdp.Spec.LogLevel))
|
||||
|
||||
if gdp.Spec.EnableMonitoring {
|
||||
|
Loading…
Reference in New Issue
Block a user