apiVersion: apps/v1
kind: Deployment
metadata:
  name: earthquake-notifications
  labels:
    app.kubernetes.io/name: earthquake-notifications
    app.kubernetes.io/instance: earthquake-notifications
    app.kubernetes.io/managed-by: Manual
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: earthquake-notifications
      app.kubernetes.io/instance: earthquake-notifications
  template:
    metadata:
      labels:
        app.kubernetes.io/name: earthquake-notifications
        app.kubernetes.io/instance: earthquake-notifications
    spec:
      containers:
      - name: earthquake-notifications
        image: gcr.io/beneath/earthquake-notifications:latest
        imagePullPolicy: Always
        env:
        - name: BENEATH_SECRET
          valueFrom:
            secretKeyRef:
              name: earthquake-notifications
              key: secret
        - name: TWILIO_ACCOUNT_ID
          valueFrom:
            secretKeyRef:
              name: earthquake-notifications
              key: twilio_account_id
        - name: TWILIO_AUTH_TOKEN
          valueFrom:
            secretKeyRef:
              name: earthquake-notifications
              key: twilio_auth_token
        - name: TWILIO_FROM_PHONE_NUMBER
          valueFrom:
            secretKeyRef:
              name: earthquake-notifications
              key: twilio_from_phone_number
        - name: TO_PHONE_NUMBER
          valueFrom:
            secretKeyRef:
              name: earthquake-notifications
              key: to_phone_number
