mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Switch to new generator
This commit is contained in:
@@ -20,17 +20,12 @@ import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/conversion"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
func addConversionFuncs(scheme *runtime.Scheme) {
|
||||
// Add non-generated conversion functions
|
||||
err := scheme.AddConversionFuncs(
|
||||
Convert_api_PodSpec_To_v1_PodSpec,
|
||||
Convert_v1_PodSpec_To_api_PodSpec,
|
||||
)
|
||||
err := scheme.AddConversionFuncs()
|
||||
if err != nil {
|
||||
// If one of the conversion functions is malformed, detect it immediately.
|
||||
panic(err)
|
||||
@@ -50,14 +45,3 @@ func addConversionFuncs(scheme *runtime.Scheme) {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// The following two PodSpec conversions functions where copied from pkg/api/conversion.go
|
||||
// for the generated functions to work properly.
|
||||
// This should be fixed: https://github.com/kubernetes/kubernetes/issues/12977
|
||||
func Convert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *v1.PodSpec, s conversion.Scope) error {
|
||||
return v1.Convert_api_PodSpec_To_v1_PodSpec(in, out, s)
|
||||
}
|
||||
|
||||
func Convert_v1_PodSpec_To_api_PodSpec(in *v1.PodSpec, out *api.PodSpec, s conversion.Scope) error {
|
||||
return v1.Convert_v1_PodSpec_To_api_PodSpec(in, out, s)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user