apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
  annotations:
    lookit-env-vars: "injected"
    wait-for-gcloud-sqlproxy: "true"
spec:
  selector:
    matchLabels: {}
  template:
    spec:
      initContainers: []
      containers:
      - name: uwsgi
        image: lookit
        imagePullPolicy: IfNotPresent
        command:
        - uwsgi
        - --ini
        - /etc/uwsgi/uwsgi.ini
        env: []
        ports:
        - containerPort: 5000
          name: wsgi
          protocol: TCP
        - containerPort: 8080
          name: http
          protocol: TCP
        - containerPort: 1717
          name: stats
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          tcpSocket:
            port: 5000
          timeoutSeconds: 1
        volumeMounts:
        - mountPath: /etc/uwsgi/uwsgi.ini
          name: config-volume
          readOnly: true
          subPath: uwsgi.ini
        - mountPath: /etc/googleAppCreds.json
          name: secret-volume
          readOnly: true
          subPath: googleAppCreds.json
      volumes:
      - name: static-volume
        emptyDir: {}
      - name: config-volume
        configMap:
          defaultMode: 420
          name: lookit-configmap
      - name: secret-volume
        secret:
          defaultMode: 420
          secretName: lookit-secrets
      - name: cloudsql-instance-credentials
        secret:
          defaultMode: 420
          secretName: cloudsql-instance-credentials
