Skip to content

Commit

Permalink
fix kubernetes init to pick correct runtime version (#1103)
Browse files Browse the repository at this point in the history
Signed-off-by: shivam <[email protected]>

Signed-off-by: shivam <[email protected]>
  • Loading branch information
shivamkm07 authored Oct 14, 2022
1 parent eb1dd68 commit 1b0d63f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func daprChart(version string, config *helm.Configuration) (*chart.Chart, error)
return loader.Load(chartPath)
}

func chartValues(config InitConfiguration) (map[string]interface{}, error) {
func chartValues(config InitConfiguration, version string) (map[string]interface{}, error) {
chartVals := map[string]interface{}{}
err := utils.ValidateImageVariant(config.ImageVariant)
if err != nil {
Expand All @@ -162,7 +162,7 @@ func chartValues(config InitConfiguration) (map[string]interface{}, error) {
globalVals := []string{
fmt.Sprintf("global.ha.enabled=%t", config.EnableHA),
fmt.Sprintf("global.mtls.enabled=%t", config.EnableMTLS),
fmt.Sprintf("global.tag=%s", utils.GetVariantVersion(config.Version, config.ImageVariant)),
fmt.Sprintf("global.tag=%s", utils.GetVariantVersion(version, config.ImageVariant)),
}
if len(config.ImageRegistryURI) != 0 {
globalVals = append(globalVals, fmt.Sprintf("global.registry=%s", config.ImageRegistryURI))
Expand Down Expand Up @@ -209,7 +209,7 @@ func install(config InitConfiguration) error {
installClient.Wait = config.Wait
installClient.Timeout = time.Duration(config.Timeout) * time.Second

values, err := chartValues(config)
values, err := chartValues(config, version)
if err != nil {
return err
}
Expand Down

0 comments on commit 1b0d63f

Please sign in to comment.