operator

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 23 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertListNames added in v1.17.18

func AssertListNames(t *testing.T, exp []string, list func() ([][]byte, error)) [][]byte

AssertListNames asserts that list eventually returns exactly the resources named exp, and returns the raw items of that response.

Types

type Operator

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

func New

func New(t *testing.T, fopts ...Option) *Operator

func (*Operator) Address

func (o *Operator) Address() string

func (*Operator) Cleanup

func (o *Operator) Cleanup(t *testing.T)

func (*Operator) Dial

func (o *Operator) Dial(t *testing.T, ctx context.Context, sentry *sentry.Sentry, appID string) operatorv1pb.OperatorClient

func (*Operator) HealthzPort

func (o *Operator) HealthzPort() int

func (*Operator) MetricsPort

func (o *Operator) MetricsPort() int

func (*Operator) Port

func (o *Operator) Port() int

func (*Operator) Run

func (o *Operator) Run(t *testing.T, ctx context.Context)

func (*Operator) WaitUntilRunning

func (o *Operator) WaitUntilRunning(t *testing.T, ctx context.Context)

func (*Operator) WebhookPort added in v1.18.0

func (o *Operator) WebhookPort() int

WebhookPort returns the port that the operator's webhook server is listening on. This is the TLS port that the Kubernetes API server would connect to for CRD conversion / validating / mutating webhooks.

type Option

type Option func(*options)

Option is a function that configures the process.

func WithAPIPort

func WithAPIPort(port int) Option

func WithCacheSyncPeriod added in v1.18.1

func WithCacheSyncPeriod(d time.Duration) Option

WithCacheSyncPeriod sets the controller-runtime informer cache resync period. A short period lets tests exercise resync behaviour deterministically.

func WithConfigPath

func WithConfigPath(path string) Option

func WithDisableLeaderElection

func WithDisableLeaderElection(disable bool) Option

func WithExecOptions

func WithExecOptions(execOptions ...exec.Option) Option

func WithHealthzPort

func WithHealthzPort(port int) Option

func WithKubeconfigPath

func WithKubeconfigPath(path string) Option

func WithLogLevel

func WithLogLevel(level string) Option

func WithMetricsPort

func WithMetricsPort(port int) Option

func WithNamespace

func WithNamespace(namespace string) Option

func WithTrustAnchorsFile

func WithTrustAnchorsFile(path string) Option

Jump to

Keyboard shortcuts

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