generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 140
/
docker-compose.yaml
96 lines (96 loc) · 2.54 KB
/
docker-compose.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
89
90
91
92
93
94
95
96
services:
extender:
image: test/test:test # TODO(user): replace it with your extender's image
ports:
- "80:80"
networks:
- simulator-internal-network
init-container:
image: busybox
volumes:
- conf:/config
- ${PWD}/simulator/cmd/scheduler:/host-config:ro
command: sh -c "cp -rf /host-config/* /config/"
simulator-scheduler:
image: simulator-scheduler
container_name: simulator-scheduler
environment:
- KUBECONFIG=/config/kubeconfig.yaml
volumes:
- conf:/config
depends_on:
- init-container
- simulator-cluster
restart: always
tty: true
networks:
- simulator-internal-network
simulator-server:
image: simulator-server
container_name: simulator-server
environment:
- PORT=1212
- KUBE_SCHEDULER_SIMULATOR_ETCD_URL=http://simulator-cluster:2379
- KUBE_APISERVER_URL=http://simulator-cluster:3131
volumes:
- ./simulator/config.yaml:/config.yaml
- ./simulator/kubeconfig.yaml:/kubeconfig.yaml
- /var/run/docker.sock:/var/run/docker.sock
- conf:/config
ports:
- "1212:1212"
restart: always
tty: true
networks:
- simulator-internal-network
depends_on:
fake-source-cluster:
condition: "service_healthy"
required: false
simulator-frontend:
image: simulator-frontend
restart: always
container_name: simulator-frontend
environment:
- HOST=0.0.0.0
- BASE_URL=http://${SIMULATOR_EXTERNAL_IP:-localhost}:1212
- KUBE_API_SERVER_URL=http://${SIMULATOR_EXTERNAL_IP:-localhost}:3131
ports:
- "3000:3000"
tty: true
simulator-cluster:
image: registry.k8s.io/kwok/cluster:v0.6.0-k8s.v1.30.2
container_name: simulator-cluster
restart: always
ports:
- "3131:3131"
volumes:
- simulator-etcd-data:/var/lib/etcd
- ./kwok.yaml:/root/.kwok/kwok.yaml
environment:
- KWOK_KUBE_APISERVER_PORT=3131
networks:
- simulator-internal-network
fake-source-cluster:
image: registry.k8s.io/kwok/cluster:v0.6.0-k8s.v1.30.2
container_name: fake-source-cluster
restart: always
healthcheck:
test: "kwokctl kubectl get nodes"
start_period: 60s
start_interval: 1s
interval: 600s
ports:
- "3132:3132"
environment:
- KWOK_KUBE_APISERVER_PORT=3132
networks:
- simulator-internal-network
profiles:
- externalImportEnabled
networks:
simulator-internal-network:
driver: bridge
volumes:
simulator-etcd-data:
conf: