apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: devops
  name: prometheus-pushgateway
spec:
  replicas: 1
  selector:
    matchLabels:
      app: prometheus-pushgateway
  template:
    metadata:
      labels:
        app: prometheus-pushgateway
    spec:
      terminationGracePeriodSeconds: 10
      containers:
      - name: prometheus-pushgateway
        image: prom/pushgateway:v1.2.0
        imagePullPolicy: Always
#        command:
#          - "/bin/sh"
#          - "-c"
#          - >
#            while true; do echo "demo `if [ -f /mnt/dmeo/demo/test_dmeo_template_status.txt ]; then echo 0; else echo 1; fi `"| curl --data-binary @- http://prom-pushgateway:9091/metrics/job/demo; sleep 60; done
        securityContext:
          privileged: true
        ports:
         - name: web
           containerPort: 9091
#        resources:
#          requests:
#            cpu: 500m
#            memory: 2Gi
#          limits:
#            cpu: 1000m
#            memory: 2Gi
#        volumeMounts:
#        - name: dmeo-volume
#          mountPath: /mnt/dmeo
#          subPath: dmeo
#        - name: prom-exporter-configmap-volume
#          mountPath: /etc/script-exporter/script-exporter.yml
#          subPath: script-exporter.yml
#      volumes:
#      - name: dmeo-volume
#        persistentVolumeClaim:
#          claimName: dmeo-nfs-pvc
#      - name: prom-exporter-configmap-volume
#        configmap:
#          name: prom-exporter-configmap
