首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Operator-SDK错误,"CRD存在于捆绑包中,但未在CSV中定义“

Operator-SDK错误,"CRD存在于捆绑包中,但未在CSV中定义“
EN

Stack Overflow用户
提问于 2021-03-19 15:10:10
回答 1查看 179关注 0票数 0

当我运行make bundle时,我得到了错误"CRD存在于包中,但未在CSV中定义“。

完整的输出是

代码语言:javascript
复制
/Users/foobar/Documents/my-operator/bin/controller-gen "crd:trivialVersions=true,preserveUnknownFields=false" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
operator-sdk generate kustomize manifests -q
cd config/manager && /Users/foobar/Documents/my-operator/bin/kustomize edit set image controller=registry.io/my-operator:latest
/Users/foobar/Documents/my-operator/bin/kustomize build config/manifests | operator-sdk generate bundle -q --overwrite --version 0.0.5  
Error: accumulating resources: 2 errors occurred:
        * accumulateFile error: "accumulating resources from '../samples': '/Users/foobar/Documents/my-operator/config/samples' must resolve to a file"
        * accumulateDirector error: "recursed accumulation of path '/Users/foobar/Documents/my-operator/config/samples': accumulating resources: 2 errors occurred:\n\t* accumulateFile error: \"accumulating resources from 'myapplicationui.yaml': evalsymlink failure on '/Users/foobar/Documents/my-operator/config/samples/myapplicationui.yaml' : lstat /Users/foobar/Documents/my-operator/config/samples/myapplicationui.yaml: no such file or directory\"\n\t* loader.New error: \"error loading myapplicationui.yaml with git: url lacks orgRepo: myapplicationui.yaml, dir: evalsymlink failure on '/Users/foobar/Documents/my-operator/config/samples/myapplicationui.yaml' : lstat /Users/foobar/Documents/my-operator/config/samples/myapplicationui.yaml: no such file or directory, get: invalid source string: myapplicationui.yaml\"\n\n"


INFO[0000] Building annotations.yaml                    
INFO[0000] Writing annotations.yaml in /Users/foobar/Documents/my-operator/bundle/metadata 
INFO[0000] Building Dockerfile                          
INFO[0000] Writing bundle.Dockerfile in /Users/foobar/Documents/my-operator 
operator-sdk bundle validate ./bundle
INFO[0000] Found annotations file                        bundle-dir=bundle container-tool=docker
INFO[0000] Could not find optional dependencies file     bundle-dir=bundle container-tool=docker
ERRO[0000] Error: Value myapplication.example.com/v1alpha1, Kind=MyApplication: CRD "myapplication.example.com/v1alpha1, Kind=MyApplication" is present in bundle "my-operator.v0.0.5" but not defined in CSV 
ERRO[0000] Error: Value myapplication.example.com/v1alpha1, Kind=MyApplicationUI: CRD "myapplication.example.com/v1alpha1, Kind=MyApplicationUI" is present in bundle "my-operator.v0.0.5" but not defined in CSV

此错误的原因是什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-19 15:10:10

底部的错误是转移注意力的问题。当你亲身体验时,实际的错误会进一步增加,而且不会上色。具体地说,Kustomize yaml需要一个myapplicationui.yaml,但找不到它。

当团队中有人没有检查所有引用就试图重命名文件(例如重命名为myapplicationui_sample.yaml)时,很容易发生这种情况。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66703883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档