apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: solaredge-prometheus-exporter
    version: latest
  name: solaredge-prometheus-exporter
  namespace: solaredge
spec:
  replicas: 1
  selector:
    matchLabels:
      app: solaredge-prometheus-exporter
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        prometheus.io/path: /metrics
        prometheus.io/port: '8080'
        prometheus.io/scrape-slow: 'true'
      labels:
        app: solaredge-prometheus-exporter
        version: latest
      name: solaredge-prometheus-exporter
    spec:
      containers:
        - env:
            - name: API_KEY
              value: PUT_YOUR_KEY_HERE
            - name: TZ
              value: America/Los_Angeles
          image: 'chrisjohnson00/solaredge-prometheus-exporter:latest'
          imagePullPolicy: IfNotPresent
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: http
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          name: solaredge-prometheus-exporter
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: http
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 100m
              memory: 100Mi
            requests:
              cpu: 20m
              memory: 60Mi
