Skip to content

Commit 540eeb0

Browse files
committed
WIP: 1.Upgrade the pod to deploment. 2. Wrote the flow for e2e tests and check the Michelles comments. We can still go with our method
1 parent 8e1d387 commit 540eeb0

File tree

2 files changed

+30
-15
lines changed

2 files changed

+30
-15
lines changed

examples/kubernetes/nginx.yaml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,34 @@ spec:
3131
requests:
3232
storage: 100Gi
3333
---
34-
apiVersion: v1
35-
kind: Pod
34+
apiVersion: apps/v1
35+
kind: Deployment
3636
metadata:
3737
name: nginx
3838
labels:
3939
app: nginx
4040
spec:
41-
containers:
42-
- image: nginx:latest
43-
name: nginx
44-
ports:
45-
- containerPort: 80
46-
protocol: TCP
47-
volumeMounts:
48-
- mountPath: /var/www
49-
name: data-nfsplugin
50-
volumes:
51-
- name: data-nfsplugin
52-
persistentVolumeClaim:
53-
claimName: data-nfsplugin
41+
template:
42+
replicas: 1
43+
selector:
44+
matchLabels:
45+
app: nginx
46+
template:
47+
metadata:
48+
labels:
49+
app: nginx
50+
name: deployment-nginx
51+
spec:
52+
containers:
53+
- image: nginx:latest
54+
name: nginx
55+
ports:
56+
- containerPort: 80
57+
protocol: TCP
58+
volumeMounts:
59+
- mountPath: /var/www
60+
name: data-nfsplugin
61+
volumes:
62+
- name: data-nfsplugin
63+
persistentVolumeClaim:
64+
claimName: data-nfsplugin

test/e2e/suite_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Flow
2+
// install the csi driver
3+
// start the nfs server
4+
// create PV and PVC and mount it to a pod. Exec into the pod and validate if the mount exists

0 commit comments

Comments
 (0)