Skip to content

Commit

Permalink
Merge branch 'devel' into release-devel
Browse files Browse the repository at this point in the history
  • Loading branch information
mangelajo authored Feb 4, 2021
2 parents ab6f245 + e7c2f74 commit 46e4071
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions pkg/subctl/cmd/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ func populateSubmarinerSpec(subctlData *datafile.SubctlData, netconfig globalnet
}

submarinerSpec := submariner.SubmarinerSpec{
Repository: repository,
Version: imageVersion,
Repository: getImageRepo(),
Version: getImageVersion(),
CeIPSecNATTPort: nattPort,
CeIPSecIKEPort: ikePort,
CeIPSecDebug: ipsecDebug,
Expand Down Expand Up @@ -490,6 +490,36 @@ func populateSubmarinerSpec(subctlData *datafile.SubctlData, netconfig globalnet
return submarinerSpec
}

func getImageVersion() string {
imageOverrides := getImageOverrides()
version := imageVersion

if imageVersion == "" {
version = versions.DefaultSubmarinerOperatorVersion
}

if override, ok := imageOverrides[names.OperatorImage]; ok {
version, _ = images.ParseOperatorImage(override)
}

return version
}

func getImageRepo() string {
imageOverrides := getImageOverrides()
repo := repository

if repository == "" {
repo = versions.DefaultRepo
}

if override, ok := imageOverrides[names.OperatorImage]; ok {
_, repo = images.ParseOperatorImage(override)
}

return repo
}

func operatorImage() string {
version := imageVersion
repo := repository
Expand Down

0 comments on commit 46e4071

Please sign in to comment.