/
fc.pvc.pod.yaml
56 lines (56 loc) · 1 KB
/
fc.pvc.pod.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
apiVersion: v1
kind: Namespace
metadata:
name: unityfc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: dynamic-fc-unity-pvc
namespace: unityfc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: unity-fc
---
apiVersion: v1
kind: ConfigMap
metadata:
name: demo
namespace: unityfc
data:
sample: |
unity fc
test content
---
apiVersion: v1
kind: Pod
metadata:
name: unity-fc-pod
namespace: unityfc
spec:
containers:
- name: task-pv-container
image: quay.io/centos/centos
ports:
- containerPort: 80
name: "http-server"
volumeMounts:
- mountPath: "/mnt"
name: fc
- mountPath: "/tmp"
name: confmap
command: ["/bin/bash", "-c", "cp /tmp/keys /mnt/keys && sleep 2000000000"]
volumes:
- name: fc
persistentVolumeClaim:
claimName: dynamic-fc-unity-pvc
- name: confmap
configMap:
name: demo
items:
- key: sample
path: keys