Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Jul 19, 2024
1 parent e75fee0 commit a8c99b6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/addons/openebs/openebs.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ func init() {
openebsKubectlImageRepo = OpenEBSKubectlImageRepoOverride
}

var kubectlImageRegistry, kubectlImageRepo string
openebsKubectlImageParts := strings.SplitN(openebsKubectlImageRepo, "/", 2)
if len(openebsKubectlImageParts) != 2 {
panic(fmt.Sprintf("invalid image repo %q", openebsKubectlImageRepo))
if len(openebsKubectlImageParts) == 2 {
kubectlImageRegistry = openebsKubectlImageParts[0]
kubectlImageRepo = openebsKubectlImageParts[1]
}

helmValues = map[string]interface{}{
Expand All @@ -81,8 +83,8 @@ func init() {
},
"preUpgradeHook": map[string]interface{}{
"image": map[string]interface{}{
"registry": openebsKubectlImageParts[0],
"repo": openebsKubectlImageParts[1],
"registry": kubectlImageRegistry,
"repo": kubectlImageRepo,
"tag": OpenEBSKubectlImageTag,
},
},
Expand Down

0 comments on commit a8c99b6

Please sign in to comment.