diff --git a/src/python/pants/backend/helm/target_types.py b/src/python/pants/backend/helm/target_types.py index 46bb4f2fd79..8cf3ee07079 100644 --- a/src/python/pants/backend/helm/target_types.py +++ b/src/python/pants/backend/helm/target_types.py @@ -121,15 +121,20 @@ class HelmChartMetaSourceField(SingleSourceField): class HelmChartSourcesField(MultipleSourcesField): default = ( + ".helmignore", + "README.md", + "LICENSE", "values.yaml", "values.yml", + "values.schema.json", "templates/*.yaml", "templates/*.yml", "templates/*.tpl", + "templates/NOTES.txt", "crds/*.yaml", "crds/*.yml", ) - expected_file_extensions = (".yaml", ".yml", ".tpl") + expected_file_extensions = (".helmignore", ".yaml", ".yml", ".tpl", ".json", ".md", ".txt", "") help = generate_multiple_sources_field_help_message( "Example: `sources=['values.yaml', 'templates/*.yaml', '!values_ignore.yaml']`" ) diff --git a/src/python/pants/backend/helm/util_rules/sources_test.py b/src/python/pants/backend/helm/util_rules/sources_test.py index 17b7be12299..71652246fe7 100644 --- a/src/python/pants/backend/helm/util_rules/sources_test.py +++ b/src/python/pants/backend/helm/util_rules/sources_test.py @@ -74,7 +74,7 @@ def test_can_not_auto_detect_source_root(rule_runner: RuleRunner) -> None: rule_runner.request(HelmChartRoot, [HelmChartRootRequest(field_set.chart)]) -def test_source_templates_are_always_included(rule_runner: RuleRunner) -> None: +def test_standard_sources_are_always_included(rule_runner: RuleRunner) -> None: rule_runner.write_files( { "BUILD": dedent( @@ -86,9 +86,13 @@ def test_source_templates_are_always_included(rule_runner: RuleRunner) -> None: ), "Chart.yaml": HELM_CHART_FILE, "values.yaml": HELM_VALUES_FILE, + "values.schema.json": "", + "README.md": "", + "LICENSE": "", "crds/foo.yml": K8S_CRD_FILE, "templates/_helpers.tpl": HELM_TEMPLATE_HELPERS_FILE, "templates/service.yaml": K8S_SERVICE_TEMPLATE, + "templates/NOTES.txt": "", "resource.xml": "", "file.txt": "", } @@ -106,9 +110,13 @@ def test_source_templates_are_always_included(rule_runner: RuleRunner) -> None: ) assert source_files.snapshot.files == ( + "LICENSE", + "README.md", "crds/foo.yml", + "templates/NOTES.txt", "templates/_helpers.tpl", "templates/service.yaml", + "values.schema.json", "values.yaml", )