---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: smt-reader
  namespace: home-automation
spec:
  replicas: 1
  revisionHistoryLimit: 0
  selector:
    matchLabels:
      app.kubernetes.io/name: smt-reader
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: smt-reader
      annotations:
        secret.reloader.stakater.com/reload: smt-reader-config
    spec:
      containers:
      - name: smt
        image: scadaguru/pysmtreader:latest
        resources:
          limits:
            memory: 128Mi
            cpu: 128m
        env:
        - name: TZ
          value: America/Chicago
        volumeMounts:
        - name: config-dir
          mountPath: /config
        - name: config
          mountPath: /config/config.yaml
          subPath: config.yaml
          readOnly: true
      volumes:
      - name: config
        secret:
          secretName: smt-reader-config
          defaultMode: 0400
          items:
          - key: config.yaml
            path: config.yaml
      - name: config-dir
        emptyDir: {}
