hack/verify-crd.sh: only test for preserveUnknownFields for v1beta1 CRDs
In v1 this is tested automatically by validation in the kube-apiserver.
@@ -20,6 +20,7 @@ security/v1/*.crd.yaml
FAILS=false
for f in $FILES
do
+ if [[ $(./_output/tools/bin/yq r $f apiVersion) == "apiextensions.k8s.io/v1beta1" ]]; then
if [[ $(./_output/tools/bin/yq r $f spec.validation.openAPIV3Schema.properties.metadata.description) != "null" ]]; then
echo "Error: cannot have a metadata description in $f"
FAILS=true
@@ -29,6 +30,7 @@ do
echo "Error: pruning not enabled (spec.preserveUnknownFields != false) in $f"
FAILS=true
fi
+ fi
done
if [ "$FAILS" = true ] ; then
