apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: analysis-gee
  name: analysis-gee
  namespace: gfw
spec:
  progressDeadlineSeconds: 2147483647
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      name: analysis-gee
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: analysis-gee
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: type
                operator: In
                values:
                - gfw
      containers:
      - args:
        - start
        env:
        - name: PORT
          value: "4500"
        - name: ENVIRONMENT
          value: prod
        - name: LOCAL_URL
          value: http://analysis-gee.gfw.svc.cluster.local:4500
        - name: CT_URL
          valueFrom:
            secretKeyRef:
              key: CT_URL
              name: mssecrets
        - name: CT_TOKEN
          valueFrom:
            secretKeyRef:
              key: CT_TOKEN
              name: mssecrets
        - name: CT_REGISTER_MODE
          valueFrom:
            secretKeyRef:
              key: CT_REGISTER_MODE
              name: mssecrets
        - name: API_VERSION
          valueFrom:
            secretKeyRef:
              key: API_VERSION
              name: mssecrets
        - name: EE_PRIVATE_KEY
          valueFrom:
            secretKeyRef:
              key: EE_PRIVATE_KEY
              name: mssecrets
        - name: EE_ACCOUNT
          valueFrom:
            secretKeyRef:
              key: EE_ACCOUNT
              name: mssecrets
        - name: REDIS_URL
          value: redis://localhost:6379
        image: gfwdockerhub/analysis-gee
        imagePullPolicy: Always
        name: analysis-gee
        ports:
        - containerPort: 4500
          protocol: TCP
        resources:
          limits:
            memory: 512Mi
          requests:
            memory: 128Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      - image: redis
        imagePullPolicy: Always
        name: redis
        ports:
        - containerPort: 6379
          protocol: TCP
        resources:
          requests:
            cpu: "0"
            memory: "0"
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name: regcred
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
status: {}
