forked from intel/pmem-csi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pmem-app-cache.yaml
42 lines (42 loc) · 1.08 KB
/
pmem-app-cache.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
apiVersion: apps/v1beta2
kind: ReplicaSet
metadata:
name: my-csi-app
spec:
selector:
matchLabels:
app: my-csi-app
replicas: 2
template:
metadata:
labels:
app: my-csi-app
spec:
# make sure that no two Pods run on same node
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values: [ my-csi-app ]
topologyKey: "kubernetes.io/hostname"
containers:
- name: my-frontend
image: intel/pmem-csi-driver-test:canary
command: [ "/bin/sh" ]
args: [ "-c", "touch /data/$(POD_NAME); sleep 100000" ]
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
volumeMounts:
- mountPath: "/data"
name: my-csi-volume
volumes:
- name: my-csi-volume
persistentVolumeClaim:
claimName: pmem-csi-pvc-cache