-
Notifications
You must be signed in to change notification settings - Fork 0
/
rwx-csi.yaml
60 lines (60 loc) · 1.44 KB
/
rwx-csi.yaml
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
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: px-sharedv4-sc-csi
provisioner: pxd.portworx.com
parameters:
repl: "2"
sharedv4: "true"
sharedv4_svc_type: "ClusterIP"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: px-rwx-csi
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 12Gi
storageClassName: px-sharedv4-sc-csi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: busybox-rwx-deployment-csi
labels:
app: busybox-rwx-px
spec:
replicas: 3
selector:
matchLabels:
app: busybox-rwx-px
template:
metadata:
labels:
app: busybox-rwx-px
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- busybox-rwx-px
topologyKey: "kubernetes.io/hostname"
containers:
- name: busybox-rwx
image: busybox
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'while true;do echo $(hostname) is alive and well at $(date)! >> /mnt/busybox-rwx/status.txt;sleep 10;done ; trap : TERM INT; sleep infinity & wait']
volumeMounts:
- mountPath: /mnt/busybox-rwx
name: busybox-rwx
volumes:
- name: busybox-rwx
persistentVolumeClaim:
claimName: px-rwx-csi