kubeadm: make output/BootstrapToken use bootstraptoken/v1
This commit is contained in:
parent
47af311ea4
commit
73d528dce9
@ -24,7 +24,7 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
|
||||||
kubeadmapiv1beta2 "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2"
|
bootstraptokenv1 "k8s.io/kubernetes/cmd/kubeadm/app/apis/bootstraptoken/v1"
|
||||||
"k8s.io/kubernetes/cmd/kubeadm/app/apis/output"
|
"k8s.io/kubernetes/cmd/kubeadm/app/apis/output"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
|
|||||||
func fuzzBootstrapToken(obj *output.BootstrapToken, c fuzz.Continue) {
|
func fuzzBootstrapToken(obj *output.BootstrapToken, c fuzz.Continue) {
|
||||||
c.FuzzNoCustom(obj)
|
c.FuzzNoCustom(obj)
|
||||||
|
|
||||||
obj.Token = &kubeadmapiv1beta2.BootstrapTokenString{ID: "uvxdac", Secret: "fq35fuyue3kd4gda"}
|
obj.Token = &bootstraptokenv1.BootstrapTokenString{ID: "uvxdac", Secret: "fq35fuyue3kd4gda"}
|
||||||
obj.Description = ""
|
obj.Description = ""
|
||||||
obj.TTL = &metav1.Duration{Duration: time.Hour * 24}
|
obj.TTL = &metav1.Duration{Duration: time.Hour * 24}
|
||||||
obj.Usages = []string{"authentication", "signing"}
|
obj.Usages = []string{"authentication", "signing"}
|
||||||
|
@ -19,18 +19,16 @@ package output
|
|||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
|
||||||
kubeadmapiv1beta2 "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2"
|
bootstraptokenv1 "k8s.io/kubernetes/cmd/kubeadm/app/apis/bootstraptoken/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
// BootstrapToken represents information for the output produced by 'kubeadm token list'
|
// BootstrapToken represents information for the bootstrap token output produced by kubeadm
|
||||||
// This is a copy of BootstrapToken struct from ../kubeadm/types.go with 2 additions:
|
|
||||||
// metav1.TypeMeta and metav1.ObjectMeta
|
|
||||||
type BootstrapToken struct {
|
type BootstrapToken struct {
|
||||||
metav1.TypeMeta
|
metav1.TypeMeta
|
||||||
|
|
||||||
kubeadmapiv1beta2.BootstrapToken
|
bootstraptokenv1.BootstrapToken
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
@ -25,8 +25,6 @@ import (
|
|||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
// BootstrapToken represents information for the bootstrap token output produced by kubeadm
|
// BootstrapToken represents information for the bootstrap token output produced by kubeadm
|
||||||
// This is a copy of BootstrapToken struct from ../kubeadm/types.go with 2 additions:
|
|
||||||
// metav1.TypeMeta and metav1.ObjectMeta
|
|
||||||
type BootstrapToken struct {
|
type BootstrapToken struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user