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:
Mikko Ylinen 2022-03-01 07:40:40 +02:00
parent 289fbb2eaa
commit fb73e2ecb3

View File

@ -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 {