Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Commit 3f75741

Browse files
committed
kubernetes: improve shipper's deployments
This brings the Shipper you deploy out of the box closer to the way we deploy it in Booking. This also fixes a tiny bug where the metrics port was not exposed in the `shipper` deployment.
1 parent a418306 commit 3f75741

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

Dockerfile.shipper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ FROM alpine:3.8
22
LABEL authors="Parham Doustdar <[email protected]>, Alexey Surikov <[email protected]>, Igor Sutton <[email protected]>, Ben Tyler <[email protected]>"
33
RUN apk add ca-certificates
44
ADD build/shipper.linux-amd64 /bin/shipper
5-
ENTRYPOINT ["shipper", "-v", "4", "-logtostderr"]
5+
ENTRYPOINT ["shipper"]

Dockerfile.shipper-state-metrics

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ FROM alpine:3.8
22
LABEL authors="Parham Doustdar <[email protected]>, Alexey Surikov <[email protected]>, Igor Sutton <[email protected]>, Ben Tyler <[email protected]>"
33
RUN apk add ca-certificates
44
ADD build/shipper-state-metrics.linux-amd64 /bin/shipper-state-metrics
5-
ENTRYPOINT ["shipper-state-metrics", "-v", "2"]
5+
ENTRYPOINT ["shipper-state-metrics"]

kubernetes/shipper-state-metrics.deployment.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ spec:
99
selector:
1010
matchLabels:
1111
app: shipper-state-metrics
12+
strategy:
13+
rollingUpdate:
14+
maxSurge: 1
15+
maxUnavailable: 1
16+
type: RollingUpdate
1217
template:
1318
metadata:
1419
labels:
@@ -18,6 +23,14 @@ spec:
1823
- name: shipper-state-metrics
1924
image: <IMAGE>
2025
imagePullPolicy: Always
26+
args:
27+
- "-v"
28+
- "2"
2129
ports:
22-
- containerPort: 8890
30+
- name: metrics
31+
containerPort: 8890
32+
readinessProbe:
33+
httpGet:
34+
path: /metrics
35+
port: 8890
2336
serviceAccountName: shipper-management-cluster

kubernetes/shipper.deployment.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@ spec:
99
selector:
1010
matchLabels:
1111
app: shipper
12+
strategy:
13+
rollingUpdate:
14+
maxSurge: 1
15+
maxUnavailable: 1
16+
type: RollingUpdate
1217
template:
1318
metadata:
1419
labels:
1520
app: shipper
21+
annotations:
22+
prometheus.io/scrape_port: '8889'
1623
spec:
1724
containers:
1825
- name: shipper
@@ -27,8 +34,14 @@ spec:
2734
- "9443"
2835
- "-resync"
2936
- "10m"
37+
- "-v"
38+
- "4"
39+
- "-logtostderr"
3040
ports:
31-
- containerPort: 9443
41+
- name: metrics
42+
containerPort: 8889
43+
- name: webhook
44+
containerPort: 9443
3245
volumeMounts:
3346
- mountPath: /etc/webhook/certs
3447
name: webhook-certs

0 commit comments

Comments
 (0)