Skip to content

Commit 4e79344

Browse files
authored
Merge pull request kubernetes#88467 from neolit123/1.18-print-volume-verbosity
kubeadm: modify how component volumes are printed
2 parents 327dd9d + 1b710a4 commit 4e79344

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cmd/kubeadm/app/phases/controlplane/manifests.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ func CreateStaticPodFiles(manifestDir, kustomizeDir string, cfg *kubeadmapi.Clus
9999
return errors.Errorf("couldn't retrieve StaticPodSpec for %q", componentName)
100100
}
101101

102+
// print all volumes that are mounted
103+
for _, v := range spec.Spec.Volumes {
104+
klog.V(2).Infof("[control-plane] adding volume %q for component %q", v.Name, componentName)
105+
}
106+
102107
// if kustomizeDir is defined, customize the static pod manifest
103108
if kustomizeDir != "" {
104109
kustomizedSpec, err := staticpodutil.KustomizeStaticPod(&spec, kustomizeDir)

cmd/kubeadm/app/phases/controlplane/volumes.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ func (c *controlPlaneHostPathMounts) AddHostPathMounts(component string, vols []
144144
// paths in the case that a user specifies the same volume/volume mount name.
145145
func (c *controlPlaneHostPathMounts) AddExtraHostPathMounts(component string, extraVols []kubeadmapi.HostPathMount) {
146146
for _, extraVol := range extraVols {
147-
fmt.Printf("[control-plane] Adding extra host path mount %q to %q\n", extraVol.Name, component)
148147
hostPathType := extraVol.PathType
149148
c.NewHostPathMount(component, extraVol.Name, extraVol.HostPath, extraVol.MountPath, extraVol.ReadOnly, &hostPathType)
150149
}

0 commit comments

Comments
 (0)