Skip to content

Feature/ksm enrichment and label preservation - #296

Merged
sky333999 merged 7 commits into
release-6.1.0from
feature/ksm-enrichment-and-label-preservation
Apr 16, 2026
Merged

sky333999 merged 7 commits into
release-6.1.0from
feature/ksm-enrichment-and-label-preservation

Conversation

@louisall

Copy link
Copy Markdown
Collaborator

Summary of Changes

5 commits, summary:

  1. eae536e β€” Add lease-based KSM node metadata enrichment
  • Added nodemetadatacache extension and nodemetadataenricher processor to cluster-scraper config β€” KSM node-scoped
    metrics (node, pod, container buckets) now get host.* and cloud.availability_zone attributes via Lease cache instead
    of requiring local resourcedetection
  • Added list/watch lease RBAC on agent role
  • Added cluster-scraper lease Role/RoleBinding for Lease read access
  1. 0bb60e0 β€” AGENTS.md updates
  • Documentation updates for lease enrichment changes
  1. 95abd31 β€” Add workload identity enrichment for KSM metrics
  • Added k8sattributes/pod, k8sattributes/node, transform/set_workload processors to KSM pipeline
  • KSM metrics now get k8s.workload.name/k8s.workload.type, k8s.node.label., k8s.pod.label., and specific workload
    type attrs (k8s.deployment.name, etc.)
  • Changed resourcedetection detector order to [eks, ec2]
  1. a5fb9b2 β€” Preserve raw Prometheus labels at datapoint scope
  • Across KSM, cAdvisor, and DCGM pipelines: raw Prometheus labels (pod, namespace, container, etc.) are now kept at
    both resource scope (as semconv names) and datapoint scope (copied back from resource.attributes after groupbyattrs)
    for dashboard compatibility
  • Removed all delete_key of raw labels from resource scope
  • Added OTEL_CI_VERSION env var to gate LeaseWriter
  • Consolidated cluster-scraper lease RBAC under shared agent role
  1. 769e8aa β€” AGENTS.md updates
  • Documentation for raw label preservation pattern and RBAC consolidation

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…config

- Add nodemetadatacache extension and nodemetadataenricher processor to
  cluster-scraper OTel config; insert enricher in KSM pipeline after
  resourcedetection to set per-node host.* and cloud.availability_zone
  from Lease cache
- Remove host.* delete_key statements from ksm_clean_resource (enricher
  now sets correct values)
- Add unconditional_removal_prefixes/keys to cluster-scraper
  awsattributelimit (parity with DaemonSet config for node label cleanup)
- Add namespace-scoped Lease Role/RoleBinding for cluster-scraper
  (get/list/watch) and Lease permissions for DaemonSet agent
  (get/create/update/delete)
…trics

  - Add k8sattributes processor to extract pod owner metadata (deployment,
    daemonset, statefulset, replicaset, job, cronjob)
  - Add transform processor to derive k8s.workload.name/type from owner refs
  - Promote object-level labels (deployment, daemonset, etc.) to OTel semconv
  - Extract pod labels and filter out high-cardinality template hashes
…esource attributes

  Raw Prometheus labels (pod, namespace, container, node, etc.) are now kept at
  both resource scope (as semconv names like k8s.pod.name) and datapoint scope
  (as original names like pod) for dashboard compatibility. Applied consistently
  across KSM, cAdvisor, DCGM, and node_exporter pipelines.

  Also:
  - Add list/watch lease RBAC for nodemetadatacache watcher
  - Add OTEL_CI_VERSION env var to gate LeaseWriter
  - Restore owner_name/owner_kind workload identity promotion for KSM
  - Change resourcedetection detector order to [eks, ec2]
  - Remove redundant cluster-scraper lease Role/RoleBinding
@sky333999
sky333999 merged commit 69ee400 into release-6.1.0 Apr 16, 2026
20 checks passed
@sky333999
sky333999 deleted the feature/ksm-enrichment-and-label-preservation branch April 16, 2026 17:29
mitali-salvi added a commit that referenced this pull request Jun 10, 2026
* Add OTEL Container Insights infrastructure (#282)

* Add v6.0.0 release notes

* Cluster-scraper deployment now uses cloudwatch-agent SA (cluster-scraper SA retained as dead resource)

* Bump chart version to 6.0.1 and add release notes

* Scope config-map permission for cloudwatch-agent to namespace only (#287)

* scope configmap permission to namesapce

* integ tests

* updates

* Retain configmap get permission at cluster scope (#291)

* Fix template whitespace control and hardcoded test names

- Use {{- if instead of {{ if in cloudwatch-agent-role.yaml and
  cloudwatch-agent-rolebinding.yaml to prevent leading blank lines
- Extract agentName constant in configmap_permission_scoping_test.go
  to replace hardcoded strings

* Keep configmaps get at cluster scope, scope create/update to namespace

- Add configmaps get-only rule to ClusterRole
- Narrow namespace-scoped Role to create and update only
- Update test assertions to match

* Run integration tests on PRs targeting release-* branches

* Set hostNetwork: true for default $.agent

* Feature/ksm enrichment and label preservation (#296)

* Fix agent.config bleed-through into cluster-scraper deployment (#298)

* Fix scrapeTimeout, add missing scrape_timeout, remove dead RBAC, cleanup docs and tests (#297)

* Add ClusterIP Service for node-exporter and use service DNS for scraping (#304)

* Refactor fluent-bit region-specific (isolated) config using tpl conditionals (#271)

* Pin GitHub Actions to commit SHAs (#306)

* minor fixes (#307)

* release v6.1.0

* Add LIS CSI metrics support to OTEL container insights config (#308)

Add prometheus receiver, scope transform, attribute promote transform,
and pipeline for local instance store CSI driver metrics collection,
mirroring the existing EBS CSI pattern. Scrapes pods with label
app=ec2-instance-store-plugin in kube-system namespace and promotes
instance_id and volume_id to resource attributes.

* feat(otel): Add k8sattributes processor node filter to daemonset (#311)

* fix(integration-test): include node-exporter-service in EKS resource counts (#312)

* Add OTEL-native Container Insights log pipelines (app, host) (#310)

* release v6.2.0

* Address PR review: use v0.18 CRD schema, add version bumps to release notes

---------

Co-authored-by: Louise Allen <147041218+louisall@users.noreply.github.com>
Co-authored-by: Kaushik Surya <kausyas@amazon.com>
Co-authored-by: Kaushik Surya <108111936+sky333999@users.noreply.github.com>
Co-authored-by: Petru Anica-Popa <66786772+petruanica@users.noreply.github.com>
Co-authored-by: Trey Richbourg <63218430+treyrichbourg@users.noreply.github.com>
Co-authored-by: POOJA REDDY NATHALA <poojardy@amazon.com>
Co-authored-by: Michael O'Neill <miconeil@amazon.com>
Co-authored-by: Mitali Salvi <mitsalvi@amazon.com>
vaishnavi-30-beep pushed a commit to vaishnavi-30-beep/helm-charts that referenced this pull request Jul 2, 2026
* Add OTEL Container Insights infrastructure (aws-observability#282)

* Add v6.0.0 release notes

* Cluster-scraper deployment now uses cloudwatch-agent SA (cluster-scraper SA retained as dead resource)

* Bump chart version to 6.0.1 and add release notes

* Scope config-map permission for cloudwatch-agent to namespace only (aws-observability#287)

* scope configmap permission to namesapce

* integ tests

* updates

* Retain configmap get permission at cluster scope (aws-observability#291)

* Fix template whitespace control and hardcoded test names

- Use {{- if instead of {{ if in cloudwatch-agent-role.yaml and
  cloudwatch-agent-rolebinding.yaml to prevent leading blank lines
- Extract agentName constant in configmap_permission_scoping_test.go
  to replace hardcoded strings

* Keep configmaps get at cluster scope, scope create/update to namespace

- Add configmaps get-only rule to ClusterRole
- Narrow namespace-scoped Role to create and update only
- Update test assertions to match

* Run integration tests on PRs targeting release-* branches

* Set hostNetwork: true for default $.agent

* Feature/ksm enrichment and label preservation (aws-observability#296)

* Fix agent.config bleed-through into cluster-scraper deployment (aws-observability#298)

* Fix scrapeTimeout, add missing scrape_timeout, remove dead RBAC, cleanup docs and tests (aws-observability#297)

* Add ClusterIP Service for node-exporter and use service DNS for scraping (aws-observability#304)

* Refactor fluent-bit region-specific (isolated) config using tpl conditionals (aws-observability#271)

* Pin GitHub Actions to commit SHAs (aws-observability#306)

* minor fixes (aws-observability#307)

* release v6.1.0

* Add LIS CSI metrics support to OTEL container insights config (aws-observability#308)

Add prometheus receiver, scope transform, attribute promote transform,
and pipeline for local instance store CSI driver metrics collection,
mirroring the existing EBS CSI pattern. Scrapes pods with label
app=ec2-instance-store-plugin in kube-system namespace and promotes
instance_id and volume_id to resource attributes.

* feat(otel): Add k8sattributes processor node filter to daemonset (aws-observability#311)

* fix(integration-test): include node-exporter-service in EKS resource counts (aws-observability#312)

* Add OTEL-native Container Insights log pipelines (app, host) (aws-observability#310)

* release v6.2.0

* Address PR review: use v0.18 CRD schema, add version bumps to release notes

---------

Co-authored-by: Louise Allen <147041218+louisall@users.noreply.github.com>
Co-authored-by: Kaushik Surya <kausyas@amazon.com>
Co-authored-by: Kaushik Surya <108111936+sky333999@users.noreply.github.com>
Co-authored-by: Petru Anica-Popa <66786772+petruanica@users.noreply.github.com>
Co-authored-by: Trey Richbourg <63218430+treyrichbourg@users.noreply.github.com>
Co-authored-by: POOJA REDDY NATHALA <poojardy@amazon.com>
Co-authored-by: Michael O'Neill <miconeil@amazon.com>
Co-authored-by: Mitali Salvi <mitsalvi@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants