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 632f133 commit e75fee0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/addons/openebs/openebs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package openebs
import (
"context"
"fmt"
"strings"

eckinds "github.com/replicatedhq/embedded-cluster-kinds/apis/v1beta1"
"github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2"
Expand Down Expand Up @@ -51,6 +52,11 @@ func init() {
openebsKubectlImageRepo = OpenEBSKubectlImageRepoOverride
}

openebsKubectlImageParts := strings.SplitN(openebsKubectlImageRepo, "/", 2)
if len(openebsKubectlImageParts) != 2 {
panic(fmt.Sprintf("invalid image repo %q", openebsKubectlImageRepo))
}

helmValues = map[string]interface{}{
"localpv-provisioner": map[string]interface{}{
"analytics": map[string]interface{}{
Expand All @@ -75,8 +81,9 @@ func init() {
},
"preUpgradeHook": map[string]interface{}{
"image": map[string]interface{}{
"repository": openebsKubectlImageRepo,
"tag": OpenEBSKubectlImageTag,
"registry": openebsKubectlImageParts[0],
"repo": openebsKubectlImageParts[1],
"tag": OpenEBSKubectlImageTag,
},
},
"zfs-localpv": map[string]interface{}{
Expand Down

0 comments on commit e75fee0

Please sign in to comment.