utils

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateClusterRoleManifest

func GenerateClusterRoleManifest(t *testing.T, ctx *framework.TestCtx, namespace, id, deployDir string, options GenerateClusterRoleManifestOptions) error

GenerateClusterRoleManifest creates a temporary manifest yaml by combining all standard namespaced resource manifests in deployDir.

func NewFakeAppDeployment

func NewFakeAppDeployment(ns, name string, options *NewFakeAppDeploymentOptions) *appsv1.Deployment

NewFakeAppDeployment return new fake application deployment

func NewFakeHPA

func NewFakeHPA(ns, name string, options *NewFakeHPAOptions) *autoscalingv1.HorizontalPodAutoscaler

NewFakeHPA return new fake application deployment

func WaitForFuncOnFakeAppScaling

func WaitForFuncOnFakeAppScaling(t *testing.T, client framework.FrameworkClient, namespace, name, fakeAppName string, f func(dd *datadoghqv1alpha1.WatermarkPodAutoscaler, fakeApp *v1.Deployment) (bool, error), retryInterval, timeout time.Duration) error

WaitForFuncOnFakeAppScaling used to wait for autoscaling the fake up with the desired replicas

func WaitForFuncOnWatermarkPodAutoscaler

func WaitForFuncOnWatermarkPodAutoscaler(t *testing.T, client framework.FrameworkClient, namespace, name string, f func(dd *datadoghqv1alpha1.WatermarkPodAutoscaler) (bool, error), retryInterval, timeout time.Duration) error

WaitForFuncOnWatermarkPodAutoscaler used to wait a valid condition on a WatermarkPodAutoscaler

Types

type GenerateClusterRoleManifestOptions

type GenerateClusterRoleManifestOptions struct {
	CleanupTimeout       time.Duration
	CleanupRetryInterval time.Duration
}

GenerateClusterRoleManifestOptions use to provide options the GenerateClusterRoleManifest method

type NewFakeAppDeploymentOptions

type NewFakeAppDeploymentOptions struct {
	Image       string
	Replicas    int32
	Labels      map[string]string
	Annotations map[string]string
}

NewFakeAppDeploymentOptions options struct for NewFakeAppDeployment function

type NewFakeHPAOptions

type NewFakeHPAOptions struct {
	Labels         map[string]string
	Annotations    map[string]string
	DeploymentName string
	MinReplicas    *int32
	MaxReplicas    *int32
}

NewFakeHPAOptions options struct for NewFakeHPA function

Jump to

Keyboard shortcuts

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