test

package
v2.21.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareOutput

func CompareOutput(t *testing.T, name, output string, update bool, suffix string)

func LatestKubernetesVersion added in v2.21.0

func LatestKubernetesVersion(cfg *kubermaticv1.KubermaticConfiguration) *semver.Semver

LatestKubernetesVersion returns the most recent supported patch release. Passing nil for the KubermaticConfiguration is fine and in this case the compiled-in defaults will be used.

func LatestKubernetesVersionForRelease added in v2.21.0

func LatestKubernetesVersionForRelease(release string, cfg *kubermaticv1.KubermaticConfiguration) *semver.Semver

LatestKubernetesVersionForRelease returns the most recent supported patch release for a given release branch (i.e. release="1.24" might return "1.24.7"). Passing nil for the KubermaticConfiguration is fine and in this case the compiled-in defaults will be used.

func LatestStableKubernetesVersion added in v2.21.0

func LatestStableKubernetesVersion(cfg *kubermaticv1.KubermaticConfiguration) *semver.Semver

LatestStableKubernetesVersion returns the most recent patch release of the "stable" releases, which are latest-1 (i.e. if KKP is configured to support up to 1.29.7, then the stable releases would be all in the 1.28.x line). Passing nil for the KubermaticConfiguration is fine and in this case the compiled-in defaults will be used.

func NewSeedGetter added in v2.19.0

func NewSeedGetter(seed *kubermaticv1.Seed) provider.SeedGetter

func NewSeedsGetter added in v2.19.0

func NewSeedsGetter(seeds ...*kubermaticv1.Seed) provider.SeedsGetter

func ObjectYAMLDiff added in v2.20.0

func ObjectYAMLDiff(t *testing.T, expectedObj, actualObj interface{}) error

func SafeBase64Decoding added in v2.19.9

func SafeBase64Decoding(value string) string

SafeBase64Decoding takes a value and decodes it with base64, but only if the given value can be decoded without errors. This primarily exists because in older KKP releases, we sometimes had pre-base64-encoded secrets in Vault, but during 2022 migrated to keeping plaintext in Vault.

func SafeBase64Encoding added in v2.19.9

func SafeBase64Encoding(value string) string

SafeBase64Encoding takes a value and encodes it with base64, but only if the given value was not already base64-encoded.

Types

type EndpointsBuilder added in v2.16.3

type EndpointsBuilder struct {
	ObjectBuilder
	// contains filtered or unexported fields
}

EndpointsBuilder is a builder providing a fluent API for v1.Endpoints creation.

func NewEndpointsBuilder added in v2.16.3

func NewEndpointsBuilder(nn NamespacedName) *EndpointsBuilder

NewServiceBuilder returns a ServiceBuilder to be used to build a v1.Endpoints with name and namespace given in input.

func (*EndpointsBuilder) Build added in v2.16.3

func (b *EndpointsBuilder) Build() *corev1.Endpoints

func (*EndpointsBuilder) WithEndpointsSubset added in v2.16.3

func (b *EndpointsBuilder) WithEndpointsSubset() *epsSubsetBuilder

WithEndpointsSubset starts the creation of an Endpoints Subset, the creation must me terminated with a call to DoneWithEndpointSubset, after ports and addresses are added.

func (*EndpointsBuilder) WithResourceVersion added in v2.16.3

func (b *EndpointsBuilder) WithResourceVersion(rs string) *EndpointsBuilder

type NamespacedName added in v2.16.3

type NamespacedName types.NamespacedName

type ObjectBuilder added in v2.16.3

type ObjectBuilder metav1.ObjectMeta

func (*ObjectBuilder) WithAnnotation added in v2.16.3

func (b *ObjectBuilder) WithAnnotation(key, value string) *ObjectBuilder

func (*ObjectBuilder) WithCreationTimestamp added in v2.16.3

func (b *ObjectBuilder) WithCreationTimestamp(time time.Time) *ObjectBuilder

func (*ObjectBuilder) WithLabel added in v2.16.3

func (b *ObjectBuilder) WithLabel(key, value string) *ObjectBuilder

func (*ObjectBuilder) WithResourceVersion added in v2.16.3

func (b *ObjectBuilder) WithResourceVersion(rv string) *ObjectBuilder

type ServiceBuilder added in v2.16.3

type ServiceBuilder struct {
	ObjectBuilder
	// contains filtered or unexported fields
}

ServiceBuilder is a builder providing a fluent API for v1.Service creation.

func NewServiceBuilder added in v2.16.3

func NewServiceBuilder(nn NamespacedName) *ServiceBuilder

NewServiceBuilder returns a ServiceBuilder to be used to build a v1.Service with name and namespace given in input.

func (ServiceBuilder) Build added in v2.16.3

func (b ServiceBuilder) Build() *corev1.Service

func (*ServiceBuilder) WithAnnotation added in v2.16.3

func (b *ServiceBuilder) WithAnnotation(key, value string) *ServiceBuilder

func (*ServiceBuilder) WithCreationTimestamp added in v2.16.3

func (b *ServiceBuilder) WithCreationTimestamp(time time.Time) *ServiceBuilder

func (*ServiceBuilder) WithLabel added in v2.16.3

func (b *ServiceBuilder) WithLabel(key, value string) *ServiceBuilder

func (*ServiceBuilder) WithSelector added in v2.16.3

func (b *ServiceBuilder) WithSelector(selector map[string]string) *ServiceBuilder

func (*ServiceBuilder) WithServicePort added in v2.16.3

func (b *ServiceBuilder) WithServicePort(
	name string,
	port int32,
	nodePort int32,
	targetPort intstr.IntOrString,
	protocol corev1.Protocol) *ServiceBuilder

func (*ServiceBuilder) WithServicePorts added in v2.16.3

func (b *ServiceBuilder) WithServicePorts(sp ...corev1.ServicePort) *ServiceBuilder

func (*ServiceBuilder) WithServiceType added in v2.16.3

func (b *ServiceBuilder) WithServiceType(serviceType corev1.ServiceType) *ServiceBuilder

Directories

Path Synopsis
clusterexposer
cmd
e2e
api
jig

Jump to

Keyboard shortcuts

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