forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiscsi-demo-target.yaml.in
133 lines (131 loc) · 2.37 KB
/
iscsi-demo-target.yaml.in
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: disk-custom
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
selector:
matchLabels:
os: "none"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: disk-alpine
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
selector:
matchLabels:
os: "alpine"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: disk-cirros
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
selector:
matchLabels:
os: "cirros"
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: iscsi-disk-custom
labels:
os: "none"
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
iscsi:
iqn: iqn.2017-01.io.kubevirt:sn.42
lun: 1
targetPortal: iscsi-demo-target.default.svc.cluster.local
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: iscsi-disk-alpine
labels:
os: "alpine"
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
iscsi:
iqn: iqn.2017-01.io.kubevirt:sn.42
lun: 2
targetPortal: iscsi-demo-target.default.svc.cluster.local
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: iscsi-disk-cirros
labels:
os: "cirros"
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
iscsi:
iqn: iqn.2017-01.io.kubevirt:sn.42
lun: 3
targetPortal: iscsi-demo-target.default.svc.cluster.local
---
apiVersion: v1
kind: Service
metadata:
name: iscsi-demo-target
spec:
ports:
- name: iscsi
port: 3260
targetPort: 3260
selector:
app: iscsi-demo-target
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: iscsi-demo-target-tgtd
spec:
template:
metadata:
labels:
name: iscsi-demo-target-tgtd
app: iscsi-demo-target
name: iscsi-demo-target-tgtd
spec:
containers:
- name: target
image: {{ docker_prefix }}/iscsi-demo-target-tgtd:{{ docker_tag }}
ports:
- containerPort: 3260
volumeMounts:
- name: host
mountPath: /host
env:
- name: EXPORT_HOST_PATHS
value:
volumes:
- name: host
hostPath:
path: /
nodeSelector:
kubernetes.io/hostname: {{ primary_node_name }}