This repository was archived by the owner on Jun 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ type PublishPlan struct {
114114
115115type PublishOutput struct {
116116 Duration time.Duration
117+ RegistryHost registryHost
117118 publishedImages map [string ]string
118119}
119120
@@ -129,6 +130,10 @@ func (p *PublishImagePlan) remoteImageNameWithLatestTag() string {
129130 return fmt .Sprintf ("%s:%s" , p .remoteImageName , "latest" )
130131}
131132
133+ func (ir * ImageRegistry ) GetHost () registryHost {
134+ return ir .host
135+ }
136+
132137func (o * PublishOutput ) DidPublish () bool {
133138 if o == nil {
134139 return false
@@ -472,7 +477,10 @@ func (p *Pad) publishDockerImage(
472477 published [image .localImage .String ()] = image .remoteImageNameWithTag ()
473478 }
474479
475- return & PublishOutput {publishedImages : published }, nil
480+ return & PublishOutput {
481+ publishedImages : published ,
482+ RegistryHost : plan .registry .GetHost (),
483+ }, nil
476484}
477485
478486func makePublishPlan (
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ func makeDeployOptions(
6363 helm .NewImageProvider (
6464 buildOutput .Image .String (),
6565 publishOutput .PublishedImages (),
66+ string (publishOutput .RegistryHost ),
6667 ),
6768 jetCfg ,
6869 cluster ,
@@ -83,7 +84,6 @@ func makeDeployOptions(
8384 if err := hvc .Compute (ctx ); err != nil {
8485 return nil , errors .Wrap (err , "failed to compute helm values" )
8586 }
86-
8787 appValues , err := cmdOpts .Hooks ().PostAppChartValuesCompute (
8888 ctx ,
8989 cmdOpts ,
@@ -92,7 +92,6 @@ func makeDeployOptions(
9292 if err != nil {
9393 return nil , err
9494 }
95-
9695 runtimeValues , err := cmdOpts .Hooks ().PostRuntimeChartValuesCompute (
9796 ctx ,
9897 cmdOpts ,
Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ func (hvc *ValueComputer) RuntimeValues() map[string]any {
6363 return hvc .runtimeValues
6464}
6565
66+ func (hvc * ValueComputer ) ImageProvider () * ImageProvider {
67+ return hvc .imageProvider
68+ }
69+
6670// Compute converts command options to helm values.
6771func (hvc * ValueComputer ) Compute (ctx context.Context ) error {
6872 hvc .appValues = map [string ]any {}
Original file line number Diff line number Diff line change @@ -10,20 +10,28 @@ type ImageProvider struct {
1010 // Should include tag if it exists
1111 defaultLocalImage string
1212
13+ imageRegistryHost string
14+
1315 // For published images, key is local image, value is published image
1416 imagePublishMap map [string ]string
1517}
1618
1719func NewImageProvider (
1820 defaultLocalImage string ,
1921 imagePublishMap map [string ]string ,
22+ imageRegistryHost string ,
2023) * ImageProvider {
2124 return & ImageProvider {
2225 defaultLocalImage : defaultLocalImage ,
2326 imagePublishMap : imagePublishMap ,
27+ imageRegistryHost : imageRegistryHost ,
2428 }
2529}
2630
31+ func (i * ImageProvider ) GetRegistryHost () string {
32+ return i .imageRegistryHost
33+ }
34+
2735func (i * ImageProvider ) get (c provider.Cluster , img string ) string {
2836 if i == nil {
2937 return img
You can’t perform that action at this time.
0 commit comments