jig

package
v3.0.0-...-d6c4d9c Latest Latest
Warning

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

Go to latest
Published: Apr 14, 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 Datacenter

func Datacenter(ctx context.Context, client ctrlruntimeclient.Client, datacenter string) (*kubermaticv1.Datacenter, error)

func KubermaticNamespace

func KubermaticNamespace() string

func SSHPublicKey

func SSHPublicKey() string

Types

type AWSCredentials

type AWSCredentials struct {
	CommonCredentials

	AccessKeyID     string
	SecretAccessKey string
}

func (*AWSCredentials) AddFlags

func (c *AWSCredentials) AddFlags(fs *flag.FlagSet)

func (*AWSCredentials) Parse

func (c *AWSCredentials) Parse() (err error)

type Addon

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

type AlibabaCredentials

type AlibabaCredentials struct {
	CommonCredentials

	AccessKeyID     string
	AccessKeySecret string
}

func (*AlibabaCredentials) AddFlags

func (c *AlibabaCredentials) AddFlags(fs *flag.FlagSet)

func (*AlibabaCredentials) Parse

func (c *AlibabaCredentials) Parse() (err error)

type AzureCredentials

type AzureCredentials struct {
	CommonCredentials

	TenantID       string
	ClientID       string
	ClientSecret   string
	SubscriptionID string
}

func (*AzureCredentials) AddFlags

func (c *AzureCredentials) AddFlags(fs *flag.FlagSet)

func (*AzureCredentials) Parse

func (c *AzureCredentials) Parse() (err error)

type BYOCredentials

type BYOCredentials struct {
	CommonCredentials
}

func (*BYOCredentials) AddFlags

func (c *BYOCredentials) AddFlags(fs *flag.FlagSet)

func (*BYOCredentials) Parse

func (c *BYOCredentials) Parse() error

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

func (j *ClusterJig) WithFeatures(features map[string]bool) *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) 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 CommonCredentials

type CommonCredentials struct {
	KKPDatacenter string
}

type DigitaloceanCredentials

type DigitaloceanCredentials struct {
	CommonCredentials

	Token string
}

func (*DigitaloceanCredentials) AddFlags

func (c *DigitaloceanCredentials) AddFlags(fs *flag.FlagSet)

func (*DigitaloceanCredentials) Parse

func (c *DigitaloceanCredentials) Parse() (err error)

type EquinixMetalCredentials

type EquinixMetalCredentials struct {
	CommonCredentials

	APIKey    string
	ProjectID string
}

func (*EquinixMetalCredentials) AddFlags

func (c *EquinixMetalCredentials) AddFlags(fs *flag.FlagSet)

func (*EquinixMetalCredentials) Parse

func (c *EquinixMetalCredentials) Parse() (err error)

type ErrorPrinter

type ErrorPrinter interface {
	Errorf(format string, args ...interface{})
}

type GCPCredentials

type GCPCredentials struct {
	CommonCredentials

	ServiceAccount string
}

func (*GCPCredentials) AddFlags

func (c *GCPCredentials) AddFlags(fs *flag.FlagSet)

func (*GCPCredentials) Parse

func (c *GCPCredentials) Parse() (err error)

type HetznerCredentials

type HetznerCredentials struct {
	CommonCredentials

	Token string
}

func (*HetznerCredentials) AddFlags

func (c *HetznerCredentials) AddFlags(fs *flag.FlagSet)

func (*HetznerCredentials) Parse

func (c *HetznerCredentials) Parse() (err error)

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) AddSSHKey

func (j *MachineJig) AddSSHKey(key *kubermaticv1.UserSSHKey) *MachineJig

func (*MachineJig) AddSSHPublicKey

func (j *MachineJig) AddSSHPublicKey(pubKeys ...string) *MachineJig

func (*MachineJig) Clone

func (j *MachineJig) Clone() *MachineJig

func (*MachineJig) Create

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

func (*MachineJig) Delete

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

func (*MachineJig) SkipEvictionForAllNodes

func (j *MachineJig) SkipEvictionForAllNodes(ctx context.Context, clusterClient ctrlruntimeclient.Client) error

func (*MachineJig) WaitForReadyNodes

func (j *MachineJig) WaitForReadyNodes(ctx context.Context, clusterClient ctrlruntimeclient.Client) error

func (*MachineJig) WaitForReadyPods

func (j *MachineJig) WaitForReadyPods(ctx context.Context, clusterClient ctrlruntimeclient.Client) error

func (*MachineJig) WithCentOS

func (j *MachineJig) WithCentOS() *MachineJig

func (*MachineJig) WithCloudProviderSpec

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

func (*MachineJig) WithCloudProviderSpecPatch

func (j *MachineJig) WithCloudProviderSpecPatch(patcher func(cloudProviderSpec interface{}) interface{}) *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) WithName

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

func (*MachineJig) WithNetworkConfig

func (j *MachineJig) WithNetworkConfig(cfg *providerconfig.NetworkConfig) *MachineJig

func (*MachineJig) WithOSSpec

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

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 OpenStackCredentials

type OpenStackCredentials struct {
	CommonCredentials

	Username       string
	Password       string
	Tenant         string
	Domain         string
	FloatingIPPool string
	Network        string
}

func (*OpenStackCredentials) AddFlags

func (c *OpenStackCredentials) AddFlags(fs *flag.FlagSet)

func (*OpenStackCredentials) Parse

func (c *OpenStackCredentials) Parse() (err error)

type TestJig

type TestJig struct {
	ClusterJig *ClusterJig
	MachineJig *MachineJig
}

func NewAWSCluster

func NewAWSCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, credentials AWSCredentials, replicas int, spotMaxPriceUSD *string) *TestJig

func NewAlibabaCluster

func NewAlibabaCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, credentials AlibabaCredentials, replicas int) *TestJig

func NewAzureCluster

func NewAzureCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, credentials AzureCredentials, replicas int) *TestJig

func NewBYOCluster

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

func NewDigitaloceanCluster

func NewDigitaloceanCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, credentials DigitaloceanCredentials, replicas int) *TestJig

func NewEquinixMetalCluster

func NewEquinixMetalCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, credentials EquinixMetalCredentials, replicas int) *TestJig

func NewGCPCluster

func NewGCPCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, credentials GCPCredentials, replicas int) *TestJig

func NewHetznerCluster

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

func NewOpenStackCluster

func NewOpenStackCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, credentials OpenStackCredentials, replicas int) *TestJig

func NewVSphereCluster

func NewVSphereCluster(client ctrlruntimeclient.Client, log *zap.SugaredLogger, credentials VSphereCredentials, replicas int) *TestJig

func (*TestJig) Cleanup

func (j *TestJig) Cleanup(ctx context.Context, t ErrorPrinter, 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 (j *TestJig) Setup(ctx context.Context, waitMode MachineWaitMode) (*kubermaticv1.Cluster, error)

func (*TestJig) WaitForHealthyControlPlane

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

type VSphereCredentials

type VSphereCredentials struct {
	CommonCredentials

	Username string
	Password string
}

func (*VSphereCredentials) AddFlags

func (c *VSphereCredentials) AddFlags(fs *flag.FlagSet)

func (*VSphereCredentials) Parse

func (c *VSphereCredentials) Parse() (err error)

Jump to

Keyboard shortcuts

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