source_templates schema validation need to be fixed when using existing_source
The issue came after the merge of !5992 (merged)
Helm install failed: values don't meet the specifications of the schema(s):
sylva-units:
source_templates.sylva-core: Must validate "then" as "if" was valid
source_templates.sylva-core.spec: Must validate at least one schema (anyOf)
source_templates.sylva-core.spec.ref.commit: Invalid type. Expected: string, given: null
source_templates.sylva-core: Must validate all the schemas (allOf)
There are 2 issues:
The schema has required: [spec, kind] at the top level, which always requires spec to be present, even when using existing_source.
The if-then conditionals validate spec.ref structure whenever kind: GitRepository or kind: OCIRepository, regardless of whether spec actually exists
Edited by Priya Goyal