# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
  name: dynamo-frontend-metrics
  namespace: ${NAMESPACE}
spec:
  selector:
    matchLabels:
      nvidia.com/metrics-enabled: "true"
      nvidia.com/dynamo-component-type: "frontend"
  podMetricsEndpoints:
    - port: http
      path: /metrics
      interval: 5s
      relabelings:
      - action: replace
        sourceLabels:
        - __meta_kubernetes_pod_label_nvidia_com_dynamo_namespace
        targetLabel: dynamo_namespace
  namespaceSelector:
    matchNames:
      - ${NAMESPACE}
