Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions releases.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"encoding/json"
"fmt"
"io"
"net/url"
Expand Down Expand Up @@ -66,6 +67,7 @@ type releaseOptions struct {
Values string `json:"values"`
SetValues []string `json:"set"`
SetStringValues []string `json:"set_string"`
SetJsonValues []string `json:"set_json"`
ChartPathOptions

// only install
Expand Down Expand Up @@ -151,6 +153,12 @@ func mergeValues(options releaseOptions) (map[string]interface{}, error) {
return vals, fmt.Errorf("failed parsing values")
}

for _, value := range options.SetJsonValues {
seg := strings.Split(value, "=")
jsonStr := "{\"" + seg[0] + "\":" + seg[1] + "}"
json.Unmarshal([]byte(jsonStr), &vals)
}

for _, value := range options.SetValues {
if err := strvals.ParseInto(value, vals); err != nil {
return vals, fmt.Errorf("failed parsing set data")
Expand Down