k8s/production/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
name: graph-client
name: graph-client
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
name: graph-client
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
name: graph-client
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: type
operator: In
values:
- apps
containers:
- args:
- start
env:
- name: PORT
value: "4500"
- name: NODE_ENV
value: prod
- name: NODE_PATH
value: app/src
- name: LOCAL_URL
value: http://graph-client.default.svc.cluster.local:4500
- name: NEO4J_URI
valueFrom:
secretKeyRef:
key: NEO4J_URI
name: dbsecrets
- name: NEO4J_USER
valueFrom:
secretKeyRef:
key: NEO4J_USER
name: dbsecrets
- name: NEO4J_PASSWORD
valueFrom:
secretKeyRef:
key: NEO4J_PASSWORD
name: dbsecrets
- name: GATEWAY_URL
valueFrom:
secretKeyRef:
key: GATEWAY_URL
name: mssecrets
- name: MICROSERVICE_TOKEN
valueFrom:
secretKeyRef:
key: MICROSERVICE_TOKEN
name: mssecrets
- 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/graph-client
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
port: 4500
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 5
name: graph-client
ports:
- containerPort: 4500
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
port: 4500
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 5
resources:
requests:
cpu: "0.25"
memory: "256M"
limits:
cpu: "1"
memory: "512M"
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: regcred
restartPolicy: Always
schedulerName: default-scheduler
securityContext: { }
terminationGracePeriodSeconds: 30
status: { }