apiVersion: apps/v1
kind: Deployment
metadata:
  name: pushgateway
  namespace: foxhunt
  labels:
    app.kubernetes.io/name: pushgateway
    app.kubernetes.io/part-of: monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: pushgateway
  template:
    metadata:
      labels:
        app.kubernetes.io/name: pushgateway
    spec:
      nodeSelector:
        k8s.scaleway.com/pool-name: infra
      containers:
        - name: pushgateway
          image: prom/pushgateway:v1.11.0
          args:
            - "--persistence.interval=5m"
          ports:
            - containerPort: 9091
              name: http
          resources:
            requests:
              cpu: 50m
              memory: 32Mi
            limits:
              cpu: 200m
              memory: 128Mi
          livenessProbe:
            httpGet:
              path: /-/healthy
              port: 9091
            initialDelaySeconds: 5
          readinessProbe:
            httpGet:
              path: /-/ready
              port: 9091
            initialDelaySeconds: 5
---
apiVersion: v1
kind: Service
metadata:
  name: pushgateway
  namespace: foxhunt
  labels:
    app.kubernetes.io/name: pushgateway
spec:
  type: ClusterIP
  ports:
    - port: 9091
      targetPort: 9091
      name: http
  selector:
    app.kubernetes.io/name: pushgateway
