diff --git a/charts/amazon-cloudwatch-observability/templates/target-allocator-clusterrole.yaml b/charts/amazon-cloudwatch-observability/templates/target-allocator-clusterrole.yaml index 951e6e4e..55aa1748 100644 --- a/charts/amazon-cloudwatch-observability/templates/target-allocator-clusterrole.yaml +++ b/charts/amazon-cloudwatch-observability/templates/target-allocator-clusterrole.yaml @@ -26,6 +26,12 @@ rules: - apiGroups: [ "monitoring.coreos.com"] resources: ["podmonitors", "servicemonitors"] verbs: ["get", "list", "watch"] + # The Target Allocator watches the ServiceMonitor/PodMonitor CustomResourceDefinitions + # so it can start/stop each informer as the CRD appears or disappears, letting it + # run healthily regardless of whether the CRDs are installed (read-only, cluster-scoped). + - apiGroups: [ "apiextensions.k8s.io" ] + resources: ["customresourcedefinitions"] + verbs: ["get", "list", "watch"] {{- end }} {{- end }} ---