apiserver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKubeAPIServerFlags = internal.APIServerDefaultArgs

DefaultKubeAPIServerFlags exposes the default args for the APIServer so that you can use those to append your own additional arguments.

Functions

This section is empty.

Types

type ServerWarpper

type ServerWarpper struct {
	// ControlPlane is the ControlPlane including the apiserver and etcd
	ControlPlane internal.ControlPlane

	// Config can be used to talk to the apiserver.  It's automatically
	// populated if not set using the standard controller-runtime config
	// loading.
	Config *rest.Config

	// UseExisting indicates that this environments should use an
	// existing kubeconfig, instead of trying to stand up a new control plane.
	// This is useful in cases that need aggregated API servers and the like.
	UseExistingCluster bool

	UseExistingEtcd bool

	// ControlPlaneStartTimeout is the maximum duration each controlplane component
	// may take to start. It defaults to the KUBEBUILDER_CONTROLPLANE_START_TIMEOUT
	// environment variable or 20 seconds if unspecified
	ControlPlaneStartTimeout time.Duration

	// ControlPlaneStopTimeout is the maximum duration each controlplane component
	// may take to stop. It defaults to the KUBEBUILDER_CONTROLPLANE_STOP_TIMEOUT
	// environment variable or 20 seconds if unspecified
	ControlPlaneStopTimeout time.Duration

	// KubeAPIServerFlags is the set of flags passed while starting the api server.
	KubeAPIServerFlags []string

	// AttachControlPlaneOutput indicates if control plane output will be attached to os.Stdout and os.Stderr.
	// Enable this to get more visibility of the testing control plane.
	// It respect KUBEBUILDER_ATTACH_CONTROL_PLANE_OUTPUT environment variable.
	AttachControlPlaneOutput bool

	BasePath string
	RootDir  string
	*option.ApiServerOption
}

Environment creates a Kubernetes test environment that will start / stop the Kubernetes control plane and install extension APIs

func (*ServerWarpper) Start

func (te *ServerWarpper) Start(stopCh <-chan struct{}) (*rest.Config, error)

Start starts a local Kubernetes server and updates te.ApiserverPort with the port it is listening on

func (*ServerWarpper) Stop

func (te *ServerWarpper) Stop() error

Stop stops a running server. Previously stop ControlPlane.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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