Commit 58cc2c9f by tingweiwang

add pv lable selector

1 parent 60ccdf4d
Showing with 15 additions and 1 deletions
...@@ -3,10 +3,11 @@ apiVersion: v1 ...@@ -3,10 +3,11 @@ apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
name: kpl-pv name: kpl-pv
labels:
pv: kpl-pv
spec: spec:
nfs: nfs:
path: NFS_PATH ##########模板变量,nfs的目录 path: NFS_PATH ##########模板变量,nfs的目录
server: NFS_SERVER #############模板变量,nfs的ip server: NFS_SERVER #############模板变量,nfs的ip
accessModes: accessModes:
- ReadWriteMany - ReadWriteMany
...@@ -25,12 +26,17 @@ spec: ...@@ -25,12 +26,17 @@ spec:
resources: resources:
requests: requests:
storage: 500Gi storage: 500Gi
selector:
matchLabels:
pv: kpl-pv
########################2#################### ########################2####################
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
name: kpl-pv2 name: kpl-pv2
labels:
pv: kpl-pv2
spec: spec:
nfs: nfs:
path: NFS_2_PATH ##########模板变量,nfs的目录 path: NFS_2_PATH ##########模板变量,nfs的目录
...@@ -53,12 +59,17 @@ spec: ...@@ -53,12 +59,17 @@ spec:
resources: resources:
requests: requests:
storage: 400Gi storage: 400Gi
selector:
matchLabels:
pv: kpl-pv2
########################3#################### ########################3####################
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
name: kpl-pv3 name: kpl-pv3
labels:
pv: kpl-pv3
spec: spec:
nfs: nfs:
path: NFS_3_PATH ##########模板变量,nfs的目录 path: NFS_3_PATH ##########模板变量,nfs的目录
...@@ -81,3 +92,6 @@ spec: ...@@ -81,3 +92,6 @@ spec:
resources: resources:
requests: requests:
storage: 300Gi storage: 300Gi
selector:
matchLabels:
pv: kpl-pv3
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!