bootstrap

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetProviderDataFormat added in v0.4.0

func SetProviderDataFormat(provider string, data []byte) string

SetProviderDataFormat takes some data and updates it according to the provider's need. If the provider is not known, it returns the data as is unchanged, but converted to string.

Types

type Bootstrap

type Bootstrap struct {
	// contains filtered or unexported fields
}

Bootstrap runs the bootstrap of mpas. This means it creates a new management repository and the installs the bootstrap component in the cluster targeted by the kubeconfig.

func New

func New(providerClient gitprovider.Client, opts ...Option) (*Bootstrap, error)

New returns a new Bootstrap. It accepts a gitprovider.Client and a list of options.

func (*Bootstrap) DeleteManagementRepository

func (b *Bootstrap) DeleteManagementRepository(ctx context.Context) error

DeleteManagementRepository deletes the management repository.

func (*Bootstrap) Run

func (b *Bootstrap) Run(ctx context.Context) error

Run runs the bootstrap of mpas and returns an error if it fails.

type Kustomize added in v0.4.0

type Kustomize struct {
	// contains filtered or unexported fields
}

func NewKustomizer added in v0.4.0

func NewKustomizer(opts *kustomizerOptions) *Kustomize

NewKustomizer creates a new kustomizer based on mutation options.

func (*Kustomize) GenerateKustomizedResourceData added in v0.4.0

func (k *Kustomize) GenerateKustomizedResourceData(component string) ([]byte, error)

type Kustomizer added in v0.4.0

type Kustomizer interface {
	GenerateKustomizedResourceData(component string) ([]byte, error)
}

Kustomizer can kustomize a given component and change image information.

type Option

type Option func(*options)

Option is a function that sets an option on the bootstrap

func WithCommitMessageAppendix

func WithCommitMessageAppendix(commitMessageAppendix string) Option

WithCommitMessageAppendix sets the commit message appendix to use for the bootstrap component

func WithComponents

func WithComponents(components []string) Option

WithComponents sets the components to include in the management repository

func WithDefaultBranch

func WithDefaultBranch(defaultBranch string) Option

WithDefaultBranch sets the default branch of the management repository

func WithDescription

func WithDescription(description string) Option

WithDescription sets the description of the management repository

func WithDockerConfigPath

func WithDockerConfigPath(dockerConfigPath string) Option

WithDockerConfigPath sets the docker config path to use for the bootstrap component

func WithFromFile

func WithFromFile(fromFile string) Option

WithFromFile sets the file from which to read the bootstrap component

func WithInterval

func WithInterval(interval time.Duration) Option

WithInterval sets the interval to use for the bootstrap component

func WithKubeClient

func WithKubeClient(kubeclient client.Client) Option

WithKubeClient sets the kubeclient to use for the bootstrap component

func WithOwner

func WithOwner(owner string) Option

WithOwner sets the owner of the management repository

func WithPersonal

func WithPersonal(personal bool) Option

WithPersonal sets the personal flag of the management repository

func WithPrinter

func WithPrinter(printer *printer.Printer) Option

WithPrinter sets the printer to use for printing messages

func WithRESTClientGetter

func WithRESTClientGetter(restClientGetter genericclioptions.RESTClientGetter) Option

WithRESTClientGetter sets the RESTClientGetter to use for the bootstrap component

func WithRegistry

func WithRegistry(registry string) Option

WithRegistry sets the registry to use for the bootstrap component

func WithRepositoryName

func WithRepositoryName(repositoryName string) Option

WithRepositoryName sets the repository name of the management repository

func WithRootFile added in v0.1.0

func WithRootFile(caFile string) Option

func WithTarget

func WithTarget(targetPath string) Option

WithTarget sets the targetPath of the bootstrap component

func WithTestURL

func WithTestURL(testURL string) Option

WithTestURL sets the testURL to use for the bootstrap component

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout sets the timeout to use for the bootstrap component

func WithToken

func WithToken(token string) Option

WithToken sets the token of the management repository

func WithTransportType

func WithTransportType(transportType string) Option

WithTransportType sets the transport type to use for git operations

func WithVisibility

func WithVisibility(visibility string) Option

WithVisibility sets the visibility of the management repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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