-
Notifications
You must be signed in to change notification settings - Fork 8
/
githttpserver.yaml
67 lines (67 loc) · 1.24 KB
/
githttpserver.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
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitvolume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Mi
---
apiVersion: v1
kind: Service
metadata:
name: githttpserver
spec:
selector:
app: githttpserver
ports:
- protocol: TCP
port: 5000
targetPort: 5000
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: githttpserver
spec:
selector:
matchLabels:
app: githttpserver
serviceName: "githttpserver"
replicas: 1
template:
metadata:
labels:
app: githttpserver
spec:
terminationGracePeriodSeconds: 10
containers:
- name: githttpserver
image: psalomo/githttpserver:0.0.4
volumeMounts:
- mountPath: /mnt/gitrepos
name: gitreposvolume
env:
- name: GIT_PROJECT_ROOT
value: /mnt/gitrepos
volumes:
- name: gitreposvolume
persistentVolumeClaim:
claimName: gitvolume
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: githttpserverdemo
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: githttpserver
servicePort: 5000