-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuploadfiles.yml
155 lines (148 loc) · 2.77 KB
/
uploadfiles.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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
---
apiVersion: v1
kind: Namespace
metadata:
name: uploadfiles
labels:
name: uploadfiles
---
apiVersion: v1
kind: Service
metadata:
name: uploadfiles-server
labels:
app: uploadfiles
namespace: uploadfiles
spec:
ports:
- port: 80
targetPort: 8000
name: portuploadfiles
selector:
name: uploadfiles-server
---
apiVersion: v1
kind: ReplicationController
metadata:
name: uploadfiles-server
labels:
app: uploadfiles
tier: server
environment: dev
namespace: uploadfiles
spec:
replicas: 1
template:
metadata:
labels:
name: uploadfiles-server
app: uploadfiles
spec:
containers:
- name: uploadfiles-server
image: laurobmb/uploadfiles:latest
imagePullPolicy: Always
ports:
- containerPort: 8000
protocol: TCP
name: portuploadfiles
volumeMounts:
- name: vol-uploads-01
mountPath: /upload
- name: vol-uploads-02
mountPath: /uploads
volumes:
- name: vol-uploads-01
persistentVolumeClaim:
claimName: pvc-uploadfiles-01
- name: vol-uploads-02
persistentVolumeClaim:
claimName: pvc-uploadfiles-02
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-uploadfiles-01
namespace: uploadfiles
labels:
app: uploadfiles
spec:
storageClassName: volnfs01
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-uploadfiles-02
namespace: uploadfiles
labels:
app: uploadfiles
spec:
storageClassName: volnfs02
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: volnfs01
spec:
capacity:
storage: 2Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Recycle
storageClassName: volnfs01
mountOptions:
- hard
- nfsvers=4.1
nfs:
path: /opt/vol01
server: 192.168.123.244
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: volnfs02
spec:
capacity:
storage: 2Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Recycle
storageClassName: volnfs02
mountOptions:
- hard
- nfsvers=4.1
nfs:
path: /opt/vol02
server: 192.168.123.244
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: uploadfiles-ingress
namespace: uploadfiles
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- host: app6.w0rm30.seg.br
http:
paths:
- backend:
service:
name: uploadfiles-server
port:
number: 80
path: /
pathType: Prefix