// NewBootstrapTokenOptions creates a new BootstrapTokenOptions object with the default values func NewBootstrapTokenOptions() *BootstrapTokenOptions { … } type BootstrapTokenOptions … // AddTokenFlag adds the --token flag to the given flagset func (bto *BootstrapTokenOptions) AddTokenFlag(fs *pflag.FlagSet) { … } // AddTTLFlag adds the --token-ttl flag to the given flagset func (bto *BootstrapTokenOptions) AddTTLFlag(fs *pflag.FlagSet) { … } // AddTTLFlagWithName adds the --token-ttl flag with a custom flag name given flagset func (bto *BootstrapTokenOptions) AddTTLFlagWithName(fs *pflag.FlagSet, flagName string) { … } // AddUsagesFlag adds the --usages flag to the given flagset func (bto *BootstrapTokenOptions) AddUsagesFlag(fs *pflag.FlagSet) { … } // AddGroupsFlag adds the --groups flag to the given flagset func (bto *BootstrapTokenOptions) AddGroupsFlag(fs *pflag.FlagSet) { … } // AddDescriptionFlag adds the --description flag to the given flagset func (bto *BootstrapTokenOptions) AddDescriptionFlag(fs *pflag.FlagSet) { … } // ApplyTo applies the values set internally in the BootstrapTokenOptions object to a InitConfiguration object at runtime // If --token was specified in the CLI (as a string), it's parsed and validated before it's added to the BootstrapToken object. func (bto *BootstrapTokenOptions) ApplyTo(cfg *kubeadmapiv1.InitConfiguration) error { … }