Skip to content

Commit 7b5874a

Browse files
nicknovitskiexpbot
authored andcommitted
Correction: Add _readiness_ probe for deploy downtime
Keep liveness probe just in case. fbshipit-source-id: 0768e85
1 parent e48bb4e commit 7b5874a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

deploy.sh

-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ environment=$1
66

77
if [ "$environment" == "production" ]; then
88
export INGRESS_HOSTNAME=docs.expo.io
9-
export ENVIRONMENT=production
109
elif [ "$environment" == "staging" ]; then
1110
export INGRESS_HOSTNAME=staging.docs.expo.io
12-
export ENVIRONMENT=staging
1311
else
1412
echo "Unrecognized environment $environment"
1513
exit 1

docs.k8s.template.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ apiVersion: apps/v1
33
kind: Deployment
44
metadata:
55
name: docs
6-
namespace: ${ENVIRONMENT}
76
labels:
87
app: docs
98
spec:
@@ -31,11 +30,17 @@ spec:
3130
ports:
3231
- containerPort: 80
3332
name: http
33+
readinessProbe:
34+
httpGet:
35+
path: "/"
36+
port: 3000
37+
initialDelaySeconds: 1
3438
livenessProbe:
3539
httpGet:
3640
path: "/"
3741
port: 3000
38-
initialDelaySeconds: 5
42+
initialDelaySeconds: 10
43+
timeoutSeconds: 2
3944
resources:
4045
requests:
4146
cpu: 200m
@@ -45,7 +50,6 @@ apiVersion: v1
4550
kind: Service
4651
metadata:
4752
name: docs
48-
namespace: ${ENVIRONMENT}
4953
labels:
5054
app: docs
5155
spec:
@@ -60,7 +64,6 @@ apiVersion: extensions/v1beta1
6064
kind: Ingress
6165
metadata:
6266
name: docs
63-
namespace: ${ENVIRONMENT}
6467
labels:
6568
app: docs
6669
ssl: "true"

0 commit comments

Comments
 (0)