Make the output kubectl.sh narrower

This commit is contained in:
Satnam Singh
2014-11-14 16:20:43 -08:00
parent 4681918888
commit fa0cb9a25e
2 changed files with 24 additions and 5 deletions

View File

@@ -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