<p>I get the error &quot;CRD is present in bundle but not defined in CSV&quot; when I run <code>make bundle</code>.</p>
<p>The full output is</p>
<pre class="lang-sh prettyprint-override"><code>/Users/foobar/Documents/my-operator/bin/controller-gen &quot;crd:trivialVersions=true,preserveUnknownFields=false&quot; rbac:roleName=manager-role webhook paths=&quot;./...&quot; output:crd:artifacts:config=config/crd/bases
operator-sdk generate kustomize manifests -q
cd config/manager &amp;&amp; /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: &quot;accumulating resources from '../samples': '/Users/foobar/Documents/my-operator/config/samples' must resolve to a file&quot;
        * accumulateDirector error: &quot;recursed accumulation of path '/Users/foobar/Documents/my-operator/config/samples': accumulating resources: 2 errors occurred:\n\t* accumulateFile error: \&quot;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\&quot;\n\t* loader.New error: \&quot;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\&quot;\n\n&quot;


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 &quot;myapplication.example.com/v1alpha1, Kind=MyApplication&quot; is present in bundle &quot;my-operator.v0.0.5&quot; but not defined in CSV 
ERRO[0000] Error: Value myapplication.example.com/v1alpha1, Kind=MyApplicationUI: CRD &quot;myapplication.example.com/v1alpha1, Kind=MyApplicationUI&quot; is present in bundle &quot;my-operator.v0.0.5&quot; but not defined in CSV
</code></pre>
<p>What is the cause of this error?</p>

I'll Eat My Hat
<p>The error on the bottom is a red herring. The actual error is further up and uncolored when you experience it in person.
Specifically, a Kustomize yaml is expecting an <code>myapplicationui.yaml</code> but can't find it.</p>
<p>This can easily happen when someone in your team attempts to rename files (e.g. to <code>myapplicationui_sample.yaml</code>) without checking all of the references.</p>
