Skip to content

Commit

Permalink
Fix image field unmarshal bug (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: mandochen <[email protected]>
  • Loading branch information
chenjiandongx and mandochen authored Jul 18, 2022
1 parent 15d61ce commit e304425
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ Flags:
~ 🐶 kubectl images -n kube-system -oy dns
- pod: coredns-78fcd69978-9pbjh
container: coredns
image: kube-system
image: k8s.gcr.io/coredns/coredns:v1.8.4
- pod: coredns-78fcd69978-jh7m2
container: coredns
image: kube-system
image: k8s.gcr.io/coredns/coredns:v1.8.4

~ 🐶 kubectl images -A -c 0,1,3
[Summary]: 2 namespaces, 11 pods, 11 containers and 9 different images
Expand Down Expand Up @@ -141,14 +141,14 @@ Flags:
"namespace": "nginx",
"pod": "nginx-deployment-66b6c48dd5-s9wv5",
"container": "nginx",
"image": "nginx",
"image": "nginx:latest",
"imagePullPolicy": "IfNotPresent"
},
{
"namespace": "nginx",
"pod": "nginx-deployment-66b6c48dd5-wmn9x",
"container": "nginx",
"image": "nginx",
"image": "nginx:latest",
"imagePullPolicy": "IfNotPresent"
}
]
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/spf13/cobra"
)

const version = "0.5.0"
const version = "0.5.1"

var rootCmd *cobra.Command

Expand Down
2 changes: 1 addition & 1 deletion kubectl_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (ie *ImageEntity) filterBy(columns []string) ImageEntity {
case labelContainer:
entity.Container = ie.Container
case labelImage:
entity.Image = ie.Namespace
entity.Image = ie.Image
case labelImagePullPolicy:
entity.ImagePullPolicy = ie.ImagePullPolicy
}
Expand Down

0 comments on commit e304425

Please sign in to comment.