标签:items ref png res 描述 meta 文件 也有 没有
github上面的原问题链接:https://github.com/kubernetes/kubernetes/issues/98079
按照他说的,
我新建了一个crd,yaml文件内容如下:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: resous.getnull.example.com
spec:
group: getnull.example.com
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
allocations:
items:
nullable: true
type: integer
type: array
scope: Namespaced
names:
plural: resous
singular: resou
kind: Resou
执行 kubectl describe crd resous.getnull.example.com
新创建的crd里面确实包含他说的属性,然后按照他说的使用 edit 命令,什么都不修改,直接保存,会报一个错误:
ValidationError(IPAMBlock.spec.allocations): unknown object type "nil" in IPAMBlock.spec.allocations[3]
但是我执行的时候没有遇到什么问题。我还是觉得他描述的比较模糊,没太懂他的意思,也有可能是他使用的1.18版本,而我是用的是1.20版本,所以没能复现。
Validation fails for CustomResource with array of pointers
标签:items ref png res 描述 meta 文件 也有 没有
原文地址:https://www.cnblogs.com/codenoob/p/14301430.html