The validation check to prevent multiple Application source types from being used in a single source seems to not be done at the CRD schema level. Our kubeconform setup, which relies on OpenAPI schema definitions, did not catch the error.
Sync the application. We get a sync error: ComparisonError: Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = error getting app source type: multiple application sources defined: Kustomize,Directory
Expected behavior
A CRD validation tool such as kubeconform should be able to catch the validation error through OpenAPI V3 schema validation (i.e. using oneof) before merging the application change.
Checklist:
argocd version
.Describe the bug
The validation check to prevent multiple
Application
source types from being used in a single source seems to not be done at the CRD schema level. Our kubeconform setup, which relies on OpenAPI schema definitions, did not catch the error.Also, the Application Specification documentation doesn't mention this limitation.
To Reproduce
Application
with:ComparisonError: Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = error getting app source type: multiple application sources defined: Kustomize,Directory
Expected behavior
A CRD validation tool such as kubeconform should be able to catch the validation error through OpenAPI V3 schema validation (i.e. using
oneof
) before merging the application change.Screenshots
Version
The server version is v2.10.0+2175939
Logs