chore: make csi getPodInfoAttrs func private
This commit is contained in:
parent
0017b602be
commit
82c2266f25
@ -222,7 +222,7 @@ func (m *csiBlockMapper) publishVolumeForBlock(
|
||||
return "", errors.New(log("blockMapper.publishVolumeForBlock failed to get VolumeLifecycleMode: %v", err))
|
||||
}
|
||||
if podInfoEnabled {
|
||||
volAttribs = mergeMap(volAttribs, GetPodInfoAttrs(m.pod, volumeLifecycleMode))
|
||||
volAttribs = mergeMap(volAttribs, getPodInfoAttrs(m.pod, volumeLifecycleMode))
|
||||
}
|
||||
|
||||
nodePublishSecrets := map[string]string{}
|
||||
|
@ -225,7 +225,7 @@ func (c *csiMountMgr) SetUpAt(dir string, mounterArgs volume.MounterArgs) error
|
||||
return volumetypes.NewTransientOperationFailure(log("mounter.SetUpAt failed to assemble volume attributes: %v", err))
|
||||
}
|
||||
if podInfoEnabled {
|
||||
volAttribs = mergeMap(volAttribs, GetPodInfoAttrs(c.pod, c.volumeLifecycleMode))
|
||||
volAttribs = mergeMap(volAttribs, getPodInfoAttrs(c.pod, c.volumeLifecycleMode))
|
||||
}
|
||||
|
||||
// Inject pod service account token into volume attributes
|
||||
|
@ -205,8 +205,8 @@ func createCSIOperationContext(volumeSpec *volume.Spec, timeout time.Duration) (
|
||||
return context.WithTimeout(ctx, timeout)
|
||||
}
|
||||
|
||||
// GetPodInfoAttrs returns pod info for NodePublish
|
||||
func GetPodInfoAttrs(pod *api.Pod, volumeMode storage.VolumeLifecycleMode) map[string]string {
|
||||
// getPodInfoAttrs returns pod info for NodePublish
|
||||
func getPodInfoAttrs(pod *api.Pod, volumeMode storage.VolumeLifecycleMode) map[string]string {
|
||||
attrs := map[string]string{
|
||||
"csi.storage.k8s.io/pod.name": pod.Name,
|
||||
"csi.storage.k8s.io/pod.namespace": pod.Namespace,
|
||||
|
Loading…
Reference in New Issue
Block a user