Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correctly identify defaulted values fields in AppInstalls #13171

Merged
merged 1 commit into from Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/apis/apps.kubermatic/v1/application_installation.go
Expand Up @@ -294,7 +294,7 @@ func (ai *ApplicationInstallationSpec) GetParsedValues() (map[string]interface{}
if len(ai.Values.Raw) > 0 && string(ai.Values.Raw) != "{}" && ai.ValuesBlock != "" {
return nil, fmt.Errorf("the fields Values and ValuesBlock cannot be used simultaneously. Please delete one of them.")
}
if len(ai.Values.Raw) > 0 {
if len(ai.Values.Raw) > 0 && string(ai.Values.Raw) != "{}" {
err := json.Unmarshal(ai.Values.Raw, &values)
return values, err
}
Expand Down
Expand Up @@ -46,7 +46,7 @@ func TestGetParsedValues(t *testing.T) {
},
"ValuesBlock set and Values Defaulted": {
appIn: ApplicationInstallationSpec{
Values: runtime.RawExtension{},
Values: runtime.RawExtension{Raw: []byte("{}")},
ValuesBlock: "not-empty:\n value",
},
expResponse: map[string]interface{}{"not-empty": "value"},
Expand Down