mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
kubeadm config images list: update output API
This commit is contained in:
parent
3ed0f1bec1
commit
be7e5b47fe
@ -47,6 +47,7 @@ func Resource(resource string) schema.GroupResource {
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&BootstrapToken{},
|
||||
&Images{},
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
@ -31,3 +31,12 @@ type BootstrapToken struct {
|
||||
|
||||
kubeadmapiv1beta2.BootstrapToken
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Images represents information for the output produced by 'kubeadm config images list'
|
||||
type Images struct {
|
||||
metav1.TypeMeta
|
||||
|
||||
Images []string
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ func Resource(resource string) schema.GroupResource {
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&BootstrapToken{},
|
||||
&Images{},
|
||||
)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
|
@ -31,3 +31,12 @@ type BootstrapToken struct {
|
||||
|
||||
kubeadmapiv1beta2.BootstrapToken
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Images represents information for the output produced by 'kubeadm config images list'
|
||||
type Images struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
Images []string `json:"images"`
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
unsafe "unsafe"
|
||||
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
output "k8s.io/kubernetes/cmd/kubeadm/app/apis/output"
|
||||
@ -43,6 +45,16 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*Images)(nil), (*output.Images)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_Images_To_output_Images(a.(*Images), b.(*output.Images), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*output.Images)(nil), (*Images)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_output_Images_To_v1alpha1_Images(a.(*output.Images), b.(*Images), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -65,3 +77,23 @@ func autoConvert_output_BootstrapToken_To_v1alpha1_BootstrapToken(in *output.Boo
|
||||
func Convert_output_BootstrapToken_To_v1alpha1_BootstrapToken(in *output.BootstrapToken, out *BootstrapToken, s conversion.Scope) error {
|
||||
return autoConvert_output_BootstrapToken_To_v1alpha1_BootstrapToken(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_Images_To_output_Images(in *Images, out *output.Images, s conversion.Scope) error {
|
||||
out.Images = *(*[]string)(unsafe.Pointer(&in.Images))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_Images_To_output_Images is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_Images_To_output_Images(in *Images, out *output.Images, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_Images_To_output_Images(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_output_Images_To_v1alpha1_Images(in *output.Images, out *Images, s conversion.Scope) error {
|
||||
out.Images = *(*[]string)(unsafe.Pointer(&in.Images))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_output_Images_To_v1alpha1_Images is an autogenerated conversion function.
|
||||
func Convert_output_Images_To_v1alpha1_Images(in *output.Images, out *Images, s conversion.Scope) error {
|
||||
return autoConvert_output_Images_To_v1alpha1_Images(in, out, s)
|
||||
}
|
||||
|
@ -49,3 +49,33 @@ func (in *BootstrapToken) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Images) DeepCopyInto(out *Images) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.Images != nil {
|
||||
in, out := &in.Images, &out.Images
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Images.
|
||||
func (in *Images) DeepCopy() *Images {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Images)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Images) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
30
cmd/kubeadm/app/apis/output/zz_generated.deepcopy.go
generated
30
cmd/kubeadm/app/apis/output/zz_generated.deepcopy.go
generated
@ -49,3 +49,33 @@ func (in *BootstrapToken) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Images) DeepCopyInto(out *Images) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.Images != nil {
|
||||
in, out := &in.Images, &out.Images
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Images.
|
||||
func (in *Images) DeepCopy() *Images {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Images)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Images) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user