Skip to content

Commit

Permalink
Merge pull request #42 from GMH233/hotfix/runtime
Browse files Browse the repository at this point in the history
fix: checkImage实现错误
  • Loading branch information
sjtuzc954 authored May 28, 2024
2 parents 1414b32 + f3ef747 commit 441ca4a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pkg/kubelet/runtime/runtime_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,16 @@ func (rm *runtimeManager) checkImages(repotag string) (bool, error) {
for _, image := range images {
//fmt.Printf("ID: %s\n", image.ID)
//fmt.Printf("RepoTags: %v\n", image.RepoTags)
if len(image.RepoTags) == 0 {
continue
}
if image.RepoTags[0] == repotag {
return true, nil
//if len(image.RepoTags) == 0 {
// continue
//}
//if image.RepoTags[0] == repotag {
// return true, nil
//}
for _, rt := range image.RepoTags {
if rt == repotag {
return true, nil
}
}
//fmt.Printf("Size: %d\n", image.Size)
//fmt.Println("------------------------")
Expand Down

0 comments on commit 441ca4a

Please sign in to comment.