Skip to content

Commit e304425

Browse files
chenjiandongxmandochen
andauthored
Fix image field unmarshal bug (#22)
Co-authored-by: mandochen <mandochen@tencent.com>
1 parent 15d61ce commit e304425

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ Flags:
7777
~ 🐶 kubectl images -n kube-system -oy dns
7878
- pod: coredns-78fcd69978-9pbjh
7979
container: coredns
80-
image: kube-system
80+
image: k8s.gcr.io/coredns/coredns:v1.8.4
8181
- pod: coredns-78fcd69978-jh7m2
8282
container: coredns
83-
image: kube-system
83+
image: k8s.gcr.io/coredns/coredns:v1.8.4
8484

8585
~ 🐶 kubectl images -A -c 0,1,3
8686
[Summary]: 2 namespaces, 11 pods, 11 containers and 9 different images
@@ -141,14 +141,14 @@ Flags:
141141
"namespace": "nginx",
142142
"pod": "nginx-deployment-66b6c48dd5-s9wv5",
143143
"container": "nginx",
144-
"image": "nginx",
144+
"image": "nginx:latest",
145145
"imagePullPolicy": "IfNotPresent"
146146
},
147147
{
148148
"namespace": "nginx",
149149
"pod": "nginx-deployment-66b6c48dd5-wmn9x",
150150
"container": "nginx",
151-
"image": "nginx",
151+
"image": "nginx:latest",
152152
"imagePullPolicy": "IfNotPresent"
153153
}
154154
]

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/spf13/cobra"
1010
)
1111

12-
const version = "0.5.0"
12+
const version = "0.5.1"
1313

1414
var rootCmd *cobra.Command
1515

kubectl_images.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func (ie *ImageEntity) filterBy(columns []string) ImageEntity {
103103
case labelContainer:
104104
entity.Container = ie.Container
105105
case labelImage:
106-
entity.Image = ie.Namespace
106+
entity.Image = ie.Image
107107
case labelImagePullPolicy:
108108
entity.ImagePullPolicy = ie.ImagePullPolicy
109109
}

0 commit comments

Comments
 (0)