Skip to content

Commit 77c8684

Browse files
committed
Add docker compose
1 parent e00e83d commit 77c8684

File tree

6 files changed

+27
-16
lines changed

6 files changed

+27
-16
lines changed

Docker-Compose.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
fleet-telemetry-consumer:
3+
platform: linux/amd64
4+
build:
5+
context: .
6+
dockerfile: Dockerfile
7+
volumes:
8+
- ./examples/consumer_config.json:/etc/fleet-telemetry-consumer/config.json:ro
9+
command: ["/fleet-telemetry-consumer", "-config", "/etc/fleet-telemetry-consumer/config.json"]

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
build:
2-
docker build . --platform linux/amd64 --no-cache
2+
docker build . --platform linux/amd64 --no-cache
3+
4+
run:
5+
docker compose up --build
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"bootstrap.servers": "10.0.100.12:31769",
2+
"bootstrap.servers": "tesla-kafka-brokers.kafka.svc.cluster.local:9092",
33
"group.id": "fleet-telemetry-consumer-group",
44
"auto.offset.reset": "earliest"
55
}

kustomization/deployment.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: fleet-telemetry-consumer
5-
labels:
6-
app: fleet-telemetry-consumer
75
spec:
86
replicas: 1
97
selector:
@@ -15,14 +13,13 @@ spec:
1513
app: fleet-telemetry-consumer
1614
spec:
1715
containers:
18-
- name: fleet-telemetry-consumer
19-
image: quay.io/rajsinghcpre/fleet-telemetry-consumer:v0.0.1
20-
args: ["-config", "/etc/fleet-telemetry-consumer/config.json"]
21-
volumeMounts:
22-
- name: config-volume
23-
mountPath: /etc/fleet-telemetry-consumer
24-
subPath: config.json
16+
- name: fleet-telemetry-consumer
17+
image: quay.io/rajsinghcpre/fleet-telemetry-consumer:v0.0.1
18+
command: ["/fleet-telemetry-consumer", "-config", "/etc/fleet-telemetry-consumer/config.json"]
19+
volumeMounts:
20+
- name: config-volume
21+
mountPath: /etc/fleet-telemetry-consumer
2522
volumes:
26-
- name: config-volume
27-
configMap:
28-
name: fleet-telemetry-config
23+
- name: config-volume
24+
configMap:
25+
name: fleet-telemetry-consumer-config

kustomization/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ resources:
55
- deployment.yaml
66

77
configMapGenerator:
8-
- name: fleet-telemetry-config
8+
- name: fleet-telemetry-consumer-config
99
files:
10-
- consumer_config.json
10+
- config.json
11+
options:
12+
disableNameSuffixHash: true

0 commit comments

Comments
 (0)