apiVersion: apps/v1
kind: Deployment
metadata:
  name: metrics-service
  namespace: system
  labels:
    app.kubernetes.io/name: metrics-service
    app.kubernetes.io/part-of: container-mom-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: metrics-service
  template:
    metadata:
      labels:
        app.kubernetes.io/name: metrics-service
    spec:
      serviceAccountName: controller-manager
      containers:
      - name: metrics-service
        image: container-mom/metrics-service:latest
        resources:
          requests:
            cpu: "200m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        ports:
        - containerPort: 8080
          name: http
        env:
        - name: OTEL_EXPORTER_OTLP_ENDPOINT
          value: "http://otel-collector.monitoring:4317"
---
apiVersion: v1
kind: Service
metadata:
  name: metrics-service
  namespace: system
  labels:
    app.kubernetes.io/name: metrics-service
    app.kubernetes.io/part-of: container-mom-operator
spec:
  selector:
    app.kubernetes.io/name: metrics-service
  ports:
  - port: 8080
    targetPort: http
    name: http
