Skip to content

Commit

Permalink
Should pass across imageVersions to educates component.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Sep 18, 2024
1 parent 7d32622 commit bfd4c96
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,6 @@ imageRegistry:
host: #@ data.values.imageRegistry.host
#@ if/end hasattr(data.values, "version") and data.values.version != None:
version: #@ data.values.version
#@ if/end hasattr(data.values, "imageVersions") and data.values.imageVersions != None:
imageVersions: #@ data.values.imageVersions
#@ end
11 changes: 5 additions & 6 deletions client-programs/pkg/cmd/admin_platform_config_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cmd

import (
"fmt"
"strings"

"github.com/spf13/cobra"

Expand Down Expand Up @@ -58,16 +57,16 @@ func (o *PlatformConfigOptions) Run() error {
return err
}

fullConfig.Version = o.Version
// fullConfig.Version = o.Version

// Set image registry host and namespace by splitting the package
// repository into host and namespace. That is split on the first '/'.

imageRepositoryHost := strings.SplitN(o.PackageRepository, "/", 2)[0]
imageRepositoryNamespace := strings.SplitN(o.PackageRepository, "/", 2)[1]
// imageRepositoryHost := strings.SplitN(o.PackageRepository, "/", 2)[0]
// imageRepositoryNamespace := strings.SplitN(o.PackageRepository, "/", 2)[1]

fullConfig.ImageRegistry.Host = imageRepositoryHost
fullConfig.ImageRegistry.Namespace = imageRepositoryNamespace
// fullConfig.ImageRegistry.Host = imageRepositoryHost
// fullConfig.ImageRegistry.Namespace = imageRepositoryNamespace

config.PrintConfigToStdout(fullConfig)
}
Expand Down
11 changes: 5 additions & 6 deletions client-programs/pkg/cmd/admin_platform_deploy_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cmd

import (
"fmt"
"strings"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -73,16 +72,16 @@ func (o *PlatformDeployOptions) Run() error {
return err
}

fullConfig.Version = o.Version
// fullConfig.Version = o.Version

// Set image registry host and namespace by splitting the package
// repository into host and namespace. That is split on the first '/'.

imageRepositoryHost := strings.SplitN(o.PackageRepository, "/", 2)[0]
imageRepositoryNamespace := strings.SplitN(o.PackageRepository, "/", 2)[1]
// imageRepositoryHost := strings.SplitN(o.PackageRepository, "/", 2)[0]
// imageRepositoryNamespace := strings.SplitN(o.PackageRepository, "/", 2)[1]

fullConfig.ImageRegistry.Host = imageRepositoryHost
fullConfig.ImageRegistry.Namespace = imageRepositoryNamespace
// fullConfig.ImageRegistry.Host = imageRepositoryHost
// fullConfig.ImageRegistry.Namespace = imageRepositoryNamespace

if o.DryRun {
if err = installer.DryRun(o.Version, o.PackageRepository, fullConfig, o.Verbose, false, o.skipImageResolution); err != nil {
Expand Down
10 changes: 5 additions & 5 deletions client-programs/pkg/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,12 @@ func (inst *Installer) template(tempDir string, inputDir string, fullConfig *con

kbldFiles := []*files.File{}
// TODO: Revisit when this needs to be used
if !skipImageResolution {
kbldFiles, err = files.NewSortedFilesFromPaths([]string{filepath.Join(inputDir, "kbld/kbld-images.yaml")}, files.SymlinkAllowOpts{})
if err != nil {
return "", err
}
// if !skipImageResolution {
kbldFiles, err = files.NewSortedFilesFromPaths([]string{filepath.Join(inputDir, "kbld/kbld-images.yaml")}, files.SymlinkAllowOpts{})
if err != nil {
return "", err
}
// }

opts.DataValuesFlags = cmdtpl.DataValuesFlags{
FromFiles: []string{"values", "images"},
Expand Down

0 comments on commit bfd4c96

Please sign in to comment.