---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: gnomad-blog
  labels:
    component: gnomad-blog
spec:
  replicas: 1
  selector:
    matchLabels:
      name: gnomad-blog
  template:
    metadata:
      labels:
        name: gnomad-blog
        component: gnomad-blog
    spec:
      containers:
        - name: web
          image: gnomad-blog
          env:
            - name: PROXY_IPS
              valueFrom:
                configMapKeyRef:
                  name: proxy-ips
                  key: ips
          resources:
            requests:
              cpu: 100m
              memory: 25Mi
          readinessProbe:
            httpGet:
              path: /health/ready
              port: http
            initialDelaySeconds: 3
            periodSeconds: 30
          ports:
            - name: http
              containerPort: 80
        - name: auth
          image: gnomad-blog-auth
          env:
            - name: OAUTH_CLIENT_ID
              valueFrom:
                secretKeyRef:
                  name: blog-oauth-secrets
                  key: client-id
            - name: OAUTH_CLIENT_SECRET
              valueFrom:
                secretKeyRef:
                  name: blog-oauth-secrets
                  key: client-secret
          resources:
            requests:
              cpu: 100m
              memory: 25Mi
      nodeSelector:
        cloud.google.com/gke-nodepool: 'default-pool'
