jig

package
v2.21.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(fs *flag.FlagSet)

func BuildID

func BuildID() string

func ClusterSemver

func ClusterSemver(log *zap.SugaredLogger) semver.Semver

func ClusterVersion

func ClusterVersion(log *zap.SugaredLogger) string

func DatacenterName

func DatacenterName() string

func KubermaticNamespace

func KubermaticNamespace() string

Types

type Addon

type Addon struct {
	Name      string
	Variables *runtime.RawExtension
	Labels    map[string]string
}

type ClusterJig

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

func NewClusterJig

func NewClusterJig(client ctrlruntimeclient.Client, log *zap.SugaredLogger) *ClusterJig

func (*ClusterJig) Cluster

func (j *ClusterJig) Cluster(ctx context.Context) (*kubermaticv1.Cluster, error)

func (*ClusterJig) ClusterClient

func (j *ClusterJig) ClusterClient(ctx context.Context) (ctrlruntimeclient.Client, error)

func (*ClusterJig) ClusterName

func (j *ClusterJig) ClusterName() string

func (*ClusterJig) ClusterRESTConfig

func (j *ClusterJig) ClusterRESTConfig(ctx context.Context) (*rest.Config, error)

func (*ClusterJig) Create

func (j *ClusterJig) Create(ctx context.Context, waitForHealthy bool) (*kubermaticv1.Cluster, error)

func (*ClusterJig) Delete

func (j *ClusterJig) Delete(ctx context.Context, synchronous bool) error

func (*ClusterJig) EnsureAddon

func (j *ClusterJig) EnsureAddon(ctx context.Context, addon Addon) error

func (*ClusterJig) WaitForClusterNamespace

func (j *ClusterJig) WaitForClusterNamespace(ctx context.Context, timeout time.Duration) error

func (*ClusterJig) WaitForHealthyControlPlane

func (j *ClusterJig) WaitForHealthyControlPlane(ctx context.Context, timeout time.Duration) error

func (*ClusterJig) WithAddons

func (j *ClusterJig) WithAddons(addons ...Addon) *ClusterJig

func (*ClusterJig) WithCNIPlugin

func (j *ClusterJig) WithCNIPlugin(settings *kubermaticv1.CNIPluginSettings) *ClusterJig

func (*ClusterJig) WithCloudSpec

func (j *ClusterJig) WithCloudSpec(spec *kubermaticv1.CloudSpec) *ClusterJig

func (*ClusterJig) WithExistingCluster

func (j *ClusterJig) WithExistingCluster(clusterName string) *ClusterJig

func (*ClusterJig) WithExposeStrategy

func (j *ClusterJig) WithExposeStrategy(strategy kubermaticv1.ExposeStrategy) *ClusterJig

func (*ClusterJig) WithFeatures added in v2.21.1

func (j *ClusterJig) WithFeatures(features map[string]bool) *ClusterJig

func (*ClusterJig) WithGenerateName

func (j *ClusterJig) WithGenerateName(prefix string) *ClusterJig

func (*ClusterJig) WithHumanReadableName

func (j *ClusterJig) WithHumanReadableName(name string) *ClusterJig

func (*ClusterJig) WithKonnectivity

func (j *ClusterJig) WithKonnectivity(enabled bool) *ClusterJig

func (*ClusterJig) WithLabels

func (j *ClusterJig) WithLabels(labels map[string]string) *ClusterJig

func (*ClusterJig) WithName

func (j *ClusterJig) WithName(name string) *ClusterJig

func (*ClusterJig) WithOperatingSystemManager

func (j *ClusterJig) WithOperatingSystemManager(enabled bool) *ClusterJig

func (*ClusterJig) WithOwnerEmail

func (j *ClusterJig) WithOwnerEmail(email string) *ClusterJig

func (*ClusterJig) WithPatch

func (j *ClusterJig) WithPatch(patcher func(c *kubermaticv1.ClusterSpec) *kubermaticv1.ClusterSpec) *ClusterJig

func (*ClusterJig) WithPreset

func (j *ClusterJig) WithPreset(presetSecret string) *ClusterJig

func (*ClusterJig) WithProject

func (j *ClusterJig) WithProject(project *kubermaticv1.Project) *ClusterJig

func (*ClusterJig) WithProjectName

func (j *ClusterJig) WithProjectName(projectName string) *ClusterJig

func (*ClusterJig) WithProxyMode

func (j *ClusterJig) WithProxyMode(mode string) *ClusterJig

func (*ClusterJig) WithSSHKeyAgent

func (j *ClusterJig) WithSSHKeyAgent(enabled bool) *ClusterJig

func (*ClusterJig) WithSpec

func (j *ClusterJig) WithSpec(spec *kubermaticv1.ClusterSpec) *ClusterJig

func (*ClusterJig) WithTestName

func (j *ClusterJig) WithTestName(name string) *ClusterJig

WithTestName injects the test name into the cluster name. The name should be less than 18 characters in length.

func (*ClusterJig) WithVersion

func (j *ClusterJig) WithVersion(version string) *ClusterJig

type MachineJig

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

func NewMachineJig

func NewMachineJig(client ctrlruntimeclient.Client, log *zap.SugaredLogger, cluster *kubermaticv1.Cluster) *MachineJig

func (*MachineJig) Create

func (j *MachineJig) Create(ctx context.Context, waitMode MachineWaitMode) error

func (*MachineJig) Delete

func (j *MachineJig) Delete(ctx context.Context, synchronous bool) error

func (*MachineJig) WithAWS

func (j *MachineJig) WithAWS(instanceType string) *MachineJig

func (*MachineJig) WithCentOS

func (j *MachineJig) WithCentOS() *MachineJig

func (*MachineJig) WithCluster

func (j *MachineJig) WithCluster(cluster *kubermaticv1.Cluster) *MachineJig

func (*MachineJig) WithClusterClient

func (j *MachineJig) WithClusterClient(client ctrlruntimeclient.Client) *MachineJig

If you already have a cluster client, you can set it with WithClusterClient(). Otherwise the MachineJig will retrieve a proper client itself.

func (*MachineJig) WithClusterJig

func (j *MachineJig) WithClusterJig(jig *ClusterJig) *MachineJig

func (*MachineJig) WithHetzner

func (j *MachineJig) WithHetzner(instanceSize string) *MachineJig

func (*MachineJig) WithName

func (j *MachineJig) WithName(name string) *MachineJig

func (*MachineJig) WithOSSpec

func (j *MachineJig) WithOSSpec(spec interface{}) *MachineJig

WithOSSpec expects arguments like pkg/providerconfig/ubuntu.Config{}. Do not use pointers.

func (*MachineJig) WithProviderSpec

func (j *MachineJig) WithProviderSpec(spec interface{}) *MachineJig

WithProviderSpec expects arguments like pkg/cloudprovider/provider/aws/types/RawConfig{}. Do not use pointers.

func (*MachineJig) WithRHEL

func (j *MachineJig) WithRHEL() *MachineJig

func (*MachineJig) WithReplicas

func (j *MachineJig) WithReplicas(replicas int) *MachineJig

func (*MachineJig) WithUbuntu

func (j *MachineJig) WithUbuntu() *MachineJig

type MachineWaitMode

type MachineWaitMode string
const (
	WaitForNothing    MachineWaitMode = ""
	WaitForReadyNodes MachineWaitMode = "nodes"
	WaitForReadyPods  MachineWaitMode = "pods"
)

type ProjectJig

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

func NewProjectJig

func NewProjectJig(client ctrlruntimeclient.Client, log *zap.SugaredLogger) *ProjectJig

func (*ProjectJig) Create

func (j *ProjectJig) Create(ctx context.Context, waitForActive bool) (*kubermaticv1.Project, error)

func (*ProjectJig) Delete

func (j *ProjectJig) Delete(ctx context.Context, synchronous bool) error

func (*ProjectJig) Project

func (j *ProjectJig) Project(ctx context.Context) (*kubermaticv1.Project, error)

func (*ProjectJig) ProjectName

func (j *ProjectJig) ProjectName() string

func (*ProjectJig) WithHumanReadableName

func (j *ProjectJig) WithHumanReadableName(name string) *ProjectJig

type TestJig

type TestJig struct {
	ProjectJig *ProjectJig
	ClusterJig *ClusterJig
	MachineJig *MachineJig
}

func NewAWSCluster

func NewAWSCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, accessKeyID, secretAccessKey string, replicas int) *TestJig

func NewBYOCluster

func NewBYOCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger) *TestJig

func NewBYOClusterWithFeatures added in v2.21.1

func NewBYOClusterWithFeatures(client ctrlruntimeclient.Client, log *zap.SugaredLogger, features map[string]bool) *TestJig

func NewHetznerCluster

func NewHetznerCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, replicas int) *TestJig

func (*TestJig) Cleanup

func (j *TestJig) Cleanup(ctx context.Context, t *testing.T, synchronous bool)

func (*TestJig) ClusterClient

func (j *TestJig) ClusterClient(ctx context.Context) (ctrlruntimeclient.Client, error)

func (*TestJig) ClusterRESTConfig

func (j *TestJig) ClusterRESTConfig(ctx context.Context) (*rest.Config, error)

func (*TestJig) Setup

func (*TestJig) WaitForHealthyControlPlane

func (j *TestJig) WaitForHealthyControlPlane(ctx context.Context, timeout time.Duration) error

Jump to

Keyboard shortcuts

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