From 984b50356a8f0af62571e84f557d506bfa59a2ef Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 5 Apr 2024 07:58:37 +0200 Subject: [PATCH] Do not pass by composed struct It useless to use the composed struct field as the current "object" is composed by this one. Get Name field directly. (Thanks staticcheck) --- generator/deployment.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/deployment.go b/generator/deployment.go index 54b85db..caeb78e 100644 --- a/generator/deployment.go +++ b/generator/deployment.go @@ -236,7 +236,7 @@ func (d *Deployment) AddVolumes(service types.ServiceConfig, appName string) { VolumeSource: corev1.VolumeSource{ ConfigMap: &corev1.ConfigMapVolumeSource{ LocalObjectReference: corev1.LocalObjectReference{ - Name: cm.ObjectMeta.Name, + Name: cm.Name, }, }, }, @@ -268,7 +268,7 @@ func (d *Deployment) AddVolumes(service types.ServiceConfig, appName string) { VolumeSource: corev1.VolumeSource{ ConfigMap: &corev1.ConfigMapVolumeSource{ LocalObjectReference: corev1.LocalObjectReference{ - Name: cm.ObjectMeta.Name, + Name: cm.Name, }, }, },