resource-watch/proxy

View on GitHub
k8s/production/deployment.yaml

Summary

Maintainability
Test Coverage
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: proxy
  name: proxy
  namespace: prep
spec:
  progressDeadlineSeconds: 2147483647
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      name: proxy
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: proxy
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: type
                    operator: In
                    values:
                      - apps
      containers:
        - args:
            - start
          env:
            - name: PORT
              value: "5000"
            - name: NODE_ENV
              value: prod
            - name: NODE_PATH
              value: app/src
            - name: LOCAL_URL
              value: http://proxy.prep.svc.cluster.local:5000
            - name: GATEWAY_URL
              valueFrom:
                secretKeyRef:
                  key: GATEWAY_URL
                  name: mssecrets
            - name: MICROSERVICE_TOKEN
              valueFrom:
                secretKeyRef:
                  key: MICROSERVICE_TOKEN
                  name: mssecrets
            - name: URLS
              value: bhuvan5#http://bhuvan5.nrsc.gov.in,wris#http://59.179.19.250/ArcGIS/services/SubInfoSysLCC,snitcr-ign#http://geos.snitcr.go.cr/be/IGN_5/wms,snitcr-ceniga#http://18.191.99.184:8080/geoserver/wms
            - name: FASTLY_ENABLED
              valueFrom:
                secretKeyRef:
                  key: FASTLY_ENABLED
                  name: mssecrets
            - name: FASTLY_APIKEY
              valueFrom:
                secretKeyRef:
                  key: FASTLY_APIKEY
                  name: mssecrets
                  optional: true
            - name: FASTLY_SERVICEID
              valueFrom:
                secretKeyRef:
                  key: FASTLY_SERVICEID
                  name: mssecrets
                  optional: true
            - name: AWS_REGION
              valueFrom:
                secretKeyRef:
                  key: AWS_REGION
                  name: mssecrets
            - name: REQUIRE_API_KEY
              valueFrom:
                secretKeyRef:
                  key: REQUIRE_API_KEY
                  name: mssecrets
          image: gfwdockerhub/proxy
          imagePullPolicy: Always
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /healthcheck
              port: 5000
              scheme: HTTP
            initialDelaySeconds: 30
            periodSeconds: 15
            successThreshold: 1
            timeoutSeconds: 5
          name: proxy
          ports:
            - containerPort: 5000
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /healthcheck
              port: 5000
              scheme: HTTP
            initialDelaySeconds: 30
            periodSeconds: 15
            successThreshold: 1
            timeoutSeconds: 5
          resources:
            limits:
              cpu: "1"
              memory: 512M
            requests:
              cpu: 250m
              memory: 256M
          securityContext:
            privileged: true
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name: regcred
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: { }
      terminationGracePeriodSeconds: 30