apiVersion: apps/v1
kind: Deployment
metadata:
  name: speedtest
  namespace: monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app: speedtest
  template:
    metadata:
      labels:
        app: speedtest
      annotations:
        metrics: enabled
        prometheus.io/scrape-slow: "true"
    spec:
      containers:
        - name: speedtest
          image: jraviles/prometheus_speedtest:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 9516
              name: metrics
              protocol: TCP
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: metrics
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          readinessProbe:
            failureThreshold: 1
            httpGet:
              path: /
              port: metrics
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 100m
              memory: 100Mi
            requests:
              cpu: 50m
              memory: 20Mi
