util

package
v0.0.0-...-c0007b8 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestNamespaceName           = "test-namespace"
	OperatorNamespace           = "dash0-system"
	OTelCollectorNamePrefixTest = "unit-test"

	CronJobNamePrefix     = "cronjob"
	DaemonSetNamePrefix   = "daemonset"
	DeploymentNamePrefix  = "deployment"
	JobNamePrefix         = "job"
	PodNamePrefix         = "pod"
	ReplicaSetNamePrefix  = "replicaset"
	StatefulSetNamePrefix = "statefulset"

	OperatorImageTest              = "some-registry.com:1234/dash0hq/operator-controller:1.2.3"
	InitContainerImageTest         = "some-registry.com:1234/dash0hq/instrumentation:4.5.6"
	CollectorImageTest             = "some-registry.com:1234/dash0hq/collector:7.8.9"
	ConfigurationReloaderImageTest = "some-registry.com:1234/dash0hq/configuration-reloader:10.11.12"
	FilelogOffsetSynchImageTest    = "some-registry.com:1234/dash0hq/filelog-offset-synch:13.14.15"

	OTelCollectorBaseUrlTest      = "http://$(DASH0_NODE_IP):40318"
	EndpointDash0Test             = "endpoint.dash0.com:4317"
	EndpointDash0TestQuoted       = "\"endpoint.dash0.com:4317\""
	EndpointDash0WithProtocolTest = "https://endpoint.dash0.com:4317"
	EndpointGrpcTest              = "endpoint.backend.com:4317"
	EndpointHttpTest              = "https://endpoint.backend.com:4318"

	ApiEndpointTest = "https://api.dash0.com"
	DatasetTest     = "test-dataset"
)
View Source
const (
	OperatorDeploymentName            = "controller-deployment"
	OperatorConfigurationResourceName = "dash0-operator-configuration-test"
)
View Source
const (
	MonitoringResourceName = "das0-monitoring-test-resource"
)
View Source
const (
	NamePrefix = "unit-test"
)

Variables

View Source
var (
	ExpectedDaemonSetServiceAccountName              = fmt.Sprintf("%s-opentelemetry-collector-sa", NamePrefix)
	ExpectedDaemonSetCollectorConfigMapName          = fmt.Sprintf("%s-opentelemetry-collector-agent-cm", NamePrefix)
	ExpectedDaemonSetFilelogOffsetSynchConfigMapName = fmt.Sprintf("%s-filelogoffsets-cm", NamePrefix)
	ExpectedDaemonSetClusterRoleName                 = fmt.Sprintf("%s-opentelemetry-collector-cr", NamePrefix)
	ExpectedDaemonSetClusterRoleBinding              = fmt.Sprintf("%s-opentelemetry-collector-crb", NamePrefix)
	ExpectedDaemonSetRoleName                        = fmt.Sprintf("%s-opentelemetry-collector-role", NamePrefix)
	ExpectedDaemonSetRoleBindingName                 = fmt.Sprintf("%s-opentelemetry-collector-rolebinding", NamePrefix)
	ExpectedDaemonSetServiceName                     = fmt.Sprintf("%s-opentelemetry-collector-service", NamePrefix)
	ExpectedDaemonSetName                            = fmt.Sprintf(
		"%s-opentelemetry-collector-agent-daemonset",
		NamePrefix,
	)
	ExpectedDeploymentServiceAccountName     = fmt.Sprintf("%s-cluster-metrics-collector-sa", NamePrefix)
	ExpectedDeploymentClusterRoleName        = fmt.Sprintf("%s-cluster-metrics-collector-cr", NamePrefix)
	ExpectedDeploymentClusterRoleBindingName = fmt.Sprintf("%s-cluster-metrics-collector-crb", NamePrefix)
	ExpectedDeploymentCollectorConfigMapName = fmt.Sprintf("%s-cluster-metrics-collector-cm", NamePrefix)
	ExpectedDeploymentName                   = fmt.Sprintf("%s-cluster-metrics-collector-deployment", NamePrefix)

	AllClusterMetricsRelatedResources = []expectedResource{
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		expectedResourceDeploymentConfigMap,
		expectedResourceDeployment,
	}
	AllDaemonSetRelatedResources = []expectedResource{
		{/* contains filtered or unexported fields */},
		expectedResourceDaemonSetConfigMap,
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		expectedResourceDaemonSet,
	}
	AllDeploymentRelatedResources = []expectedResource{
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		expectedResourceDeploymentConfigMap,
		expectedResourceDeployment,
	}
	AllExpectedResources = append(
		AllDaemonSetRelatedResources,
		AllDeploymentRelatedResources...,
	)
)
View Source
var (
	AuthorizationTokenTest = "authorization-token"
	SecretRefTest          = dash0v1alpha1.SecretRef{
		Name: "secret-ref",
		Key:  "key",
	}

	ArbitraryNumer int64 = 1302

	TestImages = util.Images{
		OperatorImage:                        OperatorImageTest,
		InitContainerImage:                   InitContainerImageTest,
		InitContainerImagePullPolicy:         corev1.PullAlways,
		CollectorImage:                       CollectorImageTest,
		CollectorImagePullPolicy:             corev1.PullAlways,
		ConfigurationReloaderImage:           ConfigurationReloaderImageTest,
		ConfigurationReloaderImagePullPolicy: corev1.PullAlways,
		FilelogOffsetSynchImage:              FilelogOffsetSynchImageTest,
		FilelogOffsetSynchImagePullPolicy:    corev1.PullAlways,
	}

	DeploymentSelfReference = &appsv1.Deployment{
		ObjectMeta: metav1.ObjectMeta{
			Namespace: OperatorNamespace,
			Name:      "unit-test-dash0-operator-controller",
			UID:       "2f009c75-d69f-4b02-9d9d-fa17e76f5c1d",
		},
	}

	DanglingEventsTimeoutsTest = util.DanglingEventsTimeouts{
		InitialTimeout: 0 * time.Second,
		Backoff: wait.Backoff{
			Steps:    1,
			Duration: 0 * time.Second,
			Factor:   1,
			Jitter:   0,
		},
	}
)
View Source
var (
	MonitoringResourceQualifiedName = types.NamespacedName{
		Namespace: TestNamespaceName,
		Name:      MonitoringResourceName,
	}

	MonitoringResourceDefaultObjectMeta = metav1.ObjectMeta{
		Name:      MonitoringResourceName,
		Namespace: TestNamespaceName,
	}
	MonitoringResourceDefaultSpec = dash0v1alpha1.Dash0MonitoringSpec{
		Export: &dash0v1alpha1.Export{
			Dash0: &dash0v1alpha1.Dash0Configuration{
				Endpoint: EndpointDash0Test,
				Authorization: dash0v1alpha1.Authorization{
					Token: &AuthorizationTokenTest,
				},
			},
		},
	}
)
View Source
var (
	OperatorConfigurationResourceDefaultObjectMeta = metav1.ObjectMeta{
		Name: OperatorConfigurationResourceName,
	}

	OperatorConfigurationResourceWithoutSelfMonitoringWithoutAuth = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(false),
		},
	}

	OperatorConfigurationResourceWithoutExport = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(false),
		},
	}

	OperatorConfigurationResourceDash0ExportWithoutApiEndpointWithToken = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(false),
		},
		Export: &dash0v1alpha1.Export{
			Dash0: &dash0v1alpha1.Dash0Configuration{
				Authorization: dash0v1alpha1.Authorization{
					Token: &AuthorizationTokenTest,
				},
			},
		},
		KubernetesInfrastructureMetricsCollectionEnabled: ptr.To(true),
	}

	OperatorConfigurationResourceDash0ExportWithoutApiEndpointWithSecretRef = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(false),
		},
		Export: &dash0v1alpha1.Export{
			Dash0: &dash0v1alpha1.Dash0Configuration{
				Authorization: dash0v1alpha1.Authorization{
					SecretRef: &SecretRefTest,
				},
			},
		},
		KubernetesInfrastructureMetricsCollectionEnabled: ptr.To(true),
	}

	OperatorConfigurationResourceDash0ExportWithApiEndpointWithToken = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(false),
		},
		Export: &dash0v1alpha1.Export{
			Dash0: &dash0v1alpha1.Dash0Configuration{
				ApiEndpoint: ApiEndpointTest,
				Authorization: dash0v1alpha1.Authorization{
					Token: &AuthorizationTokenTest,
				},
			},
		},
		KubernetesInfrastructureMetricsCollectionEnabled: ptr.To(true),
	}

	OperatorConfigurationResourceDash0ExportWithApiEndpointWithSecretRef = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(false),
		},
		Export: &dash0v1alpha1.Export{
			Dash0: &dash0v1alpha1.Dash0Configuration{
				ApiEndpoint: ApiEndpointTest,
				Authorization: dash0v1alpha1.Authorization{
					SecretRef: &SecretRefTest,
				},
			},
		},
		KubernetesInfrastructureMetricsCollectionEnabled: ptr.To(true),
	}

	OperatorConfigurationResourceWithoutSelfMonitoringWithToken = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(false),
		},
		Export: &dash0v1alpha1.Export{
			Dash0: &dash0v1alpha1.Dash0Configuration{
				ApiEndpoint: ApiEndpointTest,
				Authorization: dash0v1alpha1.Authorization{
					Token: &AuthorizationTokenTest,
				},
			},
		},
		KubernetesInfrastructureMetricsCollectionEnabled: ptr.To(true),
	}

	OperatorConfigurationResourceWithoutSelfMonitoringWithSecretRef = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(false),
		},
		Export: &dash0v1alpha1.Export{
			Dash0: &dash0v1alpha1.Dash0Configuration{
				ApiEndpoint: ApiEndpointTest,
				Authorization: dash0v1alpha1.Authorization{
					SecretRef: &SecretRefTest,
				},
			},
		},
		KubernetesInfrastructureMetricsCollectionEnabled: ptr.To(true),
	}

	OperatorConfigurationResourceWithSelfMonitoringWithToken = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(true),
		},
		Export: &dash0v1alpha1.Export{
			Dash0: &dash0v1alpha1.Dash0Configuration{
				Endpoint: EndpointDash0Test,
				Authorization: dash0v1alpha1.Authorization{
					Token: &AuthorizationTokenTest,
				},
			},
		},
		KubernetesInfrastructureMetricsCollectionEnabled: ptr.To(true),
	}

	OperatorConfigurationResourceWithSelfMonitoringWithSecretRef = dash0v1alpha1.Dash0OperatorConfigurationSpec{
		SelfMonitoring: dash0v1alpha1.SelfMonitoring{
			Enabled: ptr.To(true),
		},
		Export: &dash0v1alpha1.Export{
			Dash0: &dash0v1alpha1.Dash0Configuration{
				Endpoint: EndpointDash0Test,
				Authorization: dash0v1alpha1.Authorization{
					SecretRef: &SecretRefTest,
				},
			},
		},
		KubernetesInfrastructureMetricsCollectionEnabled: ptr.To(true),
	}

	OperatorConfigurationResourceDefaultSpec = OperatorConfigurationResourceWithSelfMonitoringWithToken
)
View Source
var (
	PersesDashboardCrdQualifiedName = types.NamespacedName{
		Name: "persesdashboards.perses.dev",
	}

	PrometheusRuleCrdQualifiedName = types.NamespacedName{
		Name: "prometheusrules.monitoring.coreos.com",
	}
)
View Source
var (
	ExpectManagedFields = VerifyOpts{
		VerifyManagedFields: true,
		ExpectManagedFields: true,
	}
	IgnoreManagedFields = VerifyOpts{
		VerifyManagedFields: false,
	}
	VerifyNoManagedFields = VerifyOpts{
		VerifyManagedFields: true,
		ExpectManagedFields: false,
	}
)

Functions

func AddLabel

func AddLabel(meta *metav1.ObjectMeta, key string, value string)

func AddManagedFields

func AddManagedFields(meta *metav1.ObjectMeta)

func AddOptOutLabel

func AddOptOutLabel(meta *metav1.ObjectMeta)

func BasicCronJob

func BasicCronJob(namespace string, name string) *batchv1.CronJob

func BasicDaemonSet

func BasicDaemonSet(namespace string, name string) *appsv1.DaemonSet

func BasicDeployment

func BasicDeployment(namespace string, name string) *appsv1.Deployment

func BasicJob

func BasicJob(namespace string, name string) *batchv1.Job

func BasicPod

func BasicPod(namespace string, name string) *corev1.Pod

func BasicReplicaSet

func BasicReplicaSet(namespace string, name string) *appsv1.ReplicaSet

func BasicStatefulSet

func BasicStatefulSet(namespace string, name string) *appsv1.StatefulSet

func CreateBasicCronJob

func CreateBasicCronJob(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *batchv1.CronJob

func CreateBasicDaemonSet

func CreateBasicDaemonSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.DaemonSet

func CreateBasicDeployment

func CreateBasicDeployment(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.Deployment

func CreateBasicJob

func CreateBasicJob(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *batchv1.Job

func CreateBasicPod

func CreateBasicPod(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *corev1.Pod

func CreateBasicReplicaSet

func CreateBasicReplicaSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.ReplicaSet

func CreateBasicStatefulSet

func CreateBasicStatefulSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.StatefulSet

func CreateControllerDeploymentWithSelfMonitoringWithSecretRef

func CreateControllerDeploymentWithSelfMonitoringWithSecretRef() *appsv1.Deployment

func CreateControllerDeploymentWithSelfMonitoringWithToken

func CreateControllerDeploymentWithSelfMonitoringWithToken() *appsv1.Deployment

func CreateControllerDeploymentWithoutSelfMonitoringWithSecretRef

func CreateControllerDeploymentWithoutSelfMonitoringWithSecretRef() *appsv1.Deployment

func CreateControllerDeploymentWithoutSelfMonitoringWithToken

func CreateControllerDeploymentWithoutSelfMonitoringWithToken() *appsv1.Deployment

func CreateControllerDeploymentWithoutSelfMonitoringWithoutAuth

func CreateControllerDeploymentWithoutSelfMonitoringWithoutAuth() *appsv1.Deployment

func CreateCronJobWithOptOutLabel

func CreateCronJobWithOptOutLabel(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *batchv1.CronJob

func CreateDaemonSetWithOptOutLabel

func CreateDaemonSetWithOptOutLabel(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.DaemonSet

func CreateDefaultMonitoringResource

func CreateDefaultMonitoringResource(
	ctx context.Context,
	k8sClient client.Client,
	monitoringResourceName types.NamespacedName,
) *dash0v1alpha1.Dash0Monitoring

func CreateDefaultOperatorConfigurationResource

func CreateDefaultOperatorConfigurationResource(
	ctx context.Context,
	k8sClient client.Client,
) *dash0v1alpha1.Dash0OperatorConfiguration

func CreateDeploymentWithOptOutLabel

func CreateDeploymentWithOptOutLabel(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.Deployment

func CreateInstrumentedCronJob

func CreateInstrumentedCronJob(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *batchv1.CronJob

func CreateInstrumentedDaemonSet

func CreateInstrumentedDaemonSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.DaemonSet

func CreateInstrumentedDeployment

func CreateInstrumentedDeployment(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.Deployment

func CreateInstrumentedJob

func CreateInstrumentedJob(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *batchv1.Job

func CreateInstrumentedPod

func CreateInstrumentedPod(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *corev1.Pod

func CreateInstrumentedReplicaSet

func CreateInstrumentedReplicaSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.ReplicaSet

func CreateInstrumentedStatefulSet

func CreateInstrumentedStatefulSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.StatefulSet

func CreateJobForWhichAnInstrumentationAttemptHasFailed

func CreateJobForWhichAnInstrumentationAttemptHasFailed(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *batchv1.Job

func CreateJobWithOptOutLabel

func CreateJobWithOptOutLabel(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *batchv1.Job

func CreateMonitoringResource

func CreateMonitoringResource(
	ctx context.Context,
	k8sClient client.Client,
	monitoringResource *dash0v1alpha1.Dash0Monitoring,
) *dash0v1alpha1.Dash0Monitoring

func CreateMonitoringResourceWithPotentialError

func CreateMonitoringResourceWithPotentialError(
	ctx context.Context,
	k8sClient client.Client,
	monitoringResource *dash0v1alpha1.Dash0Monitoring,
) (*dash0v1alpha1.Dash0Monitoring, error)

func CreateOperatorConfigurationResource

func CreateOperatorConfigurationResource(
	ctx context.Context,
	k8sClient client.Client,
	operatorConfigurationResource *dash0v1alpha1.Dash0OperatorConfiguration,
) (*dash0v1alpha1.Dash0OperatorConfiguration, error)

func CreateOperatorConfigurationResourceWithSpec

func CreateOperatorConfigurationResourceWithSpec(
	ctx context.Context,
	k8sClient client.Client,
	operatorConfigurationSpec dash0v1alpha1.Dash0OperatorConfigurationSpec,
) *dash0v1alpha1.Dash0OperatorConfiguration

func CreatePodOwnedByReplicaSet

func CreatePodOwnedByReplicaSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *corev1.Pod

func CreatePodWithOptOutLabel

func CreatePodWithOptOutLabel(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *corev1.Pod

func CreateReplicaSetOwnedByDeployment

func CreateReplicaSetOwnedByDeployment(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.ReplicaSet

func CreateReplicaSetWithOptOutLabel

func CreateReplicaSetWithOptOutLabel(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.ReplicaSet

func CreateStatefulSetWithOptOutLabel

func CreateStatefulSetWithOptOutLabel(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.StatefulSet

func CreateWorkload

func CreateWorkload(ctx context.Context, k8sClient client.Client, workload client.Object) client.Object

func CronJobWithOptOutLabel

func CronJobWithOptOutLabel(namespace string, name string) *batchv1.CronJob

func DaemonSetWithOptOutLabel

func DaemonSetWithOptOutLabel(namespace string, name string) *appsv1.DaemonSet

func Dash0ExportWithEndpointAndSecretRef

func Dash0ExportWithEndpointAndSecretRef() dash0v1alpha1.Export

func Dash0ExportWithEndpointAndSecretRefAndApiEndpoint

func Dash0ExportWithEndpointAndSecretRefAndApiEndpoint() dash0v1alpha1.Export

func Dash0ExportWithEndpointAndToken

func Dash0ExportWithEndpointAndToken() dash0v1alpha1.Export

func Dash0ExportWithEndpointAndTokenAndApiEndpoint

func Dash0ExportWithEndpointAndTokenAndApiEndpoint() dash0v1alpha1.Export

func Dash0ExportWithEndpointTokenAndInsightsDataset

func Dash0ExportWithEndpointTokenAndInsightsDataset() dash0v1alpha1.Export

func DeleteAllCreatedObjects

func DeleteAllCreatedObjects(
	ctx context.Context,
	k8sClient client.Client,
	createdObjects []client.Object,
) []client.Object

func DeleteAllEvents

func DeleteAllEvents(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	namespace string,
)

func DeleteAllOperatorConfigurationResources

func DeleteAllOperatorConfigurationResources(
	ctx context.Context,
	k8sClient client.Client,
)

func DeleteMonitoringResource

func DeleteMonitoringResource(ctx context.Context, k8sClient client.Client)

func DeleteMonitoringResourceByName

func DeleteMonitoringResourceByName(
	ctx context.Context,
	k8sClient client.Client,
	monitoringResourceName types.NamespacedName,
	failOnErr bool,
)

func DeleteMonitoringResourceIfItExists

func DeleteMonitoringResourceIfItExists(ctx context.Context, k8sClient client.Client)

func DeploymentWithExistingDash0Artifacts

func DeploymentWithExistingDash0Artifacts(namespace string, name string) *appsv1.Deployment

func DeploymentWithMoreBellsAndWhistles

func DeploymentWithMoreBellsAndWhistles(namespace string, name string) *appsv1.Deployment

func DeploymentWithOptOutLabel

func DeploymentWithOptOutLabel(namespace string, name string) *appsv1.Deployment

func EnsureControllerDeploymentDoesNotExist

func EnsureControllerDeploymentDoesNotExist(
	ctx context.Context,
	k8sClient client.Client,
	controllerDeployment *appsv1.Deployment,
)

func EnsureControllerDeploymentExists

func EnsureControllerDeploymentExists(
	ctx context.Context,
	k8sClient client.Client,
	controllerDeployment *appsv1.Deployment,
) *appsv1.Deployment

func EnsureEmptyMonitoringResourceExistsAndIsAvailable

func EnsureEmptyMonitoringResourceExistsAndIsAvailable(
	ctx context.Context,
	k8sClient client.Client,
) *dash0v1alpha1.Dash0Monitoring

func EnsureKubernetesObjectExists

func EnsureKubernetesObjectExists(
	ctx context.Context,
	k8sClient client.Client,
	qualifiedName types.NamespacedName,
	receiver client.Object,
	blueprint client.Object,
) client.Object

func EnsureMonitoringResourceExists

func EnsureMonitoringResourceExists(
	ctx context.Context,
	k8sClient client.Client,
) *dash0v1alpha1.Dash0Monitoring

func EnsureMonitoringResourceExistsAndIsAvailable

func EnsureMonitoringResourceExistsAndIsAvailable(
	ctx context.Context,
	k8sClient client.Client,
) *dash0v1alpha1.Dash0Monitoring

func EnsureMonitoringResourceExistsAndIsAvailableInNamespace

func EnsureMonitoringResourceExistsAndIsAvailableInNamespace(
	ctx context.Context,
	k8sClient client.Client,
	namespacedName types.NamespacedName,
) *dash0v1alpha1.Dash0Monitoring

func EnsureMonitoringResourceExistsAndIsDegraded

func EnsureMonitoringResourceExistsAndIsDegraded(
	ctx context.Context,
	k8sClient client.Client,
) *dash0v1alpha1.Dash0Monitoring

func EnsureMonitoringResourceExistsWithInstrumentWorkloadsMode

func EnsureMonitoringResourceExistsWithInstrumentWorkloadsMode(
	ctx context.Context,
	k8sClient client.Client,
	instrumentWorkloads dash0v1alpha1.InstrumentWorkloadsMode,
) *dash0v1alpha1.Dash0Monitoring

func EnsureMonitoringResourceExistsWithNamespacedName

func EnsureMonitoringResourceExistsWithNamespacedName(
	ctx context.Context,
	k8sClient client.Client,
	namespacesName types.NamespacedName,
	instrumentWorkloads dash0v1alpha1.InstrumentWorkloadsMode,
) *dash0v1alpha1.Dash0Monitoring

func EnsureNamespaceExists

func EnsureNamespaceExists(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
) *corev1.Namespace

func EnsureOperatorNamespaceExists

func EnsureOperatorNamespaceExists(
	ctx context.Context,
	k8sClient client.Client,
) *corev1.Namespace

func EnsurePersesDashboardCrdExists

func EnsurePersesDashboardCrdExists(
	ctx context.Context,
	k8sClient client.Client,
) *apiextensionsv1.CustomResourceDefinition

func EnsurePrometheusRuleCrdExists

func EnsurePrometheusRuleCrdExists(
	ctx context.Context,
	k8sClient client.Client,
) *apiextensionsv1.CustomResourceDefinition

func EnsureTestNamespaceExists

func EnsureTestNamespaceExists(
	ctx context.Context,
	k8sClient client.Client,
) *corev1.Namespace

func ExportToPrt

func ExportToPrt(export dash0v1alpha1.Export) *dash0v1alpha1.Export

func GetCronJob

func GetCronJob(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *batchv1.CronJob

func GetDaemonSet

func GetDaemonSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.DaemonSet

func GetDeployment

func GetDeployment(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.Deployment

func GetDeploymentEventually

func GetDeploymentEventually(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
	namespace string,
	name string,
) *appsv1.Deployment

func GetJob

func GetJob(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *batchv1.Job

func GetOTelColDaemonSet

func GetOTelColDaemonSet(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
) *appsv1.DaemonSet

func GetOTelColDaemonSetConfigMap

func GetOTelColDaemonSetConfigMap(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
) *corev1.ConfigMap

func GetOTelColDeployment

func GetOTelColDeployment(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
) *appsv1.Deployment

func GetOTelColDeploymentConfigMap

func GetOTelColDeploymentConfigMap(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
) *corev1.ConfigMap

func GetPod

func GetPod(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *corev1.Pod

func GetReplicaSet

func GetReplicaSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.ReplicaSet

func GetStatefulSet

func GetStatefulSet(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	name string,
) *appsv1.StatefulSet

func GrpcExportTest

func GrpcExportTest() dash0v1alpha1.Export

func HttpExportTest

func HttpExportTest() dash0v1alpha1.Export

func InstrumentedCronJob

func InstrumentedCronJob(namespace string, name string) *batchv1.CronJob

func InstrumentedDaemonSet

func InstrumentedDaemonSet(namespace string, name string) *appsv1.DaemonSet

func InstrumentedDeployment

func InstrumentedDeployment(namespace string, name string) *appsv1.Deployment

func InstrumentedDeploymentWithMoreBellsAndWhistles

func InstrumentedDeploymentWithMoreBellsAndWhistles(namespace string, name string) *appsv1.Deployment

func InstrumentedJob

func InstrumentedJob(namespace string, name string) *batchv1.Job

func InstrumentedPod

func InstrumentedPod(namespace string, name string) *corev1.Pod

func InstrumentedReplicaSet

func InstrumentedReplicaSet(namespace string, name string) *appsv1.ReplicaSet

func InstrumentedReplicaSetOwnedByDeployment

func InstrumentedReplicaSetOwnedByDeployment(namespace string, name string) *appsv1.ReplicaSet

func InstrumentedStatefulSet

func InstrumentedStatefulSet(namespace string, name string) *appsv1.StatefulSet

func JobForWhichAnInstrumentationAttemptHasFailed

func JobForWhichAnInstrumentationAttemptHasFailed(namespace string, name string) *batchv1.Job

func JobWithOptOutLabel

func JobWithOptOutLabel(namespace string, name string) *batchv1.Job

func LoadMonitoringResourceByName

func LoadMonitoringResourceByName(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
	monitoringResourceName types.NamespacedName,
	failTestsOnNonExists bool,
) *dash0v1alpha1.Dash0Monitoring

func LoadMonitoringResourceByNameIfItExists

func LoadMonitoringResourceByNameIfItExists(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
	monitoringResourceName types.NamespacedName,
) *dash0v1alpha1.Dash0Monitoring

func LoadMonitoringResourceByNameOrFail

func LoadMonitoringResourceByNameOrFail(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
	monitoringResourceName types.NamespacedName,
) *dash0v1alpha1.Dash0Monitoring

func LoadMonitoringResourceOrFail

func LoadMonitoringResourceOrFail(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
) *dash0v1alpha1.Dash0Monitoring

func LoadOperatorConfigurationResourceByName

func LoadOperatorConfigurationResourceByName(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
	name string,
	failTestsOnNonExists bool,
) *dash0v1alpha1.Dash0OperatorConfiguration

func LoadOperatorConfigurationResourceByNameIfItExists

func LoadOperatorConfigurationResourceByNameIfItExists(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
	name string,
) *dash0v1alpha1.Dash0OperatorConfiguration

func LoadOperatorConfigurationResourceByNameOrFail

func LoadOperatorConfigurationResourceByNameOrFail(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
	name string,
) *dash0v1alpha1.Dash0OperatorConfiguration

func LoadOperatorConfigurationResourceOrFail

func LoadOperatorConfigurationResourceOrFail(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
) *dash0v1alpha1.Dash0OperatorConfiguration

func LoadOperatorDeploymentOrFail

func LoadOperatorDeploymentOrFail(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
) *appsv1.Deployment

func MatchEnvVar

func MatchEnvVar(name string, value string, args ...interface{}) gomega.OmegaMatcher

func MatchEnvVarValueFrom

func MatchEnvVarValueFrom(name string, secretName string, secretKey string, args ...interface{}) gomega.OmegaMatcher

func MatchEvent

func MatchEvent(
	namespace string,
	resourceName string,
	reason util.Reason,
	message string,
	args ...interface{},
) gomega.OmegaMatcher

func MatchVolumeMount

func MatchVolumeMount(name string, mountPath string, args ...interface{}) gomega.OmegaMatcher

func Namespace

func Namespace(name string) *corev1.Namespace

func PodOwnedByReplicaSet

func PodOwnedByReplicaSet(namespace string, name string) *corev1.Pod

func PodWithOptOutLabel

func PodWithOptOutLabel(namespace string, name string) *corev1.Pod

func RemoveLabel

func RemoveLabel(meta *metav1.ObjectMeta, key string)

func RemoveOperatorConfigurationResource

func RemoveOperatorConfigurationResource(ctx context.Context, k8sClient client.Client)

func RemoveOperatorConfigurationResourceByName

func RemoveOperatorConfigurationResourceByName(
	ctx context.Context,
	k8sClient client.Client,
	name string,
)

func RemoveOptOutLabel

func RemoveOptOutLabel(meta *metav1.ObjectMeta)

func ReplicaSetOwnedByDeployment

func ReplicaSetOwnedByDeployment(namespace string, name string) *appsv1.ReplicaSet

func ReplicaSetWithOptOutLabel

func ReplicaSetWithOptOutLabel(namespace string, name string) *appsv1.ReplicaSet

func StatefulSetWithOptOutLabel

func StatefulSetWithOptOutLabel(namespace string, name string) *appsv1.StatefulSet

func UniqueName

func UniqueName(prefix string) string

func UpdateInstrumentWorkloadsMode

func UpdateInstrumentWorkloadsMode(
	ctx context.Context,
	k8sClient client.Client,
	instrumentWorkloads dash0v1alpha1.InstrumentWorkloadsMode,
)

func UpdateLabel

func UpdateLabel(meta *metav1.ObjectMeta, key string, value string)

func UpdateWorkload

func UpdateWorkload(ctx context.Context, k8sClient client.Client, workload client.Object) client.Object

func VerifyAllResourcesExist

func VerifyAllResourcesExist(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
)

func VerifyCollectorDaemonSet

func VerifyCollectorDaemonSet(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
) *appsv1.DaemonSet

func VerifyCollectorDeployment

func VerifyCollectorDeployment(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
)

func VerifyCollectorResources

func VerifyCollectorResources(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
)

func VerifyCollectorResourcesDoNotExist

func VerifyCollectorResourcesDoNotExist(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
)

func VerifyCronJobWithOptOutLabel

func VerifyCronJobWithOptOutLabel(resource *batchv1.CronJob)

func VerifyDaemonSetCollectorConfigMap

func VerifyDaemonSetCollectorConfigMap(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
)

func VerifyDaemonSetWithOptOutLabel

func VerifyDaemonSetWithOptOutLabel(resource *appsv1.DaemonSet)

func VerifyDeploymentCollectorConfigMap

func VerifyDeploymentCollectorConfigMap(
	ctx context.Context,
	k8sClient client.Client,
	operatorNamespace string,
)

func VerifyDeploymentWithOptOutLabel

func VerifyDeploymentWithOptOutLabel(resource *appsv1.Deployment)

func VerifyExpectedResourceDoesNotExist

func VerifyExpectedResourceDoesNotExist(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	expectedResource expectedResource,
)

func VerifyExpectedResourceExists

func VerifyExpectedResourceExists(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	expectedResource expectedResource,
) client.Object

func VerifyFailedInstrumentationEvent

func VerifyFailedInstrumentationEvent(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	namespace string,
	resourceName string,
	message string,
) *corev1.Event

func VerifyFailedUninstrumentationEvent

func VerifyFailedUninstrumentationEvent(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	namespace string,
	resourceName string,
	message string,
) *corev1.Event

func VerifyImmutableJobCouldNotBeModified

func VerifyImmutableJobCouldNotBeModified(resource *batchv1.Job)

func VerifyJobWithOptOutLabel

func VerifyJobWithOptOutLabel(resource *batchv1.Job)

func VerifyModifiedCronJob

func VerifyModifiedCronJob(resource *batchv1.CronJob, expectations PodSpecExpectations, opts ...VerifyOpts)

func VerifyModifiedDaemonSet

func VerifyModifiedDaemonSet(resource *appsv1.DaemonSet, expectations PodSpecExpectations, opts ...VerifyOpts)

func VerifyModifiedDeployment

func VerifyModifiedDeployment(resource *appsv1.Deployment, expectations PodSpecExpectations, opts ...VerifyOpts)

func VerifyModifiedJob

func VerifyModifiedJob(resource *batchv1.Job, expectations PodSpecExpectations, opts ...VerifyOpts)

func VerifyModifiedJobAfterUnsuccessfulOptOut

func VerifyModifiedJobAfterUnsuccessfulOptOut(resource *batchv1.Job)

func VerifyModifiedPod

func VerifyModifiedPod(resource *corev1.Pod, expectations PodSpecExpectations, opts ...VerifyOpts)

func VerifyModifiedReplicaSet

func VerifyModifiedReplicaSet(resource *appsv1.ReplicaSet, expectations PodSpecExpectations, opts ...VerifyOpts)

func VerifyModifiedStatefulSet

func VerifyModifiedStatefulSet(resource *appsv1.StatefulSet, expectations PodSpecExpectations, opts ...VerifyOpts)

func VerifyMonitoringResourceByNameDoesNotExist

func VerifyMonitoringResourceByNameDoesNotExist(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
	MonitoringResourceName types.NamespacedName,
)

func VerifyNoEvents

func VerifyNoEvents(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	namespace string,
)

func VerifyNoInstrumentationNecessaryEvent

func VerifyNoInstrumentationNecessaryEvent(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	namespace string,
	resourceName string,
	eventSource string,
) *corev1.Event

func VerifyNoUninstrumentationNecessaryEvent

func VerifyNoUninstrumentationNecessaryEvent(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	namespace string,
	resourceName string,
	message string,
) *corev1.Event

func VerifyOperatorConfigurationResourceByNameDoesNotExist

func VerifyOperatorConfigurationResourceByNameDoesNotExist(
	ctx context.Context,
	k8sClient client.Client,
	g Gomega,
	name string,
)

func VerifyPodWithOptOutLabel

func VerifyPodWithOptOutLabel(resource *corev1.Pod)

func VerifyReplicaSetWithOptOutLabel

func VerifyReplicaSetWithOptOutLabel(resource *appsv1.ReplicaSet)

func VerifyResourceDoesNotExist

func VerifyResourceDoesNotExist(
	ctx context.Context,
	k8sClient client.Client,
	namespace string,
	expectedName string,
	receiver client.Object,
)

func VerifyRevertedDeployment

func VerifyRevertedDeployment(resource *appsv1.Deployment, expectations PodSpecExpectations)

func VerifyStatefulSetWithOptOutLabel

func VerifyStatefulSetWithOptOutLabel(resource *appsv1.StatefulSet)

func VerifySuccessfulInstrumentationEvent

func VerifySuccessfulInstrumentationEvent(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	namespace string,
	resourceName string,
	eventSource string,
) *corev1.Event

func VerifySuccessfulUninstrumentationEvent

func VerifySuccessfulUninstrumentationEvent(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	namespace string,
	resourceName string,
	eventSource string,
) *corev1.Event

func VerifySuccessfulUninstrumentationEventEventually

func VerifySuccessfulUninstrumentationEventEventually(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	g Gomega,
	namespace string,
	resourceName string,
	eventSource string,
) *corev1.Event

func VerifyUnmodifiedCronJob

func VerifyUnmodifiedCronJob(resource *batchv1.CronJob)

func VerifyUnmodifiedDaemonSet

func VerifyUnmodifiedDaemonSet(resource *appsv1.DaemonSet)

func VerifyUnmodifiedDeployment

func VerifyUnmodifiedDeployment(resource *appsv1.Deployment)

func VerifyUnmodifiedDeploymentEventually

func VerifyUnmodifiedDeploymentEventually(g Gomega, resource *appsv1.Deployment)

func VerifyUnmodifiedJob

func VerifyUnmodifiedJob(resource *batchv1.Job)

func VerifyUnmodifiedPod

func VerifyUnmodifiedPod(resource *corev1.Pod)

func VerifyUnmodifiedReplicaSet

func VerifyUnmodifiedReplicaSet(resource *appsv1.ReplicaSet)

func VerifyUnmodifiedStatefulSet

func VerifyUnmodifiedStatefulSet(resource *appsv1.StatefulSet)

func VerifyWebhookIgnoreOnceLabelIsAbsent

func VerifyWebhookIgnoreOnceLabelIsAbsent(objectMeta *metav1.ObjectMeta)

func VerifyWebhookIgnoreOnceLabelIsPresent

func VerifyWebhookIgnoreOnceLabelIsPresent(objectMeta *metav1.ObjectMeta)

func VerifyWebhookIgnoreOnceLabelIsPresentEventually

func VerifyWebhookIgnoreOnceLabelIsPresentEventually(g Gomega, objectMeta *metav1.ObjectMeta)

func WrapConfigureCronJobFnAsTestableWorkload

func WrapConfigureCronJobFnAsTestableWorkload(
	fn func(string, string) *batchv1.CronJob,
) func(string, string) TestableWorkload

func WrapConfigureDaemonSetFnAsTestableWorkload

func WrapConfigureDaemonSetFnAsTestableWorkload(
	fn func(string, string) *appsv1.DaemonSet,
) func(string, string) TestableWorkload

func WrapConfigureDeploymentFnAsTestableWorkload

func WrapConfigureDeploymentFnAsTestableWorkload(
	fn func(string, string) *appsv1.Deployment,
) func(string, string) TestableWorkload

func WrapConfigureJobFnAsTestableWorkload

func WrapConfigureJobFnAsTestableWorkload(
	fn func(string, string) *batchv1.Job,
) func(string, string) TestableWorkload

func WrapConfigurePodFnAsTestableWorkload

func WrapConfigurePodFnAsTestableWorkload(
	fn func(string, string) *corev1.Pod,
) func(string, string) TestableWorkload

func WrapConfigureReplicaSetFnAsTestableWorkload

func WrapConfigureReplicaSetFnAsTestableWorkload(
	fn func(string, string) *appsv1.ReplicaSet,
) func(string, string) TestableWorkload

func WrapConfigureStatefulSetFnAsTestableWorkload

func WrapConfigureStatefulSetFnAsTestableWorkload(
	fn func(string, string) *appsv1.StatefulSet,
) func(string, string) TestableWorkload

Types

type ContainerExpectations

type ContainerExpectations struct {
	VolumeMounts                             int
	Dash0VolumeMountIdx                      int
	EnvVars                                  int
	LdPreloadEnvVarIdx                       int
	LdPreloadValue                           string
	LdPreloadUsesValueFrom                   bool
	NodeIpIdx                                int
	Dash0CollectorBaseUrlEnvVarIdx           int
	Dash0CollectorBaseUrlEnvVarExpectedValue string
}

type CronJobTestableWorkload

type CronJobTestableWorkload struct {
	// contains filtered or unexported fields
}

func (CronJobTestableWorkload) Get

func (CronJobTestableWorkload) GetObjectMeta

func (w CronJobTestableWorkload) GetObjectMeta() *metav1.ObjectMeta

type DaemonSetTestableWorkload

type DaemonSetTestableWorkload struct {
	// contains filtered or unexported fields
}

func (DaemonSetTestableWorkload) Get

func (DaemonSetTestableWorkload) GetObjectMeta

func (w DaemonSetTestableWorkload) GetObjectMeta() *metav1.ObjectMeta

type DeploymentTestableWorkload

type DeploymentTestableWorkload struct {
	// contains filtered or unexported fields
}

func (DeploymentTestableWorkload) Get

func (DeploymentTestableWorkload) GetObjectMeta

func (w DeploymentTestableWorkload) GetObjectMeta() *metav1.ObjectMeta

type JobTestableWorkload

type JobTestableWorkload struct {
	// contains filtered or unexported fields
}

func (JobTestableWorkload) Get

func (JobTestableWorkload) GetObjectMeta

func (w JobTestableWorkload) GetObjectMeta() *metav1.ObjectMeta

type MatchEnvVarMatcher

type MatchEnvVarMatcher struct {
	Name  string
	Value string
	Args  []interface{}
}

func (*MatchEnvVarMatcher) FailureMessage

func (matcher *MatchEnvVarMatcher) FailureMessage(actual interface{}) (message string)

func (*MatchEnvVarMatcher) Match

func (matcher *MatchEnvVarMatcher) Match(actual interface{}) (success bool, err error)

func (*MatchEnvVarMatcher) NegatedFailureMessage

func (matcher *MatchEnvVarMatcher) NegatedFailureMessage(actual interface{}) (message string)

type MatchEnvVarValueFromSecretMatcher

type MatchEnvVarValueFromSecretMatcher struct {
	Name       string
	SecretName string
	SecretKey  string
	Args       []interface{}
}

func (*MatchEnvVarValueFromSecretMatcher) FailureMessage

func (matcher *MatchEnvVarValueFromSecretMatcher) FailureMessage(actual interface{}) (message string)

func (*MatchEnvVarValueFromSecretMatcher) Match

func (matcher *MatchEnvVarValueFromSecretMatcher) Match(actual interface{}) (success bool, err error)

func (*MatchEnvVarValueFromSecretMatcher) NegatedFailureMessage

func (matcher *MatchEnvVarValueFromSecretMatcher) NegatedFailureMessage(actual interface{}) (message string)

type MatchEventMatcher

type MatchEventMatcher struct {
	Namespace    string
	ResourceName string
	Reason       string
	Message      string
	Args         []interface{}
}

func (*MatchEventMatcher) FailureMessage

func (matcher *MatchEventMatcher) FailureMessage(actual interface{}) (message string)

func (*MatchEventMatcher) Match

func (matcher *MatchEventMatcher) Match(actual interface{}) (success bool, err error)

func (*MatchEventMatcher) NegatedFailureMessage

func (matcher *MatchEventMatcher) NegatedFailureMessage(actual interface{}) (message string)

type MatchVolumeMountMatcher

type MatchVolumeMountMatcher struct {
	Name      string
	MountPath string
	Args      []interface{}
}

func (*MatchVolumeMountMatcher) FailureMessage

func (matcher *MatchVolumeMountMatcher) FailureMessage(actual interface{}) (message string)

func (*MatchVolumeMountMatcher) Match

func (matcher *MatchVolumeMountMatcher) Match(actual interface{}) (success bool, err error)

func (*MatchVolumeMountMatcher) NegatedFailureMessage

func (matcher *MatchVolumeMountMatcher) NegatedFailureMessage(actual interface{}) (message string)

type PodSpecExpectations

type PodSpecExpectations struct {
	Volumes               int
	Dash0VolumeIdx        int
	InitContainers        int
	Dash0InitContainerIdx int
	Containers            []ContainerExpectations
}

func BasicInstrumentedPodSpecExpectations

func BasicInstrumentedPodSpecExpectations() PodSpecExpectations

type PodTestableWorkload

type PodTestableWorkload struct {
	// contains filtered or unexported fields
}

func (PodTestableWorkload) Get

func (PodTestableWorkload) GetObjectMeta

func (w PodTestableWorkload) GetObjectMeta() *metav1.ObjectMeta

type ReplicaSetTestableWorkload

type ReplicaSetTestableWorkload struct {
	// contains filtered or unexported fields
}

func (ReplicaSetTestableWorkload) Get

func (ReplicaSetTestableWorkload) GetObjectMeta

func (w ReplicaSetTestableWorkload) GetObjectMeta() *metav1.ObjectMeta

type StatefulSetTestableWorkload

type StatefulSetTestableWorkload struct {
	// contains filtered or unexported fields
}

func (StatefulSetTestableWorkload) Get

func (StatefulSetTestableWorkload) GetObjectMeta

func (w StatefulSetTestableWorkload) GetObjectMeta() *metav1.ObjectMeta

type TestableWorkload

type TestableWorkload interface {
	Get() client.Object
	GetObjectMeta() *metav1.ObjectMeta
}

type VerifyOpts

type VerifyOpts struct {
	VerifyManagedFields bool
	ExpectManagedFields bool
}

type WorkloadTestConfig

type WorkloadTestConfig struct {
	WorkloadNamePrefix string
	ConfigureFn        func(string, string) TestableWorkload
	CreateFn           func(context.Context, client.Client, string, string) TestableWorkload
	GetFn              func(context.Context, client.Client, string, string) TestableWorkload
	VerifyPreFn        func(TestableWorkload)
	VerifyFn           func(TestableWorkload)
}

Jump to

Keyboard shortcuts

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