Skip to content

Commit 028a408

Browse files
Merge helm-per-node-allocation (aws-observability#330) into helm-crd-bundling
Re-sync aws-observability#331 onto aws-observability#330 so the stack is linear (aws-observability#329 -> aws-observability#330 -> aws-observability#331): inherit the per-node allocationStrategy scoping/gating, the SM/PM node-stamping removal, and the context-aware allocationStrategy default, on top of aws-observability#331's CRD bundling.
2 parents 1a46b3f + c626240 commit 028a408

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

charts/amazon-cloudwatch-observability/templates/linux/_otel-container-insights-config.tpl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -863,18 +863,11 @@ service:
863863
{{- if or .Values.otelContainerInsights.serviceMonitor.enabled .Values.otelContainerInsights.podMonitor.enabled }}
864864
metrics/cw_k8s_ci_v0_prometheuscr:
865865
receivers: [prometheus/cw_k8s_ci_v0_prometheuscr]
866-
# Phase 1 base chain + node enrichment: set_node_name/promote_node_name stamp
867-
# resource.attributes["k8s.node.name"] = the scraping agent's own node
868-
# (${env:K8S_NODE_NAME}). Combined with the target_node label from the SM/PM
869-
# relabeling, this lets per-node allocation be verified end-to-end (target_node
870-
# must equal k8s.node.name). Also satisfies the roadmap's node-enrichment goal.
871866
processors:
872867
- filter/cw_k8s_ci_v0_scrape_metadata
873868
- metricstarttime/cw_k8s_ci_v0
874869
- transform/cw_k8s_ci_v0_set_cluster_name
875870
- transform/cw_k8s_ci_v0_set_scope_prometheuscr
876-
- transform/cw_k8s_ci_v0_set_node_name
877-
- transform/cw_k8s_ci_v0_promote_node_name
878871
- resourcedetection/cw_k8s_ci_v0
879872
- batch/cw_k8s_ci_v0_metrics_dest
880873
exporters:

charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-custom-resource.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ spec:
132132
targetAllocator:
133133
enabled: true
134134
image: {{ template "target-allocator.image" (merge $agent.prometheus.targetAllocator.image (dict "region" $.Values.region)) }}
135-
allocationStrategy: {{ $agent.prometheus.targetAllocator.allocationStrategy | default "per-node" | quote }}
135+
allocationStrategy: {{ $agent.prometheus.targetAllocator.allocationStrategy | default (ternary "per-node" "consistent-hashing" $otelCIScrape) | quote }}
136136
{{- if or $agent.prometheus.targetAllocator.prometheusCR.enabled $otelCIScrape }}
137137
prometheusCR:
138138
enabled: true

charts/amazon-cloudwatch-observability/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,10 @@ agent:
791791
# agent on the same node (avoids cross-node/cross-AZ scrape traffic); targets
792792
# without a resolvable node fall back to consistent-hashing. "consistent-hashing"
793793
# spreads targets across all agents by hash.
794-
allocationStrategy: per-node
794+
# Unset: defaults to "per-node" on the otelContainerInsights scraping path and
795+
# "consistent-hashing" otherwise (so existing static-config Target Allocators
796+
# keep their prior behavior). Set explicitly to override.
797+
allocationStrategy: ""
795798
image:
796799
repository: cloudwatch-agent-target-allocator
797800
tag: 1.0.0

0 commit comments

Comments
 (0)