diff --git a/test/e2e/autoscale_test.go b/test/e2e/autoscale_test.go index a241ba675..2a65760b2 100644 --- a/test/e2e/autoscale_test.go +++ b/test/e2e/autoscale_test.go @@ -79,7 +79,7 @@ func (suite *AutoscaleTestSuite) TestAutoScaleCollector() { jaegerInstanceName := "simple-prod" jaegerInstance := getSimpleProd(jaegerInstanceName, namespace, cpuResourceLimit, memoryResourceLimit) - createAndWaitFor(jaegerInstance, jaegerInstanceName) + createAndWaitFor(jaegerInstance, jaegerInstanceName, false) defer undeployJaegerInstance(jaegerInstance) tracegen := createTracegenDeployment(jaegerInstanceName, namespace, tracegenDurationInMinutes, replicas) @@ -97,7 +97,7 @@ func (suite *AutoscaleTestSuite) TestAutoScaleIngester() { jaegerInstanceName := "simple-streaming" jaegerInstance := getSimpleStreaming(jaegerInstanceName, namespace) - createAndWaitFor(jaegerInstance, jaegerInstanceName) + createAndWaitFor(jaegerInstance, jaegerInstanceName, true) defer undeployJaegerInstance(jaegerInstance) tracegenReplicas := int32(1) @@ -107,13 +107,18 @@ func (suite *AutoscaleTestSuite) TestAutoScaleIngester() { waitUntilScales(jaegerInstanceName, "ingester") } -func createAndWaitFor(jaegerInstance *v1.Jaeger, jaegerInstanceName string) { +func createAndWaitFor(jaegerInstance *v1.Jaeger, jaegerInstanceName string, waitForIngester bool) { err := fw.Client.Create(context.TODO(), jaegerInstance, &framework.CleanupOptions{TestContext: ctx, Timeout: timeout, RetryInterval: retryInterval}) require.NoError(t, err, "Error deploying example Jaeger") err = e2eutil.WaitForDeployment(t, fw.KubeClient, namespace, jaegerInstanceName+"-collector", 1, retryInterval, timeout) require.NoError(t, err, "Error waiting for collector deployment") + if waitForIngester { + err = e2eutil.WaitForDeployment(t, fw.KubeClient, namespace, jaegerInstanceName+"-ingester", 1, retryInterval, timeout) + require.NoError(t, err, "Error waiting for collector deployment") + } + err = e2eutil.WaitForDeployment(t, fw.KubeClient, namespace, jaegerInstanceName+"-query", 1, retryInterval, timeout) require.NoError(t, err, "Error waiting for query deployment") logrus.Infof("Jaeger instance %s finished deploying in %s", jaegerInstanceName, namespace) @@ -162,9 +167,19 @@ func getSimpleStreaming(name, namespace string) *v1.Jaeger { collectorOptions := make(map[string]interface{}) collectorOptions["kafka.producer.topic"] = "jaeger-spans" collectorOptions["kafka.producer.brokers"] = kafkaClusterURL - collectorOptions["kafka.producer.batch-linger"] = "1s" - collectorOptions["kafka.producer.batch-size"] = "128000" - collectorOptions["kafka.producer.batch-max-messages"] = "100" + if !specifyOtelConfig { + collectorOptions["kafka.producer.batch-linger"] = "1s" + collectorOptions["kafka.producer.batch-size"] = "128000" + collectorOptions["kafka.producer.batch-max-messages"] = "100" + } + + ingesterOptions := make(map[string]interface{}) + ingesterOptions["kafka.consumer.topic"] = "jaeger-spans" + ingesterOptions["kafka.consumer.brokers"] = kafkaClusterURL + if !specifyOtelConfig { + ingesterOptions["ingester.parallelism"] = "6900" + ingesterOptions["ingester.deadlockInterval"] = 0 + } autoscale := true var minReplicas int32 = 1 @@ -193,12 +208,7 @@ func getSimpleStreaming(name, namespace string) *v1.Jaeger { }, }, }, - Options: v1.NewOptions(map[string]interface{}{ - "kafka.consumer.topic": "jaeger-spans", - "kafka.consumer.brokers": kafkaClusterURL, - "ingester.deadlockInterval": "0", - "ingester.parallelism": "6900", - }), + Options: v1.NewOptions(ingesterOptions), AutoScaleSpec: v1.AutoScaleSpec{ Autoscale: &autoscale, MinReplicas: &minReplicas, diff --git a/test/e2e/elasticsearch_test.go b/test/e2e/elasticsearch_test.go index 6ad61dfde..dbc484d80 100644 --- a/test/e2e/elasticsearch_test.go +++ b/test/e2e/elasticsearch_test.go @@ -188,9 +188,6 @@ func getJaegerSimpleProdWithServerUrls(name string) *v1.Jaeger { if specifyOtelImages { logrus.Infof("Using OTEL collector for %s", name) exampleJaeger.Spec.Collector.Image = otelCollectorImage - } - - if specifyOtelConfig { exampleJaeger.Spec.Collector.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14269")) } diff --git a/test/e2e/self_provisioned_elasticsearch_kafka_test.go b/test/e2e/self_provisioned_elasticsearch_kafka_test.go index a18c7b5bf..a5a840e85 100644 --- a/test/e2e/self_provisioned_elasticsearch_kafka_test.go +++ b/test/e2e/self_provisioned_elasticsearch_kafka_test.go @@ -148,11 +148,7 @@ func getJaegerSelfProvisionedESAndKafka(instanceName string) *v1.Jaeger { if specifyOtelImages { logrus.Infof("Using OTEL collector for %s", instanceName) jaegerInstance.Spec.Collector.Image = otelCollectorImage - } - - if specifyOtelConfig { jaegerInstance.Spec.Collector.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14269")) - } return jaegerInstance diff --git a/test/e2e/self_provisioned_elasticsearch_test.go b/test/e2e/self_provisioned_elasticsearch_test.go index cdaad69ee..0a49094dd 100644 --- a/test/e2e/self_provisioned_elasticsearch_test.go +++ b/test/e2e/self_provisioned_elasticsearch_test.go @@ -248,9 +248,6 @@ func getJaegerSimpleProd(instanceName string) *v1.Jaeger { if specifyOtelImages { logrus.Infof("Using OTEL collector for %s", instanceName) exampleJaeger.Spec.Collector.Image = otelCollectorImage - } - - if specifyOtelConfig { exampleJaeger.Spec.Collector.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14269")) } diff --git a/test/e2e/sidecar_test.go b/test/e2e/sidecar_test.go index cd5a8ccb1..0f0f25029 100644 --- a/test/e2e/sidecar_test.go +++ b/test/e2e/sidecar_test.go @@ -232,9 +232,7 @@ func createJaegerAgentAsSidecarInstance(name, namespace string) *v1.Jaeger { j.Spec.AllInOne.Image = otelAllInOneImage logrus.Infof("Using OTEL Agent for %s", name) j.Spec.Agent.Image = otelAgentImage - } - if specifyOtelConfig { j.Spec.AllInOne.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14269")) j.Spec.Agent.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14269")) } diff --git a/test/e2e/streaming_test.go b/test/e2e/streaming_test.go index 6017f3601..6edffb47b 100644 --- a/test/e2e/streaming_test.go +++ b/test/e2e/streaming_test.go @@ -209,9 +209,6 @@ func jaegerStreamingDefinition(namespace string, name string) *v1.Jaeger { j.Spec.Collector.Image = otelCollectorImage log.Infof("Using OTEL ingester for %s", name) j.Spec.Ingester.Image = otelIngesterImage - } - - if specifyOtelConfig { j.Spec.Collector.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14269")) j.Spec.Ingester.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14270")) } @@ -282,9 +279,7 @@ func jaegerStreamingDefinitionWithTLS(namespace string, name, kafkaUserName stri j.Spec.Collector.Image = otelCollectorImage log.Infof("Using OTEL ingester for %s", name) j.Spec.Ingester.Image = otelIngesterImage - } - if specifyOtelConfig { j.Spec.Collector.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14269")) j.Spec.Ingester.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14270")) } @@ -323,9 +318,7 @@ func jaegerAutoProvisionedDefinition(namespace string, name string) *v1.Jaeger { jaegerInstance.Spec.Collector.Image = otelCollectorImage log.Infof("Using OTEL ingester for %s", name) jaegerInstance.Spec.Ingester.Image = otelIngesterImage - } - if specifyOtelConfig { jaegerInstance.Spec.Collector.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14269")) jaegerInstance.Spec.Ingester.Config = v1.NewFreeForm(getOtelConfigForHealthCheckPort("14270")) }