...
1
2---
3kind: Service
4apiVersion: v1
5metadata:
6 name: {self.path.k8s}
7spec:
8 selector:
9 healthcheck: {self.path.k8s}
10 ports:
11 - name: http
12 protocol: TCP
13 port: 80
14 targetPort: 8080
15 - name: https
16 protocol: TCP
17 port: 443
18 targetPort: 8443
19---
20apiVersion: apps/v1
21kind: Deployment
22metadata:
23 name: {self.path.k8s}
24 labels:
25 healthcheck: {self.path.k8s}
26spec:
27 replicas: 5
28 selector:
29 matchLabels:
30 healthcheck: {self.path.k8s}
31 strategy:
32 type: Recreate # rolling would be bad with the nonce hack
33 template:
34 metadata:
35 labels:
36 healthcheck: {self.path.k8s}
37 spec:
38 containers:
39 - name: health-check-server
40 image: {images[kat-server]}
41 ports:
42 - containerPort: 8080
43 - containerPort: 8443
44 env:
45 - name: BACKEND
46 value: {self.path.k8s}
47 - name: KAT_BACKEND_TYPE
48 value: health_check_server
49 - name: BACKEND
50 value: {self.path.k8s}
51 - name: HEALTHY_STATUS_CODE
52 value: "200"
53 - name: UNHEALTHY_STATUS_CODE
54 value: "500"
55 - name: _nonce
56 value: '{self.nonce}'
View as plain text