File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
testdata/validate/valid_bundle/manifests Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1414 singular : etcdcluster
1515 scope : Namespaced
1616 version : v1beta2
17+ validation :
18+ openAPIV3Schema :
19+ properties :
20+ spec :
21+ type : object
22+ properties :
23+ test :
24+ type : integer
25+ minimum : 1
26+ maximum : 32767
Original file line number Diff line number Diff line change @@ -313,10 +313,11 @@ func (i imageValidator) ValidateBundleContent(manifestDir string) error {
313313 }
314314 }
315315 } else if gvk .Kind == CRDKind {
316+ dec := k8syaml .NewYAMLOrJSONDecoder (strings .NewReader (string (data )), 30 )
316317 switch gv := gvk .GroupVersion ().String (); gv {
317318 case v1CRDapiVersion :
318319 crd := & apiextensionsv1.CustomResourceDefinition {}
319- err := runtime . DefaultUnstructuredConverter . FromUnstructured ( k8sFile . Object , crd )
320+ err := dec . Decode ( crd )
320321 if err != nil {
321322 validationErrors = append (validationErrors , err )
322323 continue
@@ -330,7 +331,7 @@ func (i imageValidator) ValidateBundleContent(manifestDir string) error {
330331 }
331332 case v1beta1CRDapiVersion :
332333 crd := & apiextensionsv1beta1.CustomResourceDefinition {}
333- err := runtime . DefaultUnstructuredConverter . FromUnstructured ( k8sFile . Object , crd )
334+ err := dec . Decode ( crd )
334335 if err != nil {
335336 validationErrors = append (validationErrors , err )
336337 continue
You can’t perform that action at this time.
0 commit comments