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: imported helm overrides #2967

Merged
merged 1 commit into from
Sep 6, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/pkg/packager/composer/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,32 @@ func TestCompose(t *testing.T) {
fmt.Sprintf("%s%svalues.yaml", finalDirectory, string(os.PathSeparator)),
"values.yaml",
},
Variables: []v1alpha1.ZarfChartVariable{
{
Name: "var-today",
Description: "var description",
Path: "path",
},
{
Name: "var-hello",
Description: "var description",
Path: "path",
},
},
},
{
Name: "world",
LocalPath: fmt.Sprintf("%s%schart", firstDirectory, string(os.PathSeparator)),
ValuesFiles: []string{
fmt.Sprintf("%s%svalues.yaml", firstDirectory, string(os.PathSeparator)),
},
Variables: []v1alpha1.ZarfChartVariable{
{
Name: "var-world",
Description: "var description",
Path: "path",
},
},
},
},
// Manifests should be merged if names match and appended if not with corrected directories
Expand Down Expand Up @@ -505,6 +524,13 @@ func createDummyComponent(t *testing.T, name, importDir, subName string) v1alpha
ValuesFiles: []string{
"values.yaml",
},
Variables: []v1alpha1.ZarfChartVariable{
{
Name: fmt.Sprintf("var-%s", name),
Description: "var description",
Path: "path",
},
},
},
},
Manifests: []v1alpha1.ZarfManifest{
Expand Down
1 change: 1 addition & 0 deletions src/pkg/packager/composer/override.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func overrideResources(c *v1alpha1.ZarfComponent, override v1alpha1.ZarfComponen
c.Charts[idx].ReleaseName = overrideChart.ReleaseName
}
c.Charts[idx].ValuesFiles = append(c.Charts[idx].ValuesFiles, overrideChart.ValuesFiles...)
c.Charts[idx].Variables = append(c.Charts[idx].Variables, overrideChart.Variables...)
AustinAbro321 marked this conversation as resolved.
Show resolved Hide resolved
existing = true
}
}
Expand Down
Loading