This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
truck-data-api.yaml
88 lines (87 loc) · 1.92 KB
/
truck-data-api.yaml
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
apiVersion: v1
kind: Service
metadata:
name: truck-data-api-svc
spec:
type: ClusterIP
selector:
app: truck-data-api
ports:
- port: 8080
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: truck-data-api
name: truck-data-api
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: truck-data-api
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: truck-data-api
spec:
containers:
- image: d2iqdemo/truck-data-api:latest
imagePullPolicy: Always
name: truck-data-api
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
env:
- name: CURRENT_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: PYTHONUNBUFFERED
value: "1"
- name: KAFKA
valueFrom:
configMapKeyRef:
name: dataservices
key: Kafka
initContainers:
- image: d2iqdemo/truck-kafka-init:latest
imagePullPolicy: Always
name: truck-kafka-init
env:
- name: namespace
valueFrom:
fieldRef:
fieldPath: metadata.namespace
dnsPolicy: ClusterFirst
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 1
status: {}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/rewrite-target: /
name: truck-data-api-ingress
spec:
rules:
- http:
paths:
- path: /data-api
pathType: Prefix
backend:
service:
name: truck-data-api-svc
port:
number: 8080