apiVersion: apps/v1
kind: Deployment
metadata:
  name: ea
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ea
  template:
    metadata:
      labels:
        name: ea
    spec:
      volumes:
        - name: google-cloud-key
          secret:
            secretName: service-accn-key
      containers:
        - name: ea
          image: ghcr.io/robtuley/rainchasers/ea:latest
          volumeMounts:
            - name: google-cloud-key
              mountPath: /var/secrets/google
          env:
            - name: GOOGLE_APPLICATION_CREDENTIALS
              value: /var/secrets/google/key.json
            - name: PROJECT_ID
              value: rainchasers
            - name: PUBSUB_TOPIC
              value: gauge
            - name: HONEYCOMB_API_KEY
              valueFrom:
                secretKeyRef:
                  name: honeycomb-writekey
                  key: key
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
