Skip to content

Commit

Permalink
fix: does not push image to registry (#2352)
Browse files Browse the repository at this point in the history
Signed-off-by: pixiake <[email protected]>
  • Loading branch information
pixiake authored Aug 8, 2024
1 parent fc2ce05 commit b4c30e8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/kk/pkg/images/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func GetImage(runtime connector.ModuleRuntime, kubeConf *common.KubeConf, name s
type SaveImages struct {
common.ArtifactAction
ImageStartIndex int
ImageTransport string
ImageTransport string
}

func (s *SaveImages) Execute(runtime connector.Runtime) error {
Expand Down Expand Up @@ -314,7 +314,12 @@ func (c *CopyImagesToRegistry) Execute(runtime connector.Runtime) error {
}

srcName := fmt.Sprintf("oci:%s:%s", imagesPath, ref)
destName := formatImageName(c.ImageTransport, uniqueImage)
destName := formatImageName(c.ImageTransport, image.ImageName())

if c.ImageTransport == common.DockerDaemon {
destName = formatImageName(c.ImageTransport, uniqueImage)
}

logger.Log.Infof("Source: %s", srcName)
logger.Log.Infof("Destination: %s", destName)

Expand Down

0 comments on commit b4c30e8

Please sign in to comment.