apiVersion: apps/v1
kind: Deployment
metadata:
  name: reddit-coronavirus-posts
  labels:
    app.kubernetes.io/name: reddit-coronavirus-posts
    app.kubernetes.io/instance: reddit-coronavirus-posts
    app.kubernetes.io/managed-by: Manual
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: reddit-coronavirus-posts
      app.kubernetes.io/instance: reddit-coronavirus-posts
  template:
    metadata:
      labels:
        app.kubernetes.io/name: reddit-coronavirus-posts
        app.kubernetes.io/instance: reddit-coronavirus-posts
    spec:
      containers:
      - name: reddit-coronavirus-posts
        image: gcr.io/beneath/reddit-coronavirus-posts:latest
        imagePullPolicy: Always
        env:
          - name: BENEATH_SECRET
            valueFrom:
              secretKeyRef:
                name: reddit-coronavirus-posts
                key: secret
          - name: REDDIT_CLIENT_SECRET
            valueFrom:
              secretKeyRef:
                name: reddit-client-secret
                key: secret
