-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.kubernetes.yml
58 lines (55 loc) · 1.59 KB
/
docker-compose.kubernetes.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
---
services:
kubernetes:
container_name: dab_kubernetes
image: "rancher/k3s:${DAB_APPS_K3S_TAG:-v0.3.0}"
labels:
description: 'Deployment, scaling, and management of containerized applications'
deck-chores.sc.command: |
sh -c "
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml && \
kubectl patch storageclass local-path -p '{\"metadata\": {\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"true\"}}}'
"
deck-chores.sc.interval: every minute
restart: on-failure
depends_on:
- deck-chores
networks:
- default
- lab
command: server
privileged: true
env_file:
- /tmp/denvmux/kubernetes.env
environment:
K3S_CLUSTER_SECRET: somethingtotallyrandom
K3S_KUBECONFIG_MODE: '666'
K3S_KUBECONFIG_OUTPUT: /output/kubeconfig.yaml
KUBECONFIG: /output/kubeconfig.yaml
volumes:
- kubernetes:/var/lib/rancher/k3s
- kubernetes_storage_class:/opt/local-path-provisioner
- "$DAB_CONF_PATH/apps/kubernetes/config:/output"
- "$DAB_CONF_PATH/apps/kubernetes/manifests:/var/lib/rancher/k3s/server/manifests"
ports:
- 6443:6443
- 80:80
- 443:443
tmpfs:
- /run
- /var/run
healthcheck:
test: 'kubectl get service kubernetes >/dev/null'
interval: 15s
timeout: 5s
retries: 3
start_period: 5s
volumes:
kubernetes:
kubernetes_storage_class:
networks:
default:
name: dab_apps
lab:
external: true
name: lab