client

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// DefaultQPS is the default QPS value.
	DefaultQPS = 50
	// DefaultBurst is the default Burst value.
	DefaultBurst = 100
)

Variables

This section is empty.

Functions

func Apply added in v0.5.1

func Apply(ctx context.Context, c client.Client, obj client.Object, options ...func(*ApplyOptions)) error

Apply creates the given object or updates the existing object to the given one using apply patch.

func BuildConfigFromFlags

func BuildConfigFromFlags(masterURL, kubeConfigPath string, options ...func(c *rest.Config)) (*rest.Config, error)

BuildConfigFromFlags builds rest configs from a master url or a kube config filepath.

func BuildConfigFromKubeConfig added in v0.4.0

func BuildConfigFromKubeConfig(kubeconfig []byte, options ...func(c *rest.Config)) (*rest.Config, error)

BuildConfigFromKubeConfig builds rest configs from kube config data.

func SetQPS

func SetQPS(qps float32, burst int) func(c *rest.Config)

SetQPS sets the QPS and Burst.

func WithDryRun added in v0.5.1

func WithDryRun(dryRun bool) func(*ApplyOptions)

WithDryRun sets the DryRun option when creating or patching the object. The default value is `false`.

func WithFieldManager added in v0.5.1

func WithFieldManager(fieldManager string) func(*ApplyOptions)

WithFieldManager sets the FieldManager option when creating or patching the object. The default value is `controller-runtime`.

func WithForce added in v0.5.1

func WithForce(force bool) func(*ApplyOptions)

WithForce sets the Force option when patching the object. The default value is `true`.

Types

type ApplyOptions added in v0.5.1

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

ApplyOptions defines options needed to create or patch an object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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