forked from kubernetes-sigs/kube-scheduler-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
71 lines (71 loc) · 2.1 KB
/
compose.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
services:
# This container copies the data,
# so any changes made to the configuration files within the Pod will not affect the original files.
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: registry.k8s.io/scheduler-simulator/debuggable-scheduler:v0.4.0
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: registry.k8s.io/scheduler-simulator/simulator-backend:v0.4.0
container_name: simulator-server
volumes:
- ./simulator/config.yaml:/config.yaml
- ./simulator/kubeconfig.yaml:/kubeconfig.yaml
- /var/run/docker.sock:/var/run/docker.sock
- conf:/config
environment:
- PORT=1212
- KUBE_SCHEDULER_SIMULATOR_ETCD_URL=http://simulator-cluster:2379
- KUBE_APISERVER_URL=http://simulator-cluster:3131
ports:
- "1212:1212"
restart: always
tty: true
networks:
- simulator-internal-network
simulator-frontend:
image: registry.k8s.io/scheduler-simulator/simulator-frontend:v0.4.0
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
networks:
simulator-internal-network:
driver: bridge
volumes:
simulator-etcd-data:
conf: