apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: arcgis-proxy
  name: arcgis-proxy
  namespace: gfw
spec:
  progressDeadlineSeconds: 2147483647
  replicas: 1
  revisionHistoryLimit: 0
  selector:
    matchLabels:
      name: arcgis-proxy
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: arcgis-proxy
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: type
                    operator: In
                    values:
                      - apps
      containers:
        - args:
            - start
          env:
            - name: PORT
              value: "5700"
            - name: ENVIRONMENT
              value: staging
            - name: LOCAL_URL
              value: http://arcgis-proxy.gfw.svc.cluster.local:5700
            - 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
          image: gfwdockerhub/arcgis-proxy
          imagePullPolicy: Always
          name: arcgis-proxy
          ports:
            - containerPort: 5700
              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
