有关配置< x-kubernetes-preserve-unknown-fields > 在items字段下和与items同级CRD部署表现差异. #49606
Unanswered
as-yesterday
asked this question in
Q&A and General discussion
Replies: 1 comment 4 replies
-
|
看下这个文档: |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment




Uh oh!
There was an error while loading. Please reload this page.
-
老师们下午好.本次在K8s集群<测试环境部>署milvus-operator后碰到问题,
报错: error: SchemaErrorio.milvus.vialpha1.MiLvus.spec.voLumes): array should have exactly one sub-item
影响范围描述: explain使用时报错(kubectl explain deploy)、已存在应用滚动更新时报错、 调整milvus-operator deploy时报错, 其他暂未测试到. <此时未部署其他milvus相关资源>;
通过调整字段后报错消失,想问的是基于我的环境或者后续升级之后的K8s环境,我的调整是否允许,或者说这样做与github发布的内容比两者的差异是什么。
我的环境描述:
k8s版本: v1.18.9
kubelet版本: 1.21.0
部署方式: kubectl apply -f <附件.yaml>
部署资源: namespace、ServiceAccount、CustomResourceDefinition、Service、ClusterRole、ClusterRoleBinding、Role、RoleBinding, 具体可查看附件文件;
后修复方式距离(详细差异见附件内容):
注: milvus-operator-new.yaml为调整后的文件;
milvus-operator-old.yaml为未调整的文件内容;
milvus-operator-new.yaml
milvus-operator-old.yaml
修改前:
volumes:
items:
type: object
type: array
x-kubernetes-preserve-unknown-fields: true #修改行,此时与items同级;
修改后:
volumes:
items:
type: object
x-kubernetes-preserve-unknown-fields: true#修改行,内容上移, 位于items字段下;
type: array
Beta Was this translation helpful? Give feedback.
All reactions