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

fix: panic handling when giving empty values.yaml in custom packaged chart #4586

Merged
merged 6 commits into from
Jan 24, 2024
Merged
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: 6 additions & 2 deletions internal/util/ChartService.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,12 @@ func (impl ChartTemplateServiceImpl) packageChart(tempReferenceTemplateDir strin
return nil, "", err
}
impl.logger.Debugw("chart archive path", "path", archivePath)
//chart.Values
valuesYaml := chart.Values.Raw
var valuesYaml string
if chart.Values != nil {
valuesYaml = chart.Values.Raw
} else {
impl.logger.Warnw("values.yaml not found in helm chart", "dir", tempReferenceTemplateDir)
}
return &archivePath, valuesYaml, nil
}

Expand Down
Loading