Skip to content

Commit f329614

Browse files
authored
Merge pull request #6 from ozerovandrei/update-deployments
Update Deployments and remove pods
2 parents 6dbf77f + 52102ca commit f329614

File tree

7 files changed

+45
-75
lines changed

7 files changed

+45
-75
lines changed

deployments/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Deployments
2+
3+
**Note:** You need to pre-create Persistent Volume Claim in order to use the Deployment with volume.

deployments/nginx-1.15.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
# nginx-1.14.yaml
1+
---
2+
# nginx-1.17.yaml
23
apiVersion: apps/v1
34
kind: Deployment
45
metadata:
56
name: nginx-deployment
67
spec:
7-
replicas: 10
8+
replicas: 4
89
selector:
910
matchLabels:
10-
app: webservice
11+
app: nginx
1112
minReadySeconds: 10
1213
strategy:
1314
type: RollingUpdate
@@ -17,10 +18,10 @@ spec:
1718
template:
1819
metadata:
1920
labels:
20-
app: webservice
21+
app: nginx
2122
spec:
2223
containers:
2324
- name: nginx
24-
image: library/nginx:1.14-alpine
25+
image: library/nginx:1.17
2526
ports:
2627
- containerPort: 80

deployments/nginx-1.17-volume.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# nginx-1.17.yaml
3+
apiVersion: apps/v1
4+
kind: Deployment
5+
metadata:
6+
name: nginx-deployment
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: nginx
12+
minReadySeconds: 10
13+
strategy:
14+
type: RollingUpdate
15+
rollingUpdate:
16+
maxUnavailable: 1
17+
maxSurge: 1
18+
template:
19+
metadata:
20+
labels:
21+
app: nginx
22+
spec:
23+
nodeSelector:
24+
topology.cinder.csi.openstack.org/zone: ru-1a
25+
containers:
26+
- name: nginx
27+
image: library/nginx:1.17
28+
ports:
29+
- containerPort: 80
30+
volumeMounts:
31+
- mountPath: "/var/www/html"
32+
name: data
33+
volumes:
34+
- name: data
35+
persistentVolumeClaim:
36+
claimName: my-pv-claim

pods/nginx-basic.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

pods/nginx-labeled.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

pods/nginx-with-volume.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)