Merge pull request #88467 from neolit123/1.18-print-volume-verbosity

kubeadm: modify how component volumes are printed
This commit is contained in:
Kubernetes Prow Robot 2020-02-24 11:03:15 -08:00 committed by GitHub
commit 4e79344501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -99,6 +99,11 @@ func CreateStaticPodFiles(manifestDir, kustomizeDir string, cfg *kubeadmapi.Clus
return errors.Errorf("couldn't retrieve StaticPodSpec for %q", componentName)
}
// print all volumes that are mounted
for _, v := range spec.Spec.Volumes {
klog.V(2).Infof("[control-plane] adding volume %q for component %q", v.Name, componentName)
}
// if kustomizeDir is defined, customize the static pod manifest
if kustomizeDir != "" {
kustomizedSpec, err := staticpodutil.KustomizeStaticPod(&spec, kustomizeDir)

View File

@ -144,7 +144,6 @@ func (c *controlPlaneHostPathMounts) AddHostPathMounts(component string, vols []
// paths in the case that a user specifies the same volume/volume mount name.
func (c *controlPlaneHostPathMounts) AddExtraHostPathMounts(component string, extraVols []kubeadmapi.HostPathMount) {
for _, extraVol := range extraVols {
fmt.Printf("[control-plane] Adding extra host path mount %q to %q\n", extraVol.Name, component)
hostPathType := extraVol.PathType
c.NewHostPathMount(component, extraVol.Name, extraVol.HostPath, extraVol.MountPath, extraVol.ReadOnly, &hostPathType)
}