mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 20:50:24 +00:00
Make the output kubectl.sh narrower
This commit is contained in:
@@ -127,12 +127,16 @@ func formatLabels(labelMap map[string]string) string {
|
||||
return l
|
||||
}
|
||||
|
||||
func makeImageList(spec *api.PodSpec) string {
|
||||
func listOfImages(spec *api.PodSpec) []string {
|
||||
var images []string
|
||||
for _, container := range spec.Containers {
|
||||
images = append(images, container.Image)
|
||||
}
|
||||
return strings.Join(images, ",")
|
||||
return images
|
||||
}
|
||||
|
||||
func makeImageList(spec *api.PodSpec) string {
|
||||
return strings.Join(listOfImages(spec), ",")
|
||||
}
|
||||
|
||||
// ExpandResourceShortcut will return the expanded version of resource
|
||||
|
Reference in New Issue
Block a user