Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultBootstrapContext = "bootstrap"
)
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate( startingCfg *clientcmdapi.Config, token *bootstraptoken.BootstrapToken, opts ...func(*GenerateOptions), ) (*clientcmdapi.Config, error)
Generate generates a bootstrap clientcmdapi.Config from the given starting config and token.
func WithContext ¶
func WithContext(context string) func(*GenerateOptions)
WithContext sets the context to use to the given one.
Types ¶
type GenerateOptions ¶
type GenerateOptions struct { // Context is the context to use for generating the bootstrap kubeconfig. // If empty, the current context will be used. Context string // BootstrapContext is context name of the resulting bootstrap kubeconfig. // If empty, DefaultBootstrapContext will be used. BootstrapContext string }
GenerateOptions are options for generating a bootstrap kubeconfig.
func (*GenerateOptions) ApplyOptions ¶
func (o *GenerateOptions) ApplyOptions(opts []func(*GenerateOptions))
Click to show internal directories.
Click to hide internal directories.