mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Merge pull request #59227 from juanvallejo/jvallejo/remove-mapper-dep-printer
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove mapper dependency for cmdutil.Factory#PrintSuccess **Release note**: ```release-note NONE ``` Part of a series of patches removing printing stack dependency on mappings the rest mapper **Before** ``` $ kubectl label pod/my-pod label=label pod "my-pod" labeled ``` **After** ``` $ kubectl label pod/my-pod label=label pods "my-pod" labeled ``` cc @deads2k
This commit is contained in:
@@ -300,7 +300,7 @@ func RunApply(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, opti
|
||||
if len(output) > 0 && !shortOutput {
|
||||
return f.PrintResourceInfoForCommand(cmd, info, out)
|
||||
}
|
||||
f.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, dryRun, "created")
|
||||
f.PrintSuccess(shortOutput, out, info.Mapping.Resource, info.Name, dryRun, "created")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ func RunApply(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, opti
|
||||
|
||||
if string(patchBytes) == "{}" {
|
||||
count++
|
||||
f.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, false, "unchanged")
|
||||
f.PrintSuccess(shortOutput, out, info.Mapping.Resource, info.Name, false, "unchanged")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -353,7 +353,7 @@ func RunApply(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, opti
|
||||
if len(output) > 0 && !shortOutput {
|
||||
return f.PrintResourceInfoForCommand(cmd, info, out)
|
||||
}
|
||||
f.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, dryRun, "configured")
|
||||
f.PrintSuccess(shortOutput, out, info.Mapping.Resource, info.Name, dryRun, "configured")
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -520,7 +520,7 @@ func (p *pruner) prune(f cmdutil.Factory, namespace string, mapping *meta.RESTMa
|
||||
return err
|
||||
}
|
||||
}
|
||||
f.PrintSuccess(p.mapper, shortOutput, p.out, mapping.Resource, name, p.dryRun, "pruned")
|
||||
f.PrintSuccess(shortOutput, p.out, mapping.Resource, name, p.dryRun, "pruned")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user