-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathfrontend.yaml
More file actions
137 lines (137 loc) · 4.26 KB
/
Copy pathfrontend.yaml
File metadata and controls
137 lines (137 loc) · 4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
apiVersion: v1
kind: Service
metadata:
name: frontend
spec:
ports:
- port: 3000
targetPort: 3000
name: http
selector:
app: frontend
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 1
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
annotations:
ad.datadoghq.com/frontend.logs: '[{"source": "nodejs", "auto_multi_line_detection":true}]'
spec:
volumes:
- name: apmsocketpath
hostPath:
path: /var/run/datadog/
- name: feature-flags-config
configMap:
name: feature-flags-config
initContainers:
- name: wait-for-backend
image: busybox
command: ['sh', '-c', 'until nc -z backend 4000; do echo waiting for backend; sleep 2; done;']
containers:
- name: frontend
image: ${REGISTRY_URL}/frontend:${SD_TAG}
ports:
- containerPort: 3000
command: ["npm", "run", "dev"]
env:
- name: NEXT_PUBLIC_ADS_ROUTE
valueFrom:
configMapKeyRef:
name: storedog-config
key: NEXT_PUBLIC_ADS_ROUTE
- name: NEXT_PUBLIC_DISCOUNTS_ROUTE
valueFrom:
configMapKeyRef:
name: storedog-config
key: NEXT_PUBLIC_DISCOUNTS_ROUTE
- name: NEXT_PUBLIC_DBM_ROUTE
valueFrom:
configMapKeyRef:
name: storedog-config
key: NEXT_PUBLIC_DBM_ROUTE
- name: NEXT_PUBLIC_FRONTEND_API_ROUTE
valueFrom:
configMapKeyRef:
name: storedog-config
key: NEXT_PUBLIC_FRONTEND_API_ROUTE
- name: NEXT_PUBLIC_SPREE_API_HOST
valueFrom:
configMapKeyRef:
name: storedog-config
key: NEXT_PUBLIC_SPREE_API_HOST
- name: NEXT_PUBLIC_SPREE_CLIENT_HOST
valueFrom:
configMapKeyRef:
name: storedog-config
key: NEXT_PUBLIC_SPREE_CLIENT_HOST
- name: NEXT_PUBLIC_SPREE_IMAGE_HOST
valueFrom:
configMapKeyRef:
name: storedog-config
key: NEXT_PUBLIC_SPREE_IMAGE_HOST
- name: NEXT_PUBLIC_SPREE_ALLOWED_IMAGE_DOMAIN
valueFrom:
configMapKeyRef:
name: storedog-config
key: NEXT_PUBLIC_SPREE_ALLOWED_IMAGE_DOMAIN
- name: NEXT_PUBLIC_DD_APPLICATION_ID
valueFrom:
secretKeyRef:
name: datadog-secret
key: dd_application_id
- name: NEXT_PUBLIC_DD_CLIENT_TOKEN
valueFrom:
secretKeyRef:
name: datadog-secret
key: dd_client_token
- name: DD_ENV
value: ${DD_ENV}
- name: DD_SERVICE
value: ${NEXT_PUBLIC_DD_SERVICE_FRONTEND}
- name: DD_VERSION
value: ${NEXT_PUBLIC_DD_VERSION_FRONTEND}
- name: DD_LOGS_INJECTION
value: "true"
- name: DD_RUNTIME_METRICS_ENABLED
value: "true"
- name: DD_PROFILING_ENABLED
value: "true"
- name: DD_PROFILING_ALLOCATION_ENABLED
value: "true"
- name: DD_PROFILING_TIMELINE_ENABLED
value: "true"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "2Gi"
volumeMounts:
- name: apmsocketpath
mountPath: /var/run/datadog
- name: feature-flags-config
mountPath: /app/featureFlags.config.json
subPath: featureFlags.config.json
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 180
periodSeconds: 20
failureThreshold: 5
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 120
periodSeconds: 20