---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: metrics-pump
  namespace: monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app: metrics-pump
  template:
    metadata:
      labels:
        app: metrics-pump
    spec:
      serviceAccountName: metrics-pump
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534 # nobody
      containers:
      - name: metrics-pump
        image: localhost:5001/write-metrics:dev
        imagePullPolicy: Always
        args:
        - /emit-metrics.py
        - --dest
        - prometheus.monitoring.svc:9091
        - --all
        resources:
          limits:
            cpu: 200m
            memory: 1000Mi
          requests:
            cpu: 50m
            memory: 500Mi
