mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
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"
|
||||
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"
|
||||
)
|
||||
|
||||
@ -38,7 +38,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
func fuzzBootstrapToken(obj *output.BootstrapToken, c fuzz.Continue) {
|
||||
c.FuzzNoCustom(obj)
|
||||
|
||||
obj.Token = &kubeadmapiv1beta2.BootstrapTokenString{ID: "uvxdac", Secret: "fq35fuyue3kd4gda"}
|
||||
obj.Token = &bootstraptokenv1.BootstrapTokenString{ID: "uvxdac", Secret: "fq35fuyue3kd4gda"}
|
||||
obj.Description = ""
|
||||
obj.TTL = &metav1.Duration{Duration: time.Hour * 24}
|
||||
obj.Usages = []string{"authentication", "signing"}
|
||||
|
@ -19,18 +19,16 @@ package output
|
||||
import (
|
||||
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
|
||||
|
||||
// BootstrapToken represents information for the output produced by 'kubeadm token list'
|
||||
// This is a copy of BootstrapToken struct from ../kubeadm/types.go with 2 additions:
|
||||
// metav1.TypeMeta and metav1.ObjectMeta
|
||||
// BootstrapToken represents information for the bootstrap token output produced by kubeadm
|
||||
type BootstrapToken struct {
|
||||
metav1.TypeMeta
|
||||
|
||||
kubeadmapiv1beta2.BootstrapToken
|
||||
bootstraptokenv1.BootstrapToken
|
||||
}
|
||||
|
||||
// +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
|
||||
|
||||
// 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 {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user