apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  labels:
    service: terra-001
  name: terra-001
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      service: terra-001
  replicas: 1
  template:
    metadata:
      labels:
        service: terra-001
    spec:
      containers:
        - name: terra-001
          image: ryanhendricks/docker-terra:latest
          imagePullPolicy: Always
          envFrom:
            - configMapRef:
                name: terra-config
          volumeMounts:
            - mountPath: /.terrad
              name: terra-001
          resources:
            requests:
              cpu: 800m
              memory: 2Gi
            limits:
              cpu: 1200m
              memory: 3Gi
      restartPolicy: Always
      volumes:
        - name: terra-001
          persistentVolumeClaim:
            claimName: terra-001
