Documentation ¶
Index ¶
- func AddConfigFlag(fs *pflag.FlagSet, cfgPath *string)
- func AddKubeConfigFlag(fs *pflag.FlagSet, kubeConfigFile *string)
- type BootstrapTokenOptions
- func (bto *BootstrapTokenOptions) AddDescriptionFlag(fs *pflag.FlagSet)
- func (bto *BootstrapTokenOptions) AddGroupsFlag(fs *pflag.FlagSet)
- func (bto *BootstrapTokenOptions) AddTTLFlag(fs *pflag.FlagSet)
- func (bto *BootstrapTokenOptions) AddTTLFlagWithName(fs *pflag.FlagSet, flagName string)
- func (bto *BootstrapTokenOptions) AddTokenFlag(fs *pflag.FlagSet)
- func (bto *BootstrapTokenOptions) AddUsagesFlag(fs *pflag.FlagSet)
- func (bto *BootstrapTokenOptions) ApplyTo(cfg *kubeadmapiv1alpha2.MasterConfiguration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddConfigFlag ¶
AddConfigFlag adds the --config flag to the given flagset
func AddKubeConfigFlag ¶
AddKubeConfigFlag adds the --kubeconfig flag to the given flagset
Types ¶
type BootstrapTokenOptions ¶
type BootstrapTokenOptions struct { *kubeadmapiv1alpha2.BootstrapToken TokenStr string }
BootstrapTokenOptions is a wrapper struct for adding bootstrap token-related flags to a FlagSet and applying the parsed flags to a MasterConfiguration object later at runtime TODO: In the future, we might want to group the flags in a better way than adding them all individually like this
func NewBootstrapTokenOptions ¶
func NewBootstrapTokenOptions() *BootstrapTokenOptions
NewBootstrapTokenOptions creates a new BootstrapTokenOptions object with the default values
func (*BootstrapTokenOptions) AddDescriptionFlag ¶
func (bto *BootstrapTokenOptions) AddDescriptionFlag(fs *pflag.FlagSet)
AddDescriptionFlag adds the --description flag to the given flagset
func (*BootstrapTokenOptions) AddGroupsFlag ¶
func (bto *BootstrapTokenOptions) AddGroupsFlag(fs *pflag.FlagSet)
AddGroupsFlag adds the --groups flag to the given flagset
func (*BootstrapTokenOptions) AddTTLFlag ¶
func (bto *BootstrapTokenOptions) AddTTLFlag(fs *pflag.FlagSet)
AddTTLFlag adds the --token-ttl flag to the given flagset
func (*BootstrapTokenOptions) AddTTLFlagWithName ¶
func (bto *BootstrapTokenOptions) AddTTLFlagWithName(fs *pflag.FlagSet, flagName string)
AddTTLFlagWithName adds the --token-ttl flag with a custom flag name given flagset
func (*BootstrapTokenOptions) AddTokenFlag ¶
func (bto *BootstrapTokenOptions) AddTokenFlag(fs *pflag.FlagSet)
AddTokenFlag adds the --token flag to the given flagset
func (*BootstrapTokenOptions) AddUsagesFlag ¶
func (bto *BootstrapTokenOptions) AddUsagesFlag(fs *pflag.FlagSet)
AddUsagesFlag adds the --usages flag to the given flagset
func (*BootstrapTokenOptions) ApplyTo ¶
func (bto *BootstrapTokenOptions) ApplyTo(cfg *kubeadmapiv1alpha2.MasterConfiguration) error
ApplyTo applies the values set internally in the BootstrapTokenOptions object to a MasterConfiguration 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.