Skip to content

Commit eb6ecf2

Browse files
committed
override gateway collector name
1 parent d68c7c6 commit eb6ecf2

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

deploy/helm/edot-collector/kube-stack/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ collectors:
525525
# Gateway is a K8s deployment EDOT collector focused on processing and
526526
# forwarding telemetry to an Elasticsearch endpoint.
527527
gateway:
528+
fullnameOverride: "opentelemetry-kube-stack-gateway"
528529
resources:
529530
limits:
530531
cpu: 1500m

testing/integration/otel_helm_test.go

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ func TestOtelKubeStackHelm(t *testing.T) {
8484
// - Two Gateway pods to collect, aggregate and forward
8585
// telemetry.
8686
k8sStepCheckRunningPods("app.kubernetes.io/managed-by=opentelemetry-operator", 4, "otc-container"),
87+
// validate kubeletstats metrics are being
88+
// pushed
89+
k8sStepCheckDatastreamsHits(info, "metrics", "kubeletstatsreceiver.otel", "default"),
8790
},
8891
},
8992
{
@@ -287,18 +290,20 @@ func k8sStepCheckRunningPods(podLabelSelector string, expectedPodNumber int, con
287290
func k8sStepCheckDatastreamsHits(info *define.Info, dsType, dataset, namespace string) k8sTestStep {
288291
datastream := fmt.Sprintf("%s-%s-%s", dsType, dataset, namespace)
289292
return func(t *testing.T, ctx context.Context, kCtx k8sContext, namespace string) {
290-
var initDocumentHits estools.Hits
291-
require.Eventually(t, func() bool {
293+
var initDocumentHits int
294+
getTotalDocs := func(t *testing.T) int {
292295
docs, err := estools.GetLogsForDatastream(ctx, info.ESClient, dsType, dataset, namespace)
293296
require.NoError(t, err, "failed to get %s datastream documents", datastream)
294-
initDocumentHits = docs.Hits
295-
return docs.Hits.Total.Value > 0
297+
return docs.Hits.Total.Value
298+
}
299+
300+
require.Eventually(t, func() bool {
301+
initDocumentHits = getTotalDocs(t)
302+
return initDocumentHits > 0
296303
}, 5*time.Minute, 10*time.Second, fmt.Sprintf("at least one document should be available for %s datastream", datastream))
297304

298305
require.Eventually(t, func() bool {
299-
docs, err := estools.GetLogsForDatastream(ctx, info.ESClient, dsType, dataset, namespace)
300-
require.NoError(t, err, "failed to get %s datastream documents", datastream)
301-
return docs.Hits.Total.Value > initDocumentHits.Total.Value
306+
return getTotalDocs(t) > initDocumentHits
302307
}, 5*time.Minute, 10*time.Second, fmt.Sprintf("no new documents for %s datastream", datastream))
303308
}
304309
}

0 commit comments

Comments
 (0)