-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yml
76 lines (73 loc) · 1.56 KB
/
deployment.yml
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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka-fitness-data-producer
spec:
selector:
matchLabels:
app: kafka-fitness-data-producer
replicas: 1
template:
metadata:
labels:
app: kafka-fitness-data-producer
spec:
containers:
- name: kafka-fitness-data-producer
image: tubpeng/kafka-fitness-data-producer
ports:
- containerPort: 7778
env:
- name: KAFKA_DOMAIN_NAME
value: "${PIPELINE_CP_PREFIX}-cp-kafka-headless"
- name: fitness-data-donation
image: tubpeng/fitness-data-donation
ports:
- containerPort: 7777
env:
- name: STRAVA_CLIENT_ID
valueFrom:
secretKeyRef:
name: access-secrets
key: strava_client_id
- name: STRAVA_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: access-secrets
key: strava_client_secret
---
apiVersion: v1
kind: Service
metadata:
name: fitness-data-producer-service
spec:
type: ClusterIP
selector:
app: kafka-fitness-data-producer
ports:
- protocol: TCP
port: 7778
targetPort: 7778
---
apiVersion: v1
kind: Service
metadata:
name: fitness-data-donation-service
spec:
type: LoadBalancer
selector:
app: kafka-fitness-data-producer
ports:
- protocol: TCP
port: 80
targetPort: 7777
---
apiVersion: v1
kind: Secret
metadata:
name: access-secrets
type: Opaque
stringData:
strava_client_id: "$STRAVA_CLIENT_ID"
strava_client_secret: "$STRAVA_CLIENT_SECRET"