kind: Deployment
apiVersion: apps/v1
metadata:
  name: verify-recaptcha
spec:
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
  selector:
    matchLabels:
      app: verify-recaptcha
  template:
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: cloud.google.com/gke-preemptible
                    operator: Exists
      containers:
        - name: verify-recaptcha
          image: gcr.io/com-seankhliao/verify-recaptcha:latest
          env:
            - name: ORIGINS
              value: https://seankhliao.com, https://com-seankhliao.web.app, https://com-seankhliao.firebaseapp.com
          envFrom:
            - secretRef:
                name: recaptcha
          ports:
            - containerPort: 8080
          resources:
            requests:
              cpu: 20m
              memory: 40Mi
            limits:
              cpu: 40m
              memory: 80Mi
