Open
Description
What happened?
I accidentally wrote an invalid OpenAPI v3.0 schema for the elements of an array in a CRD's schema. kubectl create --validate=strict
accepted my CRD definition without complaint, and silently discarded my invalid schema property. I have attached two files that demonstrate the problem. test1.yaml.txt gets rejected, while test2.yaml.txt is accepted but the {propertyNames: {pattern: foo}}
gets silently transformed to {}
.
What did you expect to happen?
I expected my schema to be implemented or rejected.
How can we reproduce it (as minimally and precisely as possible)?
Shown above.
Anything else we need to know?
No response
Kubernetes version
$ kubectl version
Client Version: v1.29.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.2
Cloud provider
none
OS version
MacOS 15.0.1
container runtime is docker in Rancher Desktop.
Inside the VM guest, /etc/os-release
says:
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.20.3
PRETTY_NAME="Alpine Linux v3.20"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
BUILD_ID="v0.2.39.rd4"
VARIANT_ID="rd"
Install tools
kind v0.22.0
Container runtime (CRI) and version (if applicable)
docker in Rancher Desktop; client v27.2.1-rd; server engine 26.1.5, containerd v1.7.17, runc 1.1.14, docker-init 0.19.0