plugin

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type CordonOptions

type CordonOptions struct {
	*base.Options

	// SyncTarget is the name of the SyncTarget to cordon or uncordon.
	SyncTarget string
	// Cordon indicates if the SyncTarget should be cordoned (true) or uncordoned (false).
	Cordon bool
}

CordonOptions contains options for cordoning or uncordoning a SyncTarget.

func NewCordonOptions

func NewCordonOptions(streams genericclioptions.IOStreams) *CordonOptions

NewCordonOptions returns a new CordonOptions.

func (*CordonOptions) Complete

func (o *CordonOptions) Complete(args []string) error

Complete ensures all dynamically populated fields are initialized.

func (*CordonOptions) Run

func (o *CordonOptions) Run(ctx context.Context) error

Run cordons the sync target and marks it as unschedulable.

func (*CordonOptions) Validate

func (o *CordonOptions) Validate() error

Validate validates the CordonOptions are complete and usable.

type DrainOptions

type DrainOptions struct {
	*base.Options

	// SyncTarget is the name of the SyncTarget to drain.
	SyncTarget string
}

DrainOptions contains options for draining a SyncTarget.

func NewDrainOptions

func NewDrainOptions(streams genericclioptions.IOStreams) *DrainOptions

NewDrainOptions returns a new DrainOptions.

func (*DrainOptions) Complete

func (o *DrainOptions) Complete(args []string) error

Complete ensures all dynamically populated fields are initialized.

func (*DrainOptions) Run

func (o *DrainOptions) Run(ctx context.Context) error

Run drains the sync target and marks it as unschedulable.

func (*DrainOptions) Validate

func (o *DrainOptions) Validate() error

Validate validates the DrainOptions are complete and usable.

type SyncOptions

type SyncOptions struct {
	*base.Options

	// ResourcesToSync is a list of fully-qualified resource names that should be synced by the syncer.
	ResourcesToSync []string
	// APIExports is a list of APIExport to be supported by the synctarget.
	APIExports []string
	// SyncerImage is the container image that should be used for the syncer.
	SyncerImage string
	// Replicas is the number of replicas to configure in the syncer's deployment.
	Replicas int
	// OutputFile is the path to a file where the YAML for the syncer should be written.
	OutputFile string
	// DownstreamNamespace is the name of the namespace in the physical cluster where the syncer deployment is created.
	DownstreamNamespace string
	// KCPNamespace is the name of the namespace in the kcp workspace where the service account is created for the
	// syncer.
	KCPNamespace string
	// QPS is the refill rate for the syncer client's rate limiter bucket (steady state requests per second).
	QPS float32
	// Burst is the maximum size for the syncer client's rate limiter bucket when idle.
	Burst int
	// SyncTargetName is the name of the SyncTarget in the kcp workspace.
	SyncTargetName string
	// SyncTargetLabels are the labels to be applied to the SyncTarget in the kcp workspace.
	SyncTargetLabels []string
	// APIImportPollInterval is the time interval to push apiimport.
	APIImportPollInterval time.Duration
	// FeatureGates is used to configure which feature gates are enabled.
	FeatureGates string
	// DownstreamNamespaceCleanDelay is the time to wait before deleting of a downstream namespace.
	DownstreamNamespaceCleanDelay time.Duration
}

SyncOptions contains options for configuring a SyncTarget and its corresponding syncer.

func NewSyncOptions

func NewSyncOptions(streams genericclioptions.IOStreams) *SyncOptions

NewSyncOptions returns a new SyncOptions.

func (*SyncOptions) BindFlags

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

BindFlags binds fields SyncOptions as command line flags to cmd's flagset.

func (*SyncOptions) Complete

func (o *SyncOptions) Complete(args []string) error

Complete ensures all dynamically populated fields are initialized.

func (*SyncOptions) Run

func (o *SyncOptions) Run(ctx context.Context) error

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

func (*SyncOptions) Validate

func (o *SyncOptions) Validate() error

Validate validates the SyncOptions are complete and usable.

Jump to

Keyboard shortcuts

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