utils

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Timeout         = 30 * time.Second
	PollingInterval = 3 * time.Second
)

Variables

This section is empty.

Functions

func CreateBundle added in v0.10.0

func CreateBundle(ctx context.Context, k8sClient client.Client, name, namespace string, targets []v1alpha1.BundleTarget, targetRestrictions []v1alpha1.BundleTarget) (*v1alpha1.Bundle, error)

func CreateCluster added in v0.10.0

func CreateCluster(ctx context.Context, k8sClient client.Client, name, controllerNs string, labels map[string]string, clusterNs string) (*v1alpha1.Cluster, error)

func FromEnvTestConfig added in v0.10.0

func FromEnvTestConfig(cfg *rest.Config) []byte

FromEnvTestConfig returns a new Kubeconfig in byte form when running in envtest.

func NewClient added in v0.10.0

func NewClient(cfg *rest.Config) (client.Client, error)

NewClient returns a new controller-runtime client.

func NewEnvTest added in v0.10.0

func NewEnvTest() *envtest.Environment

NewEnvTest returns a new envtest with the Fleet CRDs loaded.

func NewManager added in v0.10.0

func NewManager(cfg *rest.Config) (ctrl.Manager, error)

NewManager returns a new controller-runtime manager suitable for testing.

func NewNamespaceName

func NewNamespaceName() (string, error)

func WriteKubeConfig added in v0.10.0

func WriteKubeConfig(cfg *rest.Config, path string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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