Documentation
¶
Index ¶
- Constants
- Variables
- func AddLabel(meta *metav1.ObjectMeta, key string, value string)
- func AddManagedFields(meta *metav1.ObjectMeta)
- func AddOptOutLabel(meta *metav1.ObjectMeta)
- func BasicCronJob(namespace string, name string) *batchv1.CronJob
- func BasicDaemonSet(namespace string, name string) *appsv1.DaemonSet
- func BasicDeployment(namespace string, name string) *appsv1.Deployment
- func BasicJob(namespace string, name string) *batchv1.Job
- func BasicPod(namespace string, name string) *corev1.Pod
- func BasicReplicaSet(namespace string, name string) *appsv1.ReplicaSet
- func BasicStatefulSet(namespace string, name string) *appsv1.StatefulSet
- func CreateBasicCronJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.CronJob
- func CreateBasicDaemonSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.DaemonSet
- func CreateBasicDeployment(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.Deployment
- func CreateBasicJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func CreateBasicPod(ctx context.Context, k8sClient client.Client, namespace string, name string) *corev1.Pod
- func CreateBasicReplicaSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func CreateBasicStatefulSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.StatefulSet
- func CreateControllerDeploymentWithSelfMonitoringWithSecretRef() *appsv1.Deployment
- func CreateControllerDeploymentWithSelfMonitoringWithToken() *appsv1.Deployment
- func CreateControllerDeploymentWithoutSelfMonitoringWithSecretRef() *appsv1.Deployment
- func CreateControllerDeploymentWithoutSelfMonitoringWithToken() *appsv1.Deployment
- func CreateControllerDeploymentWithoutSelfMonitoringWithoutAuth() *appsv1.Deployment
- func CreateCronJobWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.CronJob
- func CreateDaemonSetWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.DaemonSet
- func CreateDefaultMonitoringResource(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0Monitoring
- func CreateDefaultOperatorConfigurationResource(ctx context.Context, k8sClient client.Client) *dash0v1alpha1.Dash0OperatorConfiguration
- func CreateDeploymentWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.Deployment
- func CreateInstrumentedCronJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.CronJob
- func CreateInstrumentedDaemonSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.DaemonSet
- func CreateInstrumentedDeployment(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.Deployment
- func CreateInstrumentedJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func CreateInstrumentedPod(ctx context.Context, k8sClient client.Client, namespace string, name string) *corev1.Pod
- func CreateInstrumentedReplicaSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func CreateInstrumentedStatefulSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.StatefulSet
- func CreateJobForWhichAnInstrumentationAttemptHasFailed(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func CreateJobWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func CreateMonitoringResource(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0Monitoring
- func CreateMonitoringResourceWithPotentialError(ctx context.Context, k8sClient client.Client, ...) (*dash0v1alpha1.Dash0Monitoring, error)
- func CreateOperatorConfigurationResource(ctx context.Context, k8sClient client.Client, ...) (*dash0v1alpha1.Dash0OperatorConfiguration, error)
- func CreateOperatorConfigurationResourceWithSpec(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0OperatorConfiguration
- func CreatePodOwnedByReplicaSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *corev1.Pod
- func CreatePodWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *corev1.Pod
- func CreateReplicaSetOwnedByDeployment(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func CreateReplicaSetWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func CreateStatefulSetWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.StatefulSet
- func CreateWorkload(ctx context.Context, k8sClient client.Client, workload client.Object) client.Object
- func CronJobWithOptOutLabel(namespace string, name string) *batchv1.CronJob
- func DaemonSetWithOptOutLabel(namespace string, name string) *appsv1.DaemonSet
- func Dash0ExportWithEndpointAndSecretRef() dash0v1alpha1.Export
- func Dash0ExportWithEndpointAndSecretRefAndApiEndpoint() dash0v1alpha1.Export
- func Dash0ExportWithEndpointAndToken() dash0v1alpha1.Export
- func Dash0ExportWithEndpointAndTokenAndApiEndpoint() dash0v1alpha1.Export
- func Dash0ExportWithEndpointTokenAndInsightsDataset() dash0v1alpha1.Export
- func DefaultOperatorConfigurationResource() *dash0v1alpha1.Dash0OperatorConfiguration
- func DeleteAllCreatedObjects(ctx context.Context, k8sClient client.Client, createdObjects []client.Object) []client.Object
- func DeleteAllEvents(ctx context.Context, clientset *kubernetes.Clientset, namespace string)
- func DeleteAllOperatorConfigurationResources(ctx context.Context, k8sClient client.Client)
- func DeleteMonitoringResource(ctx context.Context, k8sClient client.Client)
- func DeleteMonitoringResourceByName(ctx context.Context, k8sClient client.Client, ...)
- func DeleteMonitoringResourceIfItExists(ctx context.Context, k8sClient client.Client)
- func DeploymentWithExistingDash0Artifacts(namespace string, name string) *appsv1.Deployment
- func DeploymentWithMoreBellsAndWhistles(namespace string, name string) *appsv1.Deployment
- func DeploymentWithOptOutLabel(namespace string, name string) *appsv1.Deployment
- func EnsureControllerDeploymentDoesNotExist(ctx context.Context, k8sClient client.Client, ...)
- func EnsureControllerDeploymentExists(ctx context.Context, k8sClient client.Client, ...) *appsv1.Deployment
- func EnsureEmptyMonitoringResourceExistsAndIsAvailable(ctx context.Context, k8sClient client.Client) *dash0v1alpha1.Dash0Monitoring
- func EnsureKubernetesObjectExists(ctx context.Context, k8sClient client.Client, ...) client.Object
- func EnsureMonitoringResourceExists(ctx context.Context, k8sClient client.Client) *dash0v1alpha1.Dash0Monitoring
- func EnsureMonitoringResourceExistsAndIsAvailable(ctx context.Context, k8sClient client.Client) *dash0v1alpha1.Dash0Monitoring
- func EnsureMonitoringResourceExistsAndIsDegraded(ctx context.Context, k8sClient client.Client) *dash0v1alpha1.Dash0Monitoring
- func EnsureMonitoringResourceExistsInNamespace(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0Monitoring
- func EnsureMonitoringResourceExistsInNamespaceAndIsAvailable(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0Monitoring
- func EnsureMonitoringResourceExistsWithInstrumentWorkloadsMode(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0Monitoring
- func EnsureMonitoringResourceWithSpecExists(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0Monitoring
- func EnsureMonitoringResourceWithSpecExistsAndIsAvailable(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0Monitoring
- func EnsureMonitoringResourceWithSpecExistsInNamespace(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0Monitoring
- func EnsureMonitoringResourceWithSpecExistsInNamespaceAndIsAvailable(ctx context.Context, k8sClient client.Client, ...) *dash0v1alpha1.Dash0Monitoring
- func EnsureNamespaceExists(ctx context.Context, k8sClient client.Client, namespace string) *corev1.Namespace
- func EnsureOperatorNamespaceExists(ctx context.Context, k8sClient client.Client) *corev1.Namespace
- func EnsurePersesDashboardCrdExists(ctx context.Context, k8sClient client.Client) *apiextensionsv1.CustomResourceDefinition
- func EnsurePrometheusRuleCrdExists(ctx context.Context, k8sClient client.Client) *apiextensionsv1.CustomResourceDefinition
- func EnsureTestNamespaceExists(ctx context.Context, k8sClient client.Client) *corev1.Namespace
- func ExportToPrt(export dash0v1alpha1.Export) *dash0v1alpha1.Export
- func GetCronJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.CronJob
- func GetDaemonSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.DaemonSet
- func GetDeployment(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.Deployment
- func GetDeploymentEventually(ctx context.Context, k8sClient client.Client, g Gomega, namespace string, ...) *appsv1.Deployment
- func GetJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func GetOTelColDaemonSet(ctx context.Context, k8sClient client.Client, operatorNamespace string) *appsv1.DaemonSet
- func GetOTelColDaemonSetConfigMap(ctx context.Context, k8sClient client.Client, operatorNamespace string) *corev1.ConfigMap
- func GetOTelColDeployment(ctx context.Context, k8sClient client.Client, operatorNamespace string) *appsv1.Deployment
- func GetOTelColDeploymentConfigMap(ctx context.Context, k8sClient client.Client, operatorNamespace string) *corev1.ConfigMap
- func GetPod(ctx context.Context, k8sClient client.Client, namespace string, name string) *corev1.Pod
- func GetReplicaSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func GetStatefulSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.StatefulSet
- func GrpcExportTest() dash0v1alpha1.Export
- func HttpExportTest() dash0v1alpha1.Export
- func InstrumentedCronJob(namespace string, name string) *batchv1.CronJob
- func InstrumentedDaemonSet(namespace string, name string) *appsv1.DaemonSet
- func InstrumentedDeployment(namespace string, name string) *appsv1.Deployment
- func InstrumentedDeploymentWithMoreBellsAndWhistles(namespace string, name string) *appsv1.Deployment
- func InstrumentedJob(namespace string, name string) *batchv1.Job
- func InstrumentedPod(namespace string, name string) *corev1.Pod
- func InstrumentedReplicaSet(namespace string, name string) *appsv1.ReplicaSet
- func InstrumentedReplicaSetOwnedByDeployment(namespace string, name string) *appsv1.ReplicaSet
- func InstrumentedStatefulSet(namespace string, name string) *appsv1.StatefulSet
- func JobForWhichAnInstrumentationAttemptHasFailed(namespace string, name string) *batchv1.Job
- func JobWithOptOutLabel(namespace string, name string) *batchv1.Job
- func LoadMonitoringResourceByName(ctx context.Context, k8sClient client.Client, g Gomega, ...) *dash0v1alpha1.Dash0Monitoring
- func LoadMonitoringResourceByNameIfItExists(ctx context.Context, k8sClient client.Client, g Gomega, ...) *dash0v1alpha1.Dash0Monitoring
- func LoadMonitoringResourceByNameOrFail(ctx context.Context, k8sClient client.Client, g Gomega, ...) *dash0v1alpha1.Dash0Monitoring
- func LoadMonitoringResourceOrFail(ctx context.Context, k8sClient client.Client, g Gomega) *dash0v1alpha1.Dash0Monitoring
- func LoadOperatorConfigurationResourceByName(ctx context.Context, k8sClient client.Client, g Gomega, name string, ...) *dash0v1alpha1.Dash0OperatorConfiguration
- func LoadOperatorConfigurationResourceByNameIfItExists(ctx context.Context, k8sClient client.Client, g Gomega, name string) *dash0v1alpha1.Dash0OperatorConfiguration
- func LoadOperatorConfigurationResourceByNameOrFail(ctx context.Context, k8sClient client.Client, g Gomega, name string) *dash0v1alpha1.Dash0OperatorConfiguration
- func LoadOperatorConfigurationResourceOrFail(ctx context.Context, k8sClient client.Client, g Gomega) *dash0v1alpha1.Dash0OperatorConfiguration
- func LoadOperatorDeploymentOrFail(ctx context.Context, k8sClient client.Client, g Gomega) *appsv1.Deployment
- func MatchEnvVar(name string, value string, args ...interface{}) gomega.OmegaMatcher
- func MatchEnvVarValueFrom(name string, secretName string, secretKey string, args ...interface{}) gomega.OmegaMatcher
- func MatchEvent(namespace string, resourceName string, reason util.Reason, message string, ...) gomega.OmegaMatcher
- func MatchVolumeMount(name string, mountPath string, args ...interface{}) gomega.OmegaMatcher
- func Namespace(name string) *corev1.Namespace
- func PodOwnedByReplicaSet(namespace string, name string) *corev1.Pod
- func PodWithOptOutLabel(namespace string, name string) *corev1.Pod
- func RemoveLabel(meta *metav1.ObjectMeta, key string)
- func RemoveOperatorConfigurationResource(ctx context.Context, k8sClient client.Client)
- func RemoveOperatorConfigurationResourceByName(ctx context.Context, k8sClient client.Client, name string)
- func RemoveOptOutLabel(meta *metav1.ObjectMeta)
- func ReplicaSetOwnedByDeployment(namespace string, name string) *appsv1.ReplicaSet
- func ReplicaSetWithOptOutLabel(namespace string, name string) *appsv1.ReplicaSet
- func StatefulSetWithOptOutLabel(namespace string, name string) *appsv1.StatefulSet
- func UniqueName(prefix string) string
- func UpdateInstrumentWorkloadsMode(ctx context.Context, k8sClient client.Client, ...)
- func UpdateLabel(meta *metav1.ObjectMeta, key string, value string)
- func UpdateWorkload(ctx context.Context, k8sClient client.Client, workload client.Object) client.Object
- func VerifyAllResourcesExist(ctx context.Context, k8sClient client.Client, operatorNamespace string)
- func VerifyCollectorDaemonSet(ctx context.Context, k8sClient client.Client, operatorNamespace string, ...) *appsv1.DaemonSet
- func VerifyCollectorDeployment(ctx context.Context, k8sClient client.Client, operatorNamespace string)
- func VerifyCollectorResources(ctx context.Context, k8sClient client.Client, operatorNamespace string, ...)
- func VerifyCollectorResourcesDoNotExist(ctx context.Context, k8sClient client.Client, operatorNamespace string)
- func VerifyCronJobWithOptOutLabel(resource *batchv1.CronJob)
- func VerifyDaemonSetCollectorConfigMap(ctx context.Context, k8sClient client.Client, operatorNamespace string, ...)
- func VerifyDaemonSetWithOptOutLabel(resource *appsv1.DaemonSet)
- func VerifyDeploymentCollectorConfigMap(ctx context.Context, k8sClient client.Client, operatorNamespace string)
- func VerifyDeploymentWithOptOutLabel(resource *appsv1.Deployment)
- func VerifyExpectedResourceDoesNotExist(ctx context.Context, k8sClient client.Client, namespace string, ...)
- func VerifyExpectedResourceExists(ctx context.Context, k8sClient client.Client, namespace string, ...) client.Object
- func VerifyFailedInstrumentationEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) *corev1.Event
- func VerifyFailedUninstrumentationEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) *corev1.Event
- func VerifyImmutableJobCouldNotBeModified(resource *batchv1.Job)
- func VerifyInstrumentationViaHigherOrderWorkloadEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) *corev1.Event
- func VerifyJobWithOptOutLabel(resource *batchv1.Job)
- func VerifyModifiedCronJob(resource *batchv1.CronJob, expectations PodSpecExpectations, ...)
- func VerifyModifiedDaemonSet(resource *appsv1.DaemonSet, expectations PodSpecExpectations, ...)
- func VerifyModifiedDeployment(resource *appsv1.Deployment, expectations PodSpecExpectations, ...)
- func VerifyModifiedJob(resource *batchv1.Job, expectations PodSpecExpectations, opts ...VerifyOpts)
- func VerifyModifiedJobAfterUnsuccessfulOptOut(resource *batchv1.Job)
- func VerifyModifiedPod(resource *corev1.Pod, expectations PodSpecExpectations, opts ...VerifyOpts)
- func VerifyModifiedReplicaSet(resource *appsv1.ReplicaSet, expectations PodSpecExpectations, ...)
- func VerifyModifiedStatefulSet(resource *appsv1.StatefulSet, expectations PodSpecExpectations, ...)
- func VerifyMonitoringResourceByNameDoesNotExist(ctx context.Context, k8sClient client.Client, g Gomega, ...)
- func VerifyNoEvents(ctx context.Context, clientset *kubernetes.Clientset, namespace string)
- func VerifyNoInstrumentationNecessaryEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) *corev1.Event
- func VerifyNoUninstrumentationNecessaryEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) *corev1.Event
- func VerifyOperatorConfigurationResourceByNameDoesNotExist(ctx context.Context, k8sClient client.Client, g Gomega, name string)
- func VerifyPodWithOptOutLabel(resource *corev1.Pod)
- func VerifyReplicaSetWithOptOutLabel(resource *appsv1.ReplicaSet)
- func VerifyResourceDoesNotExist(ctx context.Context, k8sClient client.Client, namespace string, ...)
- func VerifyResourceExists(ctx context.Context, k8sClient client.Client, namespace string, ...) client.Object
- func VerifyRevertedDeployment(resource *appsv1.Deployment, expectations PodSpecExpectations)
- func VerifyStatefulSetWithOptOutLabel(resource *appsv1.StatefulSet)
- func VerifySuccessfulInstrumentationEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) *corev1.Event
- func VerifySuccessfulUninstrumentationEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) *corev1.Event
- func VerifySuccessfulUninstrumentationEventEventually(ctx context.Context, clientset *kubernetes.Clientset, g Gomega, ...) *corev1.Event
- func VerifyUnmodifiedCronJob(resource *batchv1.CronJob)
- func VerifyUnmodifiedDaemonSet(resource *appsv1.DaemonSet)
- func VerifyUnmodifiedDeployment(resource *appsv1.Deployment)
- func VerifyUnmodifiedDeploymentEventually(g Gomega, resource *appsv1.Deployment)
- func VerifyUnmodifiedJob(resource *batchv1.Job)
- func VerifyUnmodifiedPod(resource *corev1.Pod)
- func VerifyUnmodifiedReplicaSet(resource *appsv1.ReplicaSet)
- func VerifyUnmodifiedStatefulSet(resource *appsv1.StatefulSet)
- func VerifyWebhookIgnoreOnceLabelIsAbsent(objectMeta *metav1.ObjectMeta)
- func VerifyWebhookIgnoreOnceLabelIsPresent(objectMeta *metav1.ObjectMeta)
- func VerifyWebhookIgnoreOnceLabelIsPresentEventually(g Gomega, objectMeta *metav1.ObjectMeta)
- func WrapConfigureCronJobFnAsTestableWorkload(fn func(string, string) *batchv1.CronJob) func(string, string) TestableWorkload
- func WrapConfigureDaemonSetFnAsTestableWorkload(fn func(string, string) *appsv1.DaemonSet) func(string, string) TestableWorkload
- func WrapConfigureDeploymentFnAsTestableWorkload(fn func(string, string) *appsv1.Deployment) func(string, string) TestableWorkload
- func WrapConfigureJobFnAsTestableWorkload(fn func(string, string) *batchv1.Job) func(string, string) TestableWorkload
- func WrapConfigurePodFnAsTestableWorkload(fn func(string, string) *corev1.Pod) func(string, string) TestableWorkload
- func WrapConfigureReplicaSetFnAsTestableWorkload(fn func(string, string) *appsv1.ReplicaSet) func(string, string) TestableWorkload
- func WrapConfigureStatefulSetFnAsTestableWorkload(fn func(string, string) *appsv1.StatefulSet) func(string, string) TestableWorkload
- func WrapCronJobFnAsTestableWorkload(fn func(context.Context, client.Client, string, string) *batchv1.CronJob) func(context.Context, client.Client, string, string) TestableWorkload
- func WrapDaemonSetFnAsTestableWorkload(fn func(context.Context, client.Client, string, string) *appsv1.DaemonSet) func(context.Context, client.Client, string, string) TestableWorkload
- func WrapDeploymentFnAsTestableWorkload(fn func(context.Context, client.Client, string, string) *appsv1.Deployment) func(context.Context, client.Client, string, string) TestableWorkload
- func WrapJobFnAsTestableWorkload(fn func(context.Context, client.Client, string, string) *batchv1.Job) func(context.Context, client.Client, string, string) TestableWorkload
- func WrapPodFnAsTestableWorkload(fn func(context.Context, client.Client, string, string) *corev1.Pod) func(context.Context, client.Client, string, string) TestableWorkload
- func WrapReplicaSetFnAsTestableWorkload(fn func(context.Context, client.Client, string, string) *appsv1.ReplicaSet) func(context.Context, client.Client, string, string) TestableWorkload
- func WrapStatefulSetFnAsTestableWorkload(fn func(context.Context, client.Client, string, string) *appsv1.StatefulSet) func(context.Context, client.Client, string, string) TestableWorkload
- type ContainerExpectations
- type CronJobTestableWorkload
- type DaemonSetTestableWorkload
- type DeploymentTestableWorkload
- type JobTestableWorkload
- type MatchEnvVarMatcher
- type MatchEnvVarValueFromSecretMatcher
- func (matcher *MatchEnvVarValueFromSecretMatcher) FailureMessage(actual interface{}) (message string)
- func (matcher *MatchEnvVarValueFromSecretMatcher) Match(actual interface{}) (success bool, err error)
- func (matcher *MatchEnvVarValueFromSecretMatcher) NegatedFailureMessage(actual interface{}) (message string)
- type MatchEventMatcher
- type MatchVolumeMountMatcher
- type PodSpecExpectations
- type PodTestableWorkload
- type ReplicaSetTestableWorkload
- type StatefulSetTestableWorkload
- type TestableWorkload
- type VerifyOpts
- type WorkloadTestConfig
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" EndpointDash0TestAlternative = "endpoint-alternative.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 = "dash0-operator-deployment" OperatorWebhookServiceName = "dash0-operator-webhook-service" 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" AuthorizationTokenTestAlternative = "authorization-token-test" 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{ Endpoint: EndpointDash0Test, 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{ Endpoint: EndpointDash0Test, 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{ Endpoint: EndpointDash0Test, 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{ Endpoint: EndpointDash0Test, 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{ Endpoint: EndpointDash0Test, 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{ Endpoint: EndpointDash0Test, 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 AddManagedFields ¶
func AddManagedFields(meta *metav1.ObjectMeta)
func AddOptOutLabel ¶
func AddOptOutLabel(meta *metav1.ObjectMeta)
func BasicDeployment ¶
func BasicDeployment(namespace string, name string) *appsv1.Deployment
func BasicReplicaSet ¶
func BasicReplicaSet(namespace string, name string) *appsv1.ReplicaSet
func BasicStatefulSet ¶
func BasicStatefulSet(namespace string, name string) *appsv1.StatefulSet
func CreateBasicCronJob ¶
func CreateBasicDaemonSet ¶
func CreateBasicDeployment ¶
func CreateBasicJob ¶
func CreateBasicPod ¶
func CreateBasicReplicaSet ¶
func CreateBasicStatefulSet ¶
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 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 CreateInstrumentedJob ¶
func CreateInstrumentedPod ¶
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 CreateWorkload ¶
func CronJobWithOptOutLabel ¶
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 DefaultOperatorConfigurationResource ¶
func DefaultOperatorConfigurationResource() *dash0v1alpha1.Dash0OperatorConfiguration
func DeleteAllCreatedObjects ¶
func DeleteAllEvents ¶
func DeleteAllEvents( ctx context.Context, clientset *kubernetes.Clientset, namespace string, )
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 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 EnsureMonitoringResourceExists ¶
func EnsureMonitoringResourceExists( ctx context.Context, k8sClient client.Client, ) *dash0v1alpha1.Dash0Monitoring
func EnsureMonitoringResourceExistsAndIsAvailable ¶
func EnsureMonitoringResourceExistsAndIsAvailable( ctx context.Context, k8sClient client.Client, ) *dash0v1alpha1.Dash0Monitoring
func EnsureMonitoringResourceExistsAndIsDegraded ¶
func EnsureMonitoringResourceExistsAndIsDegraded( ctx context.Context, k8sClient client.Client, ) *dash0v1alpha1.Dash0Monitoring
func EnsureMonitoringResourceExistsInNamespace ¶
func EnsureMonitoringResourceExistsInNamespace( ctx context.Context, k8sClient client.Client, namespacesName types.NamespacedName, ) *dash0v1alpha1.Dash0Monitoring
func EnsureMonitoringResourceExistsInNamespaceAndIsAvailable ¶
func EnsureMonitoringResourceExistsInNamespaceAndIsAvailable( ctx context.Context, k8sClient client.Client, namespacesName types.NamespacedName, ) *dash0v1alpha1.Dash0Monitoring
func EnsureMonitoringResourceExistsWithInstrumentWorkloadsMode ¶
func EnsureMonitoringResourceExistsWithInstrumentWorkloadsMode( ctx context.Context, k8sClient client.Client, instrumentWorkloads dash0v1alpha1.InstrumentWorkloadsMode, ) *dash0v1alpha1.Dash0Monitoring
func EnsureMonitoringResourceWithSpecExists ¶
func EnsureMonitoringResourceWithSpecExists( ctx context.Context, k8sClient client.Client, spec dash0v1alpha1.Dash0MonitoringSpec, ) *dash0v1alpha1.Dash0Monitoring
func EnsureMonitoringResourceWithSpecExistsAndIsAvailable ¶
func EnsureMonitoringResourceWithSpecExistsAndIsAvailable( ctx context.Context, k8sClient client.Client, spec dash0v1alpha1.Dash0MonitoringSpec, ) *dash0v1alpha1.Dash0Monitoring
func EnsureMonitoringResourceWithSpecExistsInNamespace ¶
func EnsureMonitoringResourceWithSpecExistsInNamespace( ctx context.Context, k8sClient client.Client, spec dash0v1alpha1.Dash0MonitoringSpec, namespacesName types.NamespacedName, ) *dash0v1alpha1.Dash0Monitoring
func EnsureMonitoringResourceWithSpecExistsInNamespaceAndIsAvailable ¶
func EnsureMonitoringResourceWithSpecExistsInNamespaceAndIsAvailable( ctx context.Context, k8sClient client.Client, spec dash0v1alpha1.Dash0MonitoringSpec, namespacesName types.NamespacedName, ) *dash0v1alpha1.Dash0Monitoring
func EnsureNamespaceExists ¶
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 ExportToPrt ¶
func ExportToPrt(export dash0v1alpha1.Export) *dash0v1alpha1.Export
func GetCronJob ¶
func GetDaemonSet ¶
func GetDeployment ¶
func GetDeploymentEventually ¶
func GetOTelColDaemonSet ¶
func GetOTelColDeployment ¶
func GetReplicaSet ¶
func GetStatefulSet ¶
func GrpcExportTest ¶
func GrpcExportTest() dash0v1alpha1.Export
func HttpExportTest ¶
func HttpExportTest() dash0v1alpha1.Export
func InstrumentedDaemonSet ¶
func InstrumentedDeployment ¶
func InstrumentedDeployment(namespace string, name string) *appsv1.Deployment
func InstrumentedDeploymentWithMoreBellsAndWhistles ¶
func InstrumentedDeploymentWithMoreBellsAndWhistles(namespace string, name string) *appsv1.Deployment
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 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 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 MatchVolumeMount ¶
func MatchVolumeMount(name string, mountPath string, args ...interface{}) gomega.OmegaMatcher
func RemoveLabel ¶
func RemoveLabel(meta *metav1.ObjectMeta, key 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 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 VerifyAllResourcesExist ¶
func VerifyDeploymentWithOptOutLabel ¶
func VerifyDeploymentWithOptOutLabel(resource *appsv1.Deployment)
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 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 VerifyNoEvents ¶
func VerifyNoEvents( ctx context.Context, clientset *kubernetes.Clientset, namespace string, )
func VerifyReplicaSetWithOptOutLabel ¶
func VerifyReplicaSetWithOptOutLabel(resource *appsv1.ReplicaSet)
func VerifyResourceExists ¶
func VerifyRevertedDeployment ¶
func VerifyRevertedDeployment(resource *appsv1.Deployment, expectations PodSpecExpectations)
func VerifyStatefulSetWithOptOutLabel ¶
func VerifyStatefulSetWithOptOutLabel(resource *appsv1.StatefulSet)
func VerifyUnmodifiedCronJob ¶
func VerifyUnmodifiedDeployment ¶
func VerifyUnmodifiedDeployment(resource *appsv1.Deployment)
func VerifyUnmodifiedDeploymentEventually ¶
func VerifyUnmodifiedDeploymentEventually(g Gomega, resource *appsv1.Deployment)
func VerifyUnmodifiedJob ¶
func VerifyUnmodifiedPod ¶
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 WrapConfigureDeploymentFnAsTestableWorkload ¶
func WrapConfigureDeploymentFnAsTestableWorkload( fn func(string, string) *appsv1.Deployment, ) 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 Dash0NodeIpIdx int Dash0CollectorBaseUrlEnvVarIdx int Dash0CollectorBaseUrlEnvVarExpectedValue string OtelExporterOtlpEndpointEnvVarIdx int OtelExporterOtlpEndpointEnvVarExpectedValue string Dash0NamespaceNameEnvVarIdx int Dash0PodNameEnvVarIdx int Dash0PodUidEnvVarIdx int Dash0ContainerNameEnvVarIdx int Dash0ContainerNameEnvVarExpectedValue string }
type CronJobTestableWorkload ¶
type CronJobTestableWorkload struct {
// contains filtered or unexported fields
}
func (CronJobTestableWorkload) Get ¶
func (w CronJobTestableWorkload) Get() client.Object
func (CronJobTestableWorkload) GetObjectMeta ¶
func (w CronJobTestableWorkload) GetObjectMeta() *metav1.ObjectMeta
type DaemonSetTestableWorkload ¶
type DaemonSetTestableWorkload struct {
// contains filtered or unexported fields
}
func (DaemonSetTestableWorkload) Get ¶
func (w DaemonSetTestableWorkload) Get() client.Object
func (DaemonSetTestableWorkload) GetObjectMeta ¶
func (w DaemonSetTestableWorkload) GetObjectMeta() *metav1.ObjectMeta
type DeploymentTestableWorkload ¶
type DeploymentTestableWorkload struct {
// contains filtered or unexported fields
}
func (DeploymentTestableWorkload) Get ¶
func (w DeploymentTestableWorkload) Get() client.Object
func (DeploymentTestableWorkload) GetObjectMeta ¶
func (w DeploymentTestableWorkload) GetObjectMeta() *metav1.ObjectMeta
type JobTestableWorkload ¶
type JobTestableWorkload struct {
// contains filtered or unexported fields
}
func (JobTestableWorkload) Get ¶
func (w JobTestableWorkload) Get() client.Object
func (JobTestableWorkload) GetObjectMeta ¶
func (w JobTestableWorkload) GetObjectMeta() *metav1.ObjectMeta
type MatchEnvVarMatcher ¶
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 ¶
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 (w PodTestableWorkload) Get() client.Object
func (PodTestableWorkload) GetObjectMeta ¶
func (w PodTestableWorkload) GetObjectMeta() *metav1.ObjectMeta
type ReplicaSetTestableWorkload ¶
type ReplicaSetTestableWorkload struct {
// contains filtered or unexported fields
}
func (ReplicaSetTestableWorkload) Get ¶
func (w ReplicaSetTestableWorkload) Get() client.Object
func (ReplicaSetTestableWorkload) GetObjectMeta ¶
func (w ReplicaSetTestableWorkload) GetObjectMeta() *metav1.ObjectMeta
type StatefulSetTestableWorkload ¶
type StatefulSetTestableWorkload struct {
// contains filtered or unexported fields
}
func (StatefulSetTestableWorkload) Get ¶
func (w StatefulSetTestableWorkload) Get() client.Object
func (StatefulSetTestableWorkload) GetObjectMeta ¶
func (w StatefulSetTestableWorkload) GetObjectMeta() *metav1.ObjectMeta
type TestableWorkload ¶
type TestableWorkload interface { Get() client.Object GetObjectMeta() *metav1.ObjectMeta }
type VerifyOpts ¶
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) }
Click to show internal directories.
Click to hide internal directories.