mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 16:29:21 +00:00
apiextensions: add AddToGroupVersion call to CRD example register.go
Avoid `v1.ListOptions is not suitable for converting to ...` message in CRD client on List.
This commit is contained in:
parent
60cd056cb4
commit
9dfa97c595
@ -17,6 +17,7 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
|
||||||
@ -47,5 +48,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
|||||||
&Example{},
|
&Example{},
|
||||||
&ExampleList{},
|
&ExampleList{},
|
||||||
)
|
)
|
||||||
|
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user