dsl

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSkrNamespace = "test"
	DefaultKcpNamespace = "kcp-system"
)
View Source
const (
	DefaultNfsInstanceHost             = "nfs.instance.local"
	DefaultGcpNfsInstanceFileShareName = "vol1"
	DefaultGcpNfsInstanceCapacityGb    = 1024
	DefaultGcpNfsInstanceConnectMode   = "PRIVATE_SERVICE_ACCESS"
	DefaultGcpNfsInstanceTier          = "BASIC_HDD"
)
View Source
const (
	DefaultGardenNamespace = "garden-kyma" // must be same as infra.Garden().Namespace()
)
View Source
const (
	DefaultIpRangeCidr = "10.181.0.0/16"
)
View Source
const (
	DefaultModuleName = "cloud-manager"
)

Variables

This section is empty.

Functions

func CreateAwsIpRangeWithSubnets added in v0.1.4

func CreateAwsIpRangeWithSubnets(ctx context.Context, infra testinfra.Infra, iprange *cloudcontrolv1beta1.IpRange,
	vpcId string, name string, iprangeCidr string,
) error

func CreateAwsNfsVolume

func CreateAwsNfsVolume(ctx context.Context, clnt client.Client, obj *cloudresourcesv1beta1.AwsNfsVolume, opts ...ObjAction) error

func CreateGcpNfsVolume

func CreateGcpNfsVolume(ctx context.Context, clnt client.Client, obj *cloudresourcesv1beta1.GcpNfsVolume, opts ...ObjAction) error

func CreateKcpIpRange

func CreateKcpIpRange(ctx context.Context, clnt client.Client, obj *cloudcontrolv1beta1.IpRange, opts ...ObjAction) error

func CreateKcpVpcPeering added in v0.1.4

func CreateKcpVpcPeering(ctx context.Context, clnt client.Client, obj *cloudcontrolv1beta1.VpcPeering, opts ...ObjAction) error

func CreateKymaCR

func CreateKymaCR(ctx context.Context, infra testinfra.Infra, kymaCR *unstructured.Unstructured, opts ...ObjAction) error

func CreateNamespace

func CreateNamespace(ctx context.Context, clnt client.Client, obj *corev1.Namespace, opts ...ObjAction) error

func CreateNfsInstance

func CreateNfsInstance(ctx context.Context, clnt client.Client, obj *cloudcontrolv1beta1.NfsInstance, opts ...ObjAction) error

func CreateObj added in v0.1.4

func CreateObj(ctx context.Context, clnt client.Client, obj client.Object, opts ...ObjAction) error

func CreateScopeAws

func CreateScopeAws(ctx context.Context, infra testinfra.Infra, scope *cloudcontrolv1beta1.Scope, opts ...ObjAction) error

func CreateShootAws

func CreateShootAws(ctx context.Context, infra testinfra.Infra, shoot *gardenerTypes.Shoot, opts ...ObjAction) error

func CreateShootGcp added in v0.1.4

func CreateShootGcp(ctx context.Context, infra testinfra.Infra, shoot *gardenerTypes.Shoot, opts ...ObjAction) error

func CreateSkrIpRange

func CreateSkrIpRange(ctx context.Context, clnt client.Client, obj *cloudresourcesv1beta1.IpRange, opts ...ObjAction) error

func Delete

func Delete(ctx context.Context, client client.Client, obj client.Object) error

func DeleteAllOfSKR added in v0.1.4

func DeleteAllOfSKR(infra testinfra.Infra) error

func DeleteNfsInstance

func DeleteNfsInstance(ctx context.Context, clnt client.Client, obj *cloudcontrolv1beta1.NfsInstance, opts ...ObjAction) error

func IsDeleted

func IsDeleted(ctx context.Context, clnt client.Client, obj client.Object, opts ...ObjAction) error

func KcpReadyCondition

func KcpReadyCondition() metav1.Condition

func KymaCRModuleStateUpdate

func KymaCRModuleStateUpdate(ctx context.Context, kcpClient client.Client, kymaCR *unstructured.Unstructured, opts ...ObjAction) error

func LoadAndCheck

func LoadAndCheck(ctx context.Context, clnt client.Client, obj client.Object, loadingOps ObjActions, asserts ...ObjAssertion) error

func SkipDescribe added in v0.1.4

func SkipDescribe(text string, _ ...interface{}) bool

func SkrReadyCondition

func SkrReadyCondition() metav1.Condition

func Update

func Update(ctx context.Context, client client.Client, obj client.Object, opts ...ObjAction) error

func UpdateNfsInstance

func UpdateNfsInstance(ctx context.Context, clnt client.Client, obj *cloudcontrolv1beta1.NfsInstance, opts ...ObjAction) error

func UpdateObj

func UpdateObj(ctx context.Context, clnt client.Client, obj client.Object, opts ...ObjAction) error

func UpdateStatus

func UpdateStatus(ctx context.Context, clnt client.Client, obj client.Object, opts ...ObjAction) error

Types

type ObjAction

type ObjAction interface {
	Apply(obj client.Object)
}

func AddFinalizer added in v0.1.4

func AddFinalizer(finalizer string) ObjAction

func RemoveFinalizer

func RemoveFinalizer(name string) ObjAction

func WithAwsNfsVolumeCapacity

func WithAwsNfsVolumeCapacity(capacity string) ObjAction

func WithAwsNfsVolumePvAnnotations added in v0.1.4

func WithAwsNfsVolumePvAnnotations(annotations map[string]string) ObjAction

func WithAwsNfsVolumePvLabels added in v0.1.4

func WithAwsNfsVolumePvLabels(labels map[string]string) ObjAction

func WithAwsNfsVolumePvName added in v0.1.4

func WithAwsNfsVolumePvName(name string) ObjAction

func WithGcpNfsValues

func WithGcpNfsValues() ObjAction

func WithGcpNfsVolumeCapacity

func WithGcpNfsVolumeCapacity(capacityGb int) ObjAction

func WithGcpNfsVolumeIpRange

func WithGcpNfsVolumeIpRange(ipRangeName string) ObjAction

func WithKcpIpRangeRemoteRef

func WithKcpIpRangeRemoteRef(ns, name string) ObjAction

func WithKcpIpRangeSpecCidr

func WithKcpIpRangeSpecCidr(cidr string) ObjAction

func WithKcpIpRangeSpecScope

func WithKcpIpRangeSpecScope(scopeName string) ObjAction

func WithKcpVpcPeeringRemoteRef added in v0.1.4

func WithKcpVpcPeeringRemoteRef(ns, name string) ObjAction

func WithKcpVpcPeeringSpecAws added in v0.1.4

func WithKcpVpcPeeringSpecAws(remoteVpcId, remoteAccountId, remoteRegion string) ObjAction

func WithKcpVpcPeeringSpecScope added in v0.1.4

func WithKcpVpcPeeringSpecScope(scopeName string) ObjAction

func WithKymaModuleListedInSpec

func WithKymaModuleListedInSpec() ObjAction

func WithKymaModuleRemovedInSpec

func WithKymaModuleRemovedInSpec() ObjAction

func WithKymaSpecChannel added in v0.1.4

func WithKymaSpecChannel(channel string) ObjAction

func WithLabels

func WithLabels(labels map[string]string) ObjAction

func WithName

func WithName(name string) ObjAction

func WithNamespace

func WithNamespace(ns string) ObjAction

func WithNfsInstanceAws

func WithNfsInstanceAws() ObjAction

func WithNfsInstanceGcp

func WithNfsInstanceGcp(location string) ObjAction

func WithNfsInstanceIpRange

func WithNfsInstanceIpRange(ipRangeName string) ObjAction

func WithNfsInstanceScope

func WithNfsInstanceScope(scopeName string) ObjAction

func WithNfsVolumeIpRange

func WithNfsVolumeIpRange(ipRangeName string) ObjAction

func WithRemoteRef

func WithRemoteRef(name string) ObjAction

func WithSkrIpRangeSpecCidr

func WithSkrIpRangeSpecCidr(cidr string) ObjAction

type ObjActionFunc

type ObjActionFunc func(obj client.Object)

type ObjActions

type ObjActions []ObjAction

func NewObjActions

func NewObjActions(opts ...ObjAction) ObjActions

func (ObjActions) Append

func (arr ObjActions) Append(actionsToAdd ...ObjAction) ObjActions

func (ObjActions) ApplyOnObject

func (arr ObjActions) ApplyOnObject(obj client.Object) ObjActions

func (ObjActions) ApplyOnStatus

func (arr ObjActions) ApplyOnStatus(obj client.Object) ObjActions

type ObjAssertion

type ObjAssertion func(obj client.Object) error

func AssertGcpNfsVolumeHasId

func AssertGcpNfsVolumeHasId() ObjAssertion

func AssertKcpIpRangeCidr

func AssertKcpIpRangeCidr(expectedCidr string) ObjAssertion

func AssertKcpIpRangeRemoteRef

func AssertKcpIpRangeRemoteRef(expectedNamespace, expectedName string) ObjAssertion

func AssertKcpIpRangeScope

func AssertKcpIpRangeScope(expectedScopeName string) ObjAssertion

func AssertKcpStatusHosts

func AssertKcpStatusHosts(host string) ObjAssertion

func AssertSkrIpRangeHasId

func AssertSkrIpRangeHasId() ObjAssertion

func HavingAwsNfsVolumeStatusId added in v0.1.4

func HavingAwsNfsVolumeStatusId() ObjAssertion

func HavingConditionTrue added in v0.1.4

func HavingConditionTrue(conditionType string) ObjAssertion

func HavingDeletionTimestamp added in v0.1.4

func HavingDeletionTimestamp() ObjAssertion

func HavingNfsInstanceStatusId added in v0.1.4

func HavingNfsInstanceStatusId() ObjAssertion

type ObjAssertions

type ObjAssertions []ObjAssertion

func NewObjAssertions

func NewObjAssertions(items []ObjAssertion) ObjAssertions

func (ObjAssertions) AssertObj

func (x ObjAssertions) AssertObj(obj client.Object) error

type ObjStatusAction

type ObjStatusAction interface {
	ObjAction
	ApplyOnStatus(obj client.Object)
}

func WithConditions

func WithConditions(setConds ...metav1.Condition) ObjStatusAction

func WithKcpIpRangeStatusCidr

func WithKcpIpRangeStatusCidr(cidr string) ObjStatusAction

func WithKcpNfsStatusCapacity

func WithKcpNfsStatusCapacity(capacity int) ObjStatusAction

func WithKcpNfsStatusHost

func WithKcpNfsStatusHost(host string) ObjStatusAction

func WithKymaStatusModuleState added in v0.1.4

func WithKymaStatusModuleState(state util.KymaModuleState) ObjStatusAction

func WithNfsInstanceStatusHost

func WithNfsInstanceStatusHost(host string) ObjStatusAction

func WithPvStatusPhase

func WithPvStatusPhase(phase v1.PersistentVolumePhase) ObjStatusAction

func WithSkrIpRangeStatusCidr

func WithSkrIpRangeStatusCidr(cidr string) ObjStatusAction

func WithSkrIpRangeStatusId

func WithSkrIpRangeStatusId(id string) ObjStatusAction

func WithoutConditions

func WithoutConditions(removeConds ...string) ObjStatusAction

Jump to

Keyboard shortcuts

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