You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// AmazonCloudWatchAgentTargetAllocatorAllocationStrategyConsistentHashing targets will be consistently added to collectors, which allows a high-availability setup.
// Image indicates the container image to use for the OpenTelemetry TargetAllocator.
312
+
// +optional
313
+
Imagestring`json:"image,omitempty"`
314
+
// Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not.
315
+
// +optional
316
+
Enabledbool`json:"enabled,omitempty"`
317
+
// If specified, indicates the pod's scheduling constraints
318
+
// +optional
319
+
Affinity*v1.Affinity`json:"affinity,omitempty"`
320
+
// PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval.
321
+
// All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces.
warnings=append(warnings, fmt.Sprintf("The Amazon CloudWatch Agent mode is set to %s, we do not recommend enabling Target Allocator when not running as a StatefulSet", r.Spec.Mode))
175
+
}
176
+
177
+
// validate Prometheus config for target allocation
178
+
ifr.Spec.TargetAllocator.Enabled {
179
+
promConfigYaml, err:=r.Spec.Prometheus.Yaml()
180
+
iferr!=nil {
181
+
returnwarnings, fmt.Errorf("%s could not convert json to yaml", err)
0 commit comments