resource-watch/gee-tiles

View on GitHub
k8s/production/deployment.yaml

Summary

Maintainability
Test Coverage
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: gee-tiles
  name: gee-tiles
spec:
  progressDeadlineSeconds: 2147483647
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      name: gee-tiles
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: gee-tiles
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: type
                operator: In
                values:
                - apps
      containers:
      - args:
        - start
        env:
        - name: PORT
          value: "5700"
        - name: ENVIRONMENT
          value: prod
        - name: LOGGER_LEVEL
          value: INFO
        - name: GATEWAY_URL
          valueFrom:
            secretKeyRef:
              key: GATEWAY_URL
              name: mssecrets
        - name: MICROSERVICE_TOKEN
          valueFrom:
            secretKeyRef:
              key: MICROSERVICE_TOKEN
              name: mssecrets
        - name: GCLOUD_STORAGE
          valueFrom:
            secretKeyRef:
              key: GCLOUD_BACKUPS_CREDENTIALS
              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
          valueFrom:
            secretKeyRef:
              key: GEE_TILES_REDIS_URI
              name: dbsecrets
        - name: GOOGLE_APPLICATION_CREDENTIALS
          value: /opt/geetiles/storage.json
        - name: AWS_REGION
          valueFrom:
            secretKeyRef:
              key: AWS_REGION
              name: mssecrets
        - name: REQUIRE_API_KEY
          valueFrom:
            secretKeyRef:
              key: REQUIRE_API_KEY
              name: mssecrets
        image: gfwdockerhub/gee-tiles
        imagePullPolicy: Always
        name: gee-tiles
        ports:
        - containerPort: 5700
          protocol: TCP
        resources:
          limits:
            cpu: "1"
            memory: 512M
          requests:
            cpu: 250m
            memory: 256M
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name: regcred
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30