Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions charts/operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ spec:
labels: {{- include "operator.selectorLabels" . | nindent 8 }}
annotations:
kubectl.kubernetes.io/default-container: manager
{{- if and .Values.metrics.enabled .Values.metrics.podScrapeAnnotations }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.metrics.port | quote }}
prometheus.io/path: "/metrics"
{{- end }}
spec:
serviceAccountName: {{ include "operator.serviceAccountName" . }}
priorityClassName: {{ .Values.priorityClassName }}
Expand Down
8 changes: 8 additions & 0 deletions charts/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ metrics:
type: ClusterIP
serviceMonitor:
enabled: true
# Pod-level prometheus.io scrape annotations. The EKS clusters scrape with the
# Grafana Agent (→ Amazon Managed Prometheus) by pod annotation, with no
# prometheus-operator — so the ServiceMonitor above is consumed only on
# kube-prometheus-stack clusters (kx). These annotations make the operator's
# controller-runtime reconcile metrics reach AMP in prod. The operator
# NetworkPolicy already allows scrape from the monitoring namespace (where the
# Grafana Agent runs).
podScrapeAnnotations: true

resources:
requests:
Expand Down
Loading