-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkubernetes_website_sidecar_autosync.yaml
71 lines (71 loc) · 1.61 KB
/
kubernetes_website_sidecar_autosync.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-git-autosync
labels:
app: test-git-autosync
spec:
selector:
matchLabels:
app: test-git-autosync
replicas: 1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: test-git-autosync
spec:
volumes:
- name: sync
emptyDir: {}
initContainers:
- name: autosync-clone
image: lamaani/git_autosync
volumeMounts:
- mountPath: /sync
name: sync
env:
- name: GIT_AUTOSYNC_REPO_LOCAL_PATH
value: /sync
- name: GIT_AUTOSYNC_MAX_SYNC_RUN_COUNT
value: "0"
containers:
- name: website
image: halverneus/static-file-server
volumeMounts:
- mountPath: /sync
name: sync
env:
- name: FOLDER
value: /sync/examples/website
- name: DEBUG
value: "true"
- name: SHOW_LISTING
value: "true"
ports:
- containerPort: 8080
# The git_autosync sidecar
- name: autosync
image: lamaani/git_autosync
volumeMounts:
- mountPath: /sync
name: sync
env:
- name: GIT_AUTOSYNC_REPO_LOCAL_PATH
value: /sync
---
apiVersion: v1
kind: Service
metadata:
name: test-git-autosync-svc
spec:
selector:
app: test-git-autosync
type: LoadBalancer
ports:
- name: website
port: 8080