plugin

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SyncerSecretConfigKey   = "kubeconfig"
	SyncerIDPrefix          = "kcp-syncer-"
	MaxSyncTargetNameLength = validation.DNS1123SubdomainMaxLength - (9 + len(SyncerIDPrefix))
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(opts *Options) (*Config, error)

NewConfig load a kubeconfig with default config access

func (*Config) Cordon

func (c *Config) Cordon(ctx context.Context, syncTargetName string) error

Cordon the sync target and mark it as unschedulable

func (*Config) Drain

func (c *Config) Drain(ctx context.Context, syncTargetName string) error

Start draining the sync target and mark it as unschedulable

func (*Config) Sync

func (c *Config) Sync(
	ctx context.Context,
	outputFilePath, syncTargetName, kcpNamespaceName, downstreamNamespace, image string,
	resourcesToSync []string,
	replicas int,
	qps float32,
	burst int,
) error

Sync prepares a kcp workspace for use with a syncer and outputs the configuration required to deploy a syncer to the pcluster to stdout.

func (*Config) Uncordon

func (c *Config) Uncordon(ctx context.Context, syncTargetName string) error

Uncordon the sync target and mark it as schedulable

type Options

type Options struct {
	KubectlOverrides *clientcmd.ConfigOverrides

	genericclioptions.IOStreams
}

Options for the workload commands.

func NewOptions

func NewOptions(streams genericclioptions.IOStreams) *Options

NewOptions provides an instance of Options with default values

func (*Options) BindFlags

func (o *Options) BindFlags(cmd *cobra.Command)

BindFlags binds the arguments common to all sub-commands, to the corresponding main command flags

func (*Options) Validate

func (o *Options) Validate() error

Jump to

Keyboard shortcuts

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