From 822c202727eb4ffb07441db9eca599f23b747623 Mon Sep 17 00:00:00 2001 From: Bhavye Sharma Date: Wed, 3 Jan 2024 15:10:36 -0800 Subject: [PATCH 01/20] version bump kube 1_28 --- .../index.ts | 4 ++-- .../index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts index 1634ee09..89dddf23 100644 --- a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts +++ b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts @@ -39,7 +39,7 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct { // Define fargate cluster provider and pass the profile options const fargateClusterProvider : blueprints.FargateClusterProvider = new blueprints.FargateClusterProvider({ fargateProfiles, - version: eks.KubernetesVersion.of("1.27") + version: eks.KubernetesVersion.of("1.28") }); const certManagerAddOnProps : blueprints.CertManagerAddOnProps = { @@ -50,7 +50,7 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct { }; const coreDnsAddOnProps : blueprints.CoreDnsAddOnProps = { - version:"v1.10.1-eksbuild.1", + version:"auto", configurationValues:{ computeType: "Fargate" } diff --git a/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts b/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts index 54553c1a..7ad0e60e 100644 --- a/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts +++ b/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts @@ -98,7 +98,7 @@ export default class SingleNewEksFargateOpenSourceObservabilityConstruct { const addOns: Array = [ new blueprints.addons.VpcCniAddOn(), new blueprints.addons.CoreDnsAddOn({ - version: "v1.10.1-eksbuild.1", + version: "auto", configurationValues: { computeType: "Fargate" } }), new blueprints.addons.KubeProxyAddOn(), @@ -143,7 +143,7 @@ export default class SingleNewEksFargateOpenSourceObservabilityConstruct { // Define fargate cluster provider and pass the profile options const fargateClusterProvider: blueprints.FargateClusterProvider = new blueprints.FargateClusterProvider({ fargateProfiles, - version: eks.KubernetesVersion.of("1.27") + version: eks.KubernetesVersion.of("1.28") }); ObservabilityBuilder.builder() From ace52feb29aa6b65b5dc35b20b32549eca8ba7ec Mon Sep 17 00:00:00 2001 From: Bhavye Sharma Date: Wed, 3 Jan 2024 15:25:39 -0800 Subject: [PATCH 02/20] Explicit addon version for CoreDNS --- .../index.ts | 4 ++-- .../index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts index 89dddf23..d0d9aa8c 100644 --- a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts +++ b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts @@ -39,7 +39,7 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct { // Define fargate cluster provider and pass the profile options const fargateClusterProvider : blueprints.FargateClusterProvider = new blueprints.FargateClusterProvider({ fargateProfiles, - version: eks.KubernetesVersion.of("1.28") + version: eks.KubernetesVersion.of("auto") }); const certManagerAddOnProps : blueprints.CertManagerAddOnProps = { @@ -50,7 +50,7 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct { }; const coreDnsAddOnProps : blueprints.CoreDnsAddOnProps = { - version:"auto", + version:"v1.10.1-eksbuild.4", configurationValues:{ computeType: "Fargate" } diff --git a/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts b/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts index 7ad0e60e..52e9642b 100644 --- a/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts +++ b/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts @@ -98,7 +98,7 @@ export default class SingleNewEksFargateOpenSourceObservabilityConstruct { const addOns: Array = [ new blueprints.addons.VpcCniAddOn(), new blueprints.addons.CoreDnsAddOn({ - version: "auto", + version: "v1.10.1-eksbuild.4", configurationValues: { computeType: "Fargate" } }), new blueprints.addons.KubeProxyAddOn(), @@ -143,7 +143,7 @@ export default class SingleNewEksFargateOpenSourceObservabilityConstruct { // Define fargate cluster provider and pass the profile options const fargateClusterProvider: blueprints.FargateClusterProvider = new blueprints.FargateClusterProvider({ fargateProfiles, - version: eks.KubernetesVersion.of("1.28") + version: eks.KubernetesVersion.of("auto") }); ObservabilityBuilder.builder() From 6b3a6c084d76d10911d3a867ef107c68b0abd1b6 Mon Sep 17 00:00:00 2001 From: Bhavye Sharma Date: Wed, 3 Jan 2024 15:35:43 -0800 Subject: [PATCH 03/20] FargateClusterProvider needs eks.KubernetesVersion object --- .../index.ts | 2 +- .../index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts index d0d9aa8c..83d2ccc1 100644 --- a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts +++ b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts @@ -39,7 +39,7 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct { // Define fargate cluster provider and pass the profile options const fargateClusterProvider : blueprints.FargateClusterProvider = new blueprints.FargateClusterProvider({ fargateProfiles, - version: eks.KubernetesVersion.of("auto") + version: eks.KubernetesVersion.of("1.28") }); const certManagerAddOnProps : blueprints.CertManagerAddOnProps = { diff --git a/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts b/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts index 52e9642b..3a7e9bcd 100644 --- a/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts +++ b/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts @@ -143,7 +143,7 @@ export default class SingleNewEksFargateOpenSourceObservabilityConstruct { // Define fargate cluster provider and pass the profile options const fargateClusterProvider: blueprints.FargateClusterProvider = new blueprints.FargateClusterProvider({ fargateProfiles, - version: eks.KubernetesVersion.of("auto") + version: eks.KubernetesVersion.of("1.28") }); ObservabilityBuilder.builder() From 0439f03383d57c5526c4b96516258920f39c8b60 Mon Sep 17 00:00:00 2001 From: Bhavye Sharma Date: Thu, 4 Jan 2024 01:57:00 -0800 Subject: [PATCH 04/20] remove control plane logging for fargate patterns --- .../index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts index 83d2ccc1..ab587949 100644 --- a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts +++ b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts @@ -64,7 +64,6 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct { .withCertManagerProps(certManagerAddOnProps) .withCoreDnsProps(coreDnsAddOnProps) .enableFargatePatternAddOns() - .enableControlPlaneLogging() .clusterProvider(fargateClusterProvider) .addOns(...addOns) .build(scope, stackId); From a574485a627c136364309d686a871af69154d9a0 Mon Sep 17 00:00:00 2001 From: Arun Date: Wed, 24 Jan 2024 20:28:07 -0600 Subject: [PATCH 05/20] enable container logs collection for SingleNewEksOpenSourceobservabilityPattern --- .../resources/otel-collector-config.yml | 73 +++++++++++++++++++ .../index.ts | 22 +++++- 2 files changed, 91 insertions(+), 4 deletions(-) diff --git a/lib/common/resources/otel-collector-config.yml b/lib/common/resources/otel-collector-config.yml index 010dd42b..9992718a 100644 --- a/lib/common/resources/otel-collector-config.yml +++ b/lib/common/resources/otel-collector-config.yml @@ -1637,6 +1637,70 @@ spec: - source_labels: [ __name__ ] regex: 'jvm_gc_collection_seconds.*' action: drop + {{ start enableAdotContainerLogsCollection }} + filelog: + include: + - /var/log/pods/*/*/*.log + include_file_name: false + include_file_path: true + operators: + - id: get-format + routes: + - expr: body matches "^\\{" + output: parser-docker + - expr: body matches "^[^ Z]+ " + output: parser-crio + - expr: body matches "^[^ Z]+Z" + output: parser-containerd + type: router + - id: parser-crio + output: extract_metadata_from_filepath + regex: ^(?P