bootstrapkubeconfig

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

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))

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL