Commit 60ccdf4d by tingweiwang

add pv lable selector

1 parent b19723ae
Showing with 17 additions and 0 deletions
...@@ -3,6 +3,8 @@ apiVersion: v1 ...@@ -3,6 +3,8 @@ apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
name: adl-pv name: adl-pv
labels:
pv: adl-pv
spec: spec:
nfs: nfs:
path: NFS_PATH ##########模板变量,nfs的目录 path: NFS_PATH ##########模板变量,nfs的目录
...@@ -24,12 +26,17 @@ spec: ...@@ -24,12 +26,17 @@ spec:
resources: resources:
requests: requests:
storage: 500Gi storage: 500Gi
selector:
matchLabels:
pv: adl-pv
########################2#################### ########################2####################
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
name: adl-pv2 name: adl-pv2
labels:
pv: adl-pv2
spec: spec:
nfs: nfs:
path: NFS_2_PATH ##########模板变量,nfs的目录 path: NFS_2_PATH ##########模板变量,nfs的目录
...@@ -51,12 +58,18 @@ spec: ...@@ -51,12 +58,18 @@ spec:
resources: resources:
requests: requests:
storage: 400Gi storage: 400Gi
selector:
matchLabels:
pv: adl-pv2
########################3#################### ########################3####################
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
name: adl-pv3 name: adl-pv3
labels:
pv: adl-pv3
spec: spec:
nfs: nfs:
path: NFS_3_PATH ##########模板变量,nfs的目录 path: NFS_3_PATH ##########模板变量,nfs的目录
...@@ -78,3 +91,7 @@ spec: ...@@ -78,3 +91,7 @@ spec:
resources: resources:
requests: requests:
storage: 300Gi storage: 300Gi
selector:
matchLabels:
pv: adl-pv3
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!