k8s/staging/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
name: forest-change
name: forest-change
namespace: gfw
spec:
progressDeadlineSeconds: 2147483647
replicas: 1
revisionHistoryLimit: 0
selector:
matchLabels:
name: forest-change
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
name: forest-change
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: type
operator: In
values:
- gfw
containers:
- args:
- start
env:
- name: PORT
value: "62000"
- name: ENVIRONMENT
value: staging
- name: LOCAL_URL
value: http://forest-change.gfw.svc.cluster.local:62000
- name: GATEWAY_URL
valueFrom:
secretKeyRef:
key: GATEWAY_URL
name: mssecrets
- name: MICROSERVICE_TOKEN
valueFrom:
secretKeyRef:
key: MICROSERVICE_TOKEN
name: mssecrets
- name: TERRAI_INDEX_ID
value: index_bb80312eb51448ad9252336408603591_1536262007962
- name: TERRAI_DATASET_ID
value: bb80312e-b514-48ad-9252-336408603591
- name: AWS_REGION
valueFrom:
secretKeyRef:
key: AWS_REGION
name: mssecrets
- name: REQUIRE_API_KEY
valueFrom:
secretKeyRef:
key: REQUIRE_API_KEY
name: mssecrets
image: gfwdockerhub/forest-change
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
port: 62000
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
port: 62000
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 5
name: forest-change
ports:
- containerPort: 62000
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