apiVersion: apps/v1
kind: Deployment
metadata:
  name: pem-devicearchivewriter-deployment
  namespace: default
  labels: 
     app: nuviot
     tier: pem-modules
spec:
  replicas: 1     
  selector:
    matchLabels:
      app: nuviot
      tier: pem-modules
  template:
    metadata:
      labels:
        app: nuviot
        tier: pem-modules
        module: devicearchivewriter
      annotations:
        prometheus.io/scrape: 'true'
        prometheus.io/path:   /metrics
        prometheus.io/port:   '80'        
    
    spec:
      containers:
      - name: pem_devicearchivewriter
        image: nuviot/pem-devicearchivewriter:v1.6.592.1528
        env:
          - name: AccessKey
            valueFrom: 
              secretKeyRef:
                name: instance-secrets
                key: AccessKey
        envFrom:
          - configMapRef:
              name: instance-settings
        ports:
        - containerPort: 80
      imagePullSecrets:
      - name: docker-repo-secret       
