Skip to content

Commit 1dd02ed

Browse files
committed
Run the creation/recreation of the PV e2e test
Still a WIP, most of the pumbling is done however once the LVP pod starts it fails to find the volume mount!
1 parent ee31b75 commit 1dd02ed

File tree

9 files changed

+632
-53
lines changed

9 files changed

+632
-53
lines changed

hack/e2e.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
set -o errexit
2424
set -o nounset
2525
set -o pipefail
26+
set -x
2627

2728
ROOT=$(unset CDPATH && cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd)
2829
cd $ROOT
@@ -294,12 +295,12 @@ fi
294295

295296
if [ "$PROVIDER" == "gke" ]; then
296297
kubetest2_args+=(
298+
--up
299+
--down
297300
--test exec
298301
-v 1
299302
--cluster-name "$CLUSTER"
300303
--network "$CLUSTER"
301-
--up
302-
--down
303304
--gcp-service-account "$GOOGLE_APPLICATION_CREDENTIALS"
304305
--environment "$GKE_ENVIRONMENT"
305306
)
@@ -322,7 +323,9 @@ if [ "$PROVIDER" == "gke" ]; then
322323
fi
323324

324325
# legacy path
326+
# --up
327+
# --down
325328
go run $ROOT/hack/e2e.go -- "${kubetest_args[@]}" \
326-
--deployment "$DEPLOYMENT" \
327-
--test-cmd "$ROOT/hack/run-e2e.sh" \
328-
--test-cmd-args="$@"
329+
--deployment="$DEPLOYMENT" \
330+
--test-cmd="$ROOT/hack/run-e2e.sh" \
331+
"${@:-}"

hack/run-e2e.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,4 @@ echo "Running e2e tests:" >&2
182182
echo "PROVISIONER_IMAGE_NAME: $PROVISIONER_IMAGE_NAME"
183183
echo "PROVISIONER_IMAGE_PULL_POLICY: $PROVISIONER_IMAGE_PULL_POLICY"
184184
echo "go ${TEST_ARGS[@]}" >&2
185-
exec "go" "${TEST_ARGS[@]}"
185+
eval "go ${TEST_ARGS[@]}"

helm/examples/development-gce.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
daemonset:
2+
image: gcr.io/mauriciopoppe-gke-dev/local-volume-provisioner:canary
3+
imagePullPolicy: Always
4+
common:
5+
useNodeNameOnly: true
6+
classes:
7+
- name: local-scsi
8+
hostDir: "/mnt/disks"
9+
fsType: ""
10+
storageClass: true
Lines changed: 298 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,298 @@
1+
---
2+
# Source: provisioner/templates/configmap.yaml
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: local-static-provisioner-config
7+
namespace: default
8+
labels:
9+
helm.sh/chart: provisioner-2.5.0
10+
app.kubernetes.io/name: provisioner
11+
app.kubernetes.io/managed-by: Tiller
12+
app.kubernetes.io/instance: local-static-provisioner
13+
data:
14+
useNodeNameOnly: "true"
15+
storageClassMap: |
16+
local-scsi:
17+
hostDir: /mnt/disks
18+
mountDir: /mnt/disks
19+
20+
---
21+
# Source: provisioner/templates/storageclass.yaml
22+
23+
---
24+
apiVersion: storage.k8s.io/v1
25+
kind: StorageClass
26+
metadata:
27+
name: local-scsi
28+
labels:
29+
helm.sh/chart: provisioner-2.5.0
30+
app.kubernetes.io/name: provisioner
31+
app.kubernetes.io/managed-by: Tiller
32+
app.kubernetes.io/instance: local-static-provisioner
33+
provisioner: kubernetes.io/no-provisioner
34+
volumeBindingMode: WaitForFirstConsumer
35+
reclaimPolicy: Delete
36+
37+
---
38+
# Source: provisioner/templates/serviceaccount.yaml
39+
40+
apiVersion: v1
41+
kind: ServiceAccount
42+
metadata:
43+
name: local-static-provisioner
44+
namespace: default
45+
labels:
46+
helm.sh/chart: provisioner-2.5.0
47+
app.kubernetes.io/name: provisioner
48+
app.kubernetes.io/managed-by: Tiller
49+
app.kubernetes.io/instance: local-static-provisioner
50+
51+
---
52+
# Source: provisioner/templates/rbac.yaml
53+
54+
apiVersion: rbac.authorization.k8s.io/v1
55+
kind: ClusterRoleBinding
56+
metadata:
57+
name: local-static-provisioner-pv-binding
58+
labels:
59+
helm.sh/chart: provisioner-2.5.0
60+
app.kubernetes.io/name: provisioner
61+
app.kubernetes.io/managed-by: Tiller
62+
app.kubernetes.io/instance: local-static-provisioner
63+
subjects:
64+
- kind: ServiceAccount
65+
name: local-static-provisioner
66+
namespace: default
67+
roleRef:
68+
kind: ClusterRole
69+
name: system:persistent-volume-provisioner
70+
apiGroup: rbac.authorization.k8s.io
71+
---
72+
apiVersion: rbac.authorization.k8s.io/v1
73+
kind: ClusterRole
74+
metadata:
75+
name: local-static-provisioner-node-clusterrole
76+
labels:
77+
helm.sh/chart: provisioner-2.5.0
78+
app.kubernetes.io/name: provisioner
79+
app.kubernetes.io/managed-by: Tiller
80+
app.kubernetes.io/instance: local-static-provisioner
81+
rules:
82+
- apiGroups: [""]
83+
resources: ["nodes"]
84+
verbs: ["get"]
85+
---
86+
apiVersion: rbac.authorization.k8s.io/v1
87+
kind: ClusterRoleBinding
88+
metadata:
89+
name: local-static-provisioner-node-binding
90+
labels:
91+
helm.sh/chart: provisioner-2.5.0
92+
app.kubernetes.io/name: provisioner
93+
app.kubernetes.io/managed-by: Tiller
94+
app.kubernetes.io/instance: local-static-provisioner
95+
subjects:
96+
- kind: ServiceAccount
97+
name: local-static-provisioner
98+
namespace: default
99+
roleRef:
100+
kind: ClusterRole
101+
name: local-static-provisioner-node-clusterrole
102+
apiGroup: rbac.authorization.k8s.io
103+
104+
---
105+
# Source: provisioner/templates/daemonset_linux.yaml
106+
---
107+
apiVersion: apps/v1
108+
kind: DaemonSet
109+
metadata:
110+
name: local-static-provisioner
111+
namespace: default
112+
labels:
113+
helm.sh/chart: provisioner-2.5.0
114+
app.kubernetes.io/name: provisioner
115+
app.kubernetes.io/managed-by: Tiller
116+
app.kubernetes.io/instance: local-static-provisioner
117+
spec:
118+
selector:
119+
matchLabels:
120+
app.kubernetes.io/name: provisioner
121+
app.kubernetes.io/instance: local-static-provisioner
122+
template:
123+
metadata:
124+
labels:
125+
app.kubernetes.io/name: provisioner
126+
app.kubernetes.io/instance: local-static-provisioner
127+
annotations:
128+
checksum/config: 4eb9c319293e455d791095bf423e610062444b6bed3a2b383326ff43f7806fa3
129+
spec:
130+
serviceAccountName: local-static-provisioner
131+
nodeSelector:
132+
kubernetes.io/os: linux
133+
containers:
134+
- name: provisioner
135+
image: gcr.io/mauriciopoppe-gke-dev/local-volume-provisioner:canary
136+
imagePullPolicy: Always
137+
securityContext:
138+
privileged: true
139+
env:
140+
- name: MY_NODE_NAME
141+
valueFrom:
142+
fieldRef:
143+
fieldPath: spec.nodeName
144+
- name: MY_NAMESPACE
145+
valueFrom:
146+
fieldRef:
147+
fieldPath: metadata.namespace
148+
- name: JOB_CONTAINER_IMAGE
149+
value: gcr.io/mauriciopoppe-gke-dev/local-volume-provisioner:canary
150+
ports:
151+
- name: metrics
152+
containerPort: 8080
153+
volumeMounts:
154+
- name: provisioner-config
155+
mountPath: /etc/provisioner/config
156+
readOnly: true
157+
- name: provisioner-dev
158+
mountPath: /dev
159+
- name: local-scsi
160+
mountPath: /mnt/disks
161+
mountPropagation: HostToContainer
162+
volumes:
163+
- name: provisioner-config
164+
configMap:
165+
name: local-static-provisioner-config
166+
- name: provisioner-dev
167+
hostPath:
168+
path: /dev
169+
- name: local-scsi
170+
hostPath:
171+
path: /mnt/disks
172+
173+
---
174+
# Source: provisioner/templates/daemonset_windows.yaml
175+
---
176+
apiVersion: apps/v1
177+
kind: DaemonSet
178+
metadata:
179+
name: local-static-provisioner-win
180+
namespace: default
181+
labels:
182+
helm.sh/chart: provisioner-2.5.0
183+
app.kubernetes.io/name: provisioner
184+
app.kubernetes.io/managed-by: Tiller
185+
app.kubernetes.io/instance: local-static-provisioner
186+
spec:
187+
selector:
188+
matchLabels:
189+
app.kubernetes.io/name: provisioner
190+
app.kubernetes.io/instance: local-static-provisioner
191+
template:
192+
metadata:
193+
labels:
194+
app.kubernetes.io/name: provisioner
195+
app.kubernetes.io/instance: local-static-provisioner
196+
annotations:
197+
checksum/config: 4eb9c319293e455d791095bf423e610062444b6bed3a2b383326ff43f7806fa3
198+
spec:
199+
serviceAccountName: local-static-provisioner
200+
nodeSelector:
201+
kubernetes.io/os: windows
202+
tolerations:
203+
# an empty key operator Exists matches all keys, values and effects
204+
# which meants that this will tolerate everything
205+
- operator: "Exists"
206+
containers:
207+
- name: provisioner
208+
image: gcr.io/mauriciopoppe-gke-dev/local-volume-provisioner:canary
209+
# TODO(mauriciopoppe): remove this log level
210+
args:
211+
- --v=8
212+
imagePullPolicy: Always
213+
env:
214+
- name: MY_NODE_NAME
215+
valueFrom:
216+
fieldRef:
217+
fieldPath: spec.nodeName
218+
- name: MY_NAMESPACE
219+
valueFrom:
220+
fieldRef:
221+
fieldPath: metadata.namespace
222+
- name: JOB_CONTAINER_IMAGE
223+
value: gcr.io/mauriciopoppe-gke-dev/local-volume-provisioner:canary
224+
ports:
225+
- name: metrics
226+
containerPort: 8080
227+
volumeMounts:
228+
- name: provisioner-config
229+
mountPath: /etc/provisioner/config
230+
readOnly: true
231+
- name: provisioner-dev
232+
mountPath: /dev
233+
- name: local-scsi
234+
mountPath: /mnt/disks
235+
mountPropagation: HostToContainer
236+
- name: csi-proxy-volume-v1
237+
mountPath: \\.\pipe\csi-proxy-volume-v1
238+
- name: csi-proxy-filesystem-v1
239+
mountPath: \\.\pipe\csi-proxy-filesystem-v1
240+
- name: csi-proxy-disk-v1
241+
mountPath: \\.\pipe\csi-proxy-disk-v1
242+
# these paths are still included for compatibility, they're used
243+
# only if the node has still the beta version of the CSI proxy
244+
- name: csi-proxy-volume-v1beta2
245+
mountPath: \\.\pipe\csi-proxy-volume-v1beta2
246+
- name: csi-proxy-filesystem-v1beta1
247+
mountPath: \\.\pipe\csi-proxy-filesystem-v1beta1
248+
- name: csi-proxy-disk-v1beta2
249+
mountPath: \\.\pipe\csi-proxy-disk-v1beta2
250+
volumes:
251+
- name: csi-proxy-disk-v1
252+
hostPath:
253+
path: \\.\pipe\csi-proxy-disk-v1
254+
type: ""
255+
- name: csi-proxy-volume-v1
256+
hostPath:
257+
path: \\.\pipe\csi-proxy-volume-v1
258+
type: ""
259+
- name: csi-proxy-filesystem-v1
260+
hostPath:
261+
path: \\.\pipe\csi-proxy-filesystem-v1
262+
type: ""
263+
# these paths are still included for compatibility, they're used
264+
# only if the node has still the beta version of the CSI proxy
265+
- name: csi-proxy-disk-v1beta2
266+
hostPath:
267+
path: \\.\pipe\csi-proxy-disk-v1beta2
268+
type: ""
269+
- name: csi-proxy-volume-v1beta2
270+
hostPath:
271+
path: \\.\pipe\csi-proxy-volume-v1beta2
272+
type: ""
273+
- name: csi-proxy-filesystem-v1beta1
274+
hostPath:
275+
path: \\.\pipe\csi-proxy-filesystem-v1beta1
276+
type: ""
277+
- name: provisioner-config
278+
configMap:
279+
name: local-static-provisioner-config
280+
- name: provisioner-dev
281+
hostPath:
282+
path: "C:\\dev"
283+
# If nothing exists at the given path, an empty directory will be
284+
# created there as needed with permission set to 0755,
285+
# having the same group and ownership with Kubelet.
286+
type: DirectoryOrCreate
287+
- name: local-scsi
288+
hostPath:
289+
path: /mnt/disks
290+
291+
---
292+
# Source: provisioner/templates/psp.yaml
293+
294+
295+
---
296+
# Source: provisioner/templates/servicemonitor.yaml
297+
298+

0 commit comments

Comments
 (0)