File tree Expand file tree Collapse file tree
charts/amazon-cloudwatch-observability Expand file tree Collapse file tree Original file line number Diff line number Diff 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:
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments