utils

package
v0.11.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AstarteTestResource *operator.Astarte = &operator.Astarte{
	ObjectMeta: metav1.ObjectMeta{
		Name: "example-astarte",
	},
	Spec: operator.AstarteSpec{
		Version: "0.11.0-beta.2",

		DeploymentStrategy: appsv1.DeploymentStrategy{
			Type: appsv1.RecreateDeploymentStrategyType,
		},
		API: operator.AstarteAPISpec{
			Host: "api.autotest.astarte-platform.org",
		},
		VerneMQ: operator.AstarteVerneMQSpec{
			Host: "broker.autotest.astarte-platform.org",
			GenericClusteredResource: operator.AstarteGenericClusteredResource{
				Resources: v1.ResourceRequirements{
					Limits: v1.ResourceList{
						v1.ResourceCPU:    *resource.NewScaledQuantity(0, resource.Milli),
						v1.ResourceMemory: *resource.NewScaledQuantity(512, resource.Mega),
					},
					Requests: v1.ResourceList{
						v1.ResourceCPU:    *resource.NewScaledQuantity(0, resource.Milli),
						v1.ResourceMemory: *resource.NewScaledQuantity(256, resource.Mega),
					},
				},
			},
		},
		RabbitMQ: operator.AstarteRabbitMQSpec{
			GenericClusteredResource: operator.AstarteGenericClusteredResource{
				Resources: v1.ResourceRequirements{
					Limits: v1.ResourceList{
						v1.ResourceCPU:    *resource.NewScaledQuantity(1000, resource.Milli),
						v1.ResourceMemory: *resource.NewScaledQuantity(512, resource.Mega),
					},
					Requests: v1.ResourceList{
						v1.ResourceCPU:    *resource.NewScaledQuantity(200, resource.Milli),
						v1.ResourceMemory: *resource.NewScaledQuantity(256, resource.Mega),
					},
				},
			},
		},
		Cassandra: operator.AstarteCassandraSpec{
			MaxHeapSize: "512M",
			HeapNewSize: "256M",
			Storage: &operator.AstartePersistentStorageSpec{
				Size: resource.NewScaledQuantity(10, resource.Giga),
			},
			GenericClusteredResource: operator.AstarteGenericClusteredResource{
				Resources: v1.ResourceRequirements{
					Limits: v1.ResourceList{
						v1.ResourceCPU:    *resource.NewScaledQuantity(1000, resource.Milli),
						v1.ResourceMemory: *resource.NewScaledQuantity(2048, resource.Mega),
					},
					Requests: v1.ResourceList{
						v1.ResourceCPU:    *resource.NewScaledQuantity(500, resource.Milli),
						v1.ResourceMemory: *resource.NewScaledQuantity(1024, resource.Mega),
					},
				},
			},
		},
		CFSSL: operator.AstarteCFSSLSpec{
			Resources: v1.ResourceRequirements{
				Limits: v1.ResourceList{
					v1.ResourceCPU:    *resource.NewScaledQuantity(0, resource.Milli),
					v1.ResourceMemory: *resource.NewScaledQuantity(128, resource.Mega),
				},
				Requests: v1.ResourceList{
					v1.ResourceCPU:    *resource.NewScaledQuantity(0, resource.Milli),
					v1.ResourceMemory: *resource.NewScaledQuantity(128, resource.Mega),
				},
			},
			Storage: &operator.AstartePersistentStorageSpec{
				Size: resource.NewScaledQuantity(2, resource.Giga),
			},
		},
		Components: operator.AstarteComponentsSpec{
			Resources: v1.ResourceRequirements{
				Limits: v1.ResourceList{
					v1.ResourceCPU:    *resource.NewScaledQuantity(0, resource.Milli),
					v1.ResourceMemory: *resource.NewScaledQuantity(2, resource.Giga),
				},
				Requests: v1.ResourceList{
					v1.ResourceCPU:    *resource.NewScaledQuantity(0, resource.Milli),
					v1.ResourceMemory: *resource.NewScaledQuantity(3, resource.Giga),
				},
			},
		},
	},
}

AstarteTestResource is a base common ground for all tests to have a known Astarte resource

Functions

func EnsureDeploymentReadiness

func EnsureDeploymentReadiness(namespace, name string, f *framework.Framework) error

EnsureDeploymentReadiness ensures a Deployment is ready by the time the function is called

func EnsureStatefulSetReadiness

func EnsureStatefulSetReadiness(namespace, name string, f *framework.Framework) error

EnsureStatefulSetReadiness ensures a StatefulSet is ready by the time the function is called

func WaitForDeploymentReadiness

func WaitForDeploymentReadiness(namespace, name string, f *framework.Framework) error

WaitForDeploymentReadiness waits until a Deployment is ready with a reasonable timeout

func WaitForStatefulSetReadiness

func WaitForStatefulSetReadiness(namespace, name string, f *framework.Framework) error

WaitForStatefulSetReadiness waits until a StatefulSet is ready with a reasonable timeout

Types

This section is empty.

Jump to

Keyboard shortcuts

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