From 7ca1a856f85b370b3f7044e9d1fd1e6596bedd63 Mon Sep 17 00:00:00 2001 From: freschri <117075521+freschri@users.noreply.github.com> Date: Wed, 12 Jun 2024 12:28:02 +0100 Subject: [PATCH] kubecost changes prevent otel collector to deploy kubecost uses another index file but uses the same otel-collector-config.yaml, so we need to remove "{{ start kubecostJob }}", "{{ stop kubecostJob }}", for it to deploy successfully --- .../index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/single-new-eks-opensource-observability-pattern/index.ts b/lib/single-new-eks-opensource-observability-pattern/index.ts index 29b3402c..dfcb4652 100644 --- a/lib/single-new-eks-opensource-observability-pattern/index.ts +++ b/lib/single-new-eks-opensource-observability-pattern/index.ts @@ -92,7 +92,12 @@ export default class SingleNewEksOpenSourceobservabilityPattern { "{{ stop enableAdotContainerLogsExporter }}", jsonStringnew.context["adotcontainerlogs.pattern.enabled"] ); - console.log(doc); + doc = utils.changeTextBetweenTokens( + doc, + "{{ start kubecostJob }}", + "{{ stop kubecostJob }}", + false + ); fs.writeFileSync(__dirname + '/../common/resources/otel-collector-config-new.yml', doc); if (utils.valueFromContext(scope, "adotcollectormetrics.pattern.enabled", false)) { @@ -200,4 +205,4 @@ export default class SingleNewEksOpenSourceobservabilityPattern { .addOns(...addOns) .build(scope, stackId); } -} \ No newline at end of file +}