07/12/2022, 9:03 PM
Having a really confusing problem creating a CRD object that I generated using crd2pulumi. The diff shows the correct spec for the resource I’m trying to create, but when I actually execute I get
[spec.source: Invalid value: "string": spec.source in body must be of type object: "string", <nil>: Invalid value: "": "spec.source" must validate one and only one schema (oneOf). Found 2 valid alternatives]
indicating that a nil or empty value is actually being passed to k8s and failing validation server side. Since the diff is correct and shows the populated value, I have no idea how to debug. Any ideas? EDIT: Figured this out, the type was generated as
and I was improperly supplying the wrong value due to type inference missing.