apiVersion: apps/v1
kind: Deployment
metadata:
  name: pnoj-teller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pnoj-teller
  template:
    metadata:
      labels:
        app: pnoj-teller
    spec:
      containers:
      - image: pnoj/teller:sha-d549f46 # Set this to the latest version
        name: pnojteller
        ports:
        - containerPort: 8000
        volumeMounts:
        - name: pnoj-teller-config
          mountPath: /app/config.py
          subPath: config.py
          readOnly: true
        env:
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
      volumes:
      - name: pnoj-teller-config
        secret:
          secretName: pnoj-teller-config
