My CompositeResourceDefinition is still being created, although the composite CRD has never been created successfully generated by the operator
I have invalid openAPIV3Schema which contain default value that is not supposed to be there (default value is forbidden)

Crossplane version: v0.13.0-rc.114.g20493ac
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit
:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-
05-21T14:50:54Z", GoVersion:"go1.14.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17+", GitVersion:"v1.17.9-eks-4c6976
", GitCommit:"4c6976793196d70bc5cd29d56ce5440c9473648e", GitTreeState:"clean", Buil
dDate:"2020-07-17T18:46:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/
amd64"}
@kelvinwijaya thanks for opening this! Could you add a little more context around what is happening here? Are you saying that you:
If so, this seems to be working as intended. The validation would not occur until the controller attempted to create the CRD because the OpenAPIV3Schema is just a runtime.RawExtension. However, it would be a nice feature in the future for us to have an admission webhook (or something of similar nature) that would reject XRDs with invalid schemas.
Hi @hasheddan ,
Yes I have unintentionally created CompositeResourceDefinition (XRD) with an invalid schema, when this happened , I am expecting some error might be shown in the CompositeResourceDefinition > status > conditions.
As i have no clue about why the CRD has not been created until i go into the events logs to check
Not a very big deal just that as you mention it is good to have the validation check.
Thanks,
Kelvin
This is definitely something we want to do. It's similar to https://github.com/crossplane/crossplane/issues/1476, which is about validating kind: Composition rather than kind: CompositeResourceDefinition. I'm going to convert this issue to a feature request, because we don't have an issue tracking that. :)