Export CRD templates (#12166)

For consistency, we should export our CRD templates in the same way we
export normal control plane templates and extensions.

Signed-off-by: Matei David <matei@buoyant.io>
This commit is contained in:
Matei David 2024-02-27 14:23:06 +00:00 committed by GitHub
parent a26b42093f
commit 1f74128d8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ You can use the --ignore-cluster flag if you just want to generate the installat
)
var (
templatesCrdFiles = []string{
TemplatesCrdFiles = []string{
"templates/policy/authorization-policy.yaml",
"templates/policy/httproute.yaml",
"templates/policy/meshtls-authentication.yaml",
@ -323,7 +323,7 @@ func renderCRDs(w io.Writer, options valuespkg.Options) error {
files := []*loader.BufferedFile{
{Name: chartutil.ChartfileName},
}
for _, template := range templatesCrdFiles {
for _, template := range TemplatesCrdFiles {
files = append(files, &loader.BufferedFile{Name: template})
}
if err := charts.FilesReader(static.Templates, l5dcharts.HelmChartDirCrds+"/", files); err != nil {

View File

@ -220,7 +220,7 @@ func chartCrds(t *testing.T) *chart.Chart {
linkerd2Chart.AddDependency(chartPartials)
for _, filepath := range templatesCrdFiles {
for _, filepath := range TemplatesCrdFiles {
linkerd2Chart.Templates = append(linkerd2Chart.Templates, &chart.File{
Name: filepath,
})