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)
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user