File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,21 @@ func (s *CRD) CustomRender() ([]byte, error) {
114
114
if err = yaml .Unmarshal (b , crd ); err != nil {
115
115
return nil , err
116
116
}
117
- // controller-tools does not set ListKind or Singular names.
118
- setCRDNamesForResource (crd , s .Resource )
117
+
118
+ // controller-tools inserts an annotation and assumes that the binary
119
+ // that creates the CRD is controller-gen. In this case, we don't use
120
+ // controller-gen. Instead, we vendor and use the same library that
121
+ // controller-gen does.
122
+ //
123
+ // The value that gets populated in the annotation is based on the
124
+ // build info of the compiled binary, not on the version of the
125
+ // vendored controller-tools library.
126
+ //
127
+ // See: https://github.com/kubernetes-sigs/controller-tools/issues/348
128
+ //
129
+ // TODO(joelanford): Sort out what to do with this. Until then, let's
130
+ // just remove it.
131
+ delete (crd .Annotations , "controller-gen.kubebuilder.io/version" )
119
132
} else {
120
133
// There are currently no commands to update CRD manifests for non-Go
121
134
// operators, so if a CRD manifest already exists for this gvk, this
You can’t perform that action at this time.
0 commit comments