Browse Source

++tests

master
Nico Schottelius 2 years ago
parent
commit
b10eeea4e9
  1. 7
      README.md
  2. 23
      tests/README.md
  3. 11
      tests/pvc-busybox-cephfs-resized.yaml
  4. 31
      tests/pvc-busybox-cephfs.yaml
  5. 11
      tests/pvc-busybox-rbd-resize.yaml
  6. 31
      tests/pvc-busybox-rbd.yaml

7
README.md

@ -227,3 +227,10 @@ kubectl delete -f generic/nginx-test-deployment.yaml
While above is already a fully running k8s cluster, we do want to have
support for **PersistentVolumeclaims**. See [the rook
documentation](rook/README.md) on how to achieve the next step.
## The IPv4 "problem"
* Clusters are IPv6 only
* Need to have one or more services to map IPv4
* Maybe outside haproxy w/ generic ssl/sni/host mapping
* Could even be **inside** haproxy service

23
tests/README.md

@ -0,0 +1,23 @@
## k8s Tests
### Creating PVCs using rook: ok
Generic test to see whether PVC support is correctly installed from
rook.
* Apply pvc-cephfs.yaml: get cephfs based PVC + PV
* Apply pvc-rbd.yaml: get RBD based PVC + PV
### Resizing PVC based on CephFS: ok
* Apply pvc-busybox-cephfs.yaml
* Wait & check
* Apply pvc-busybox-cephfs-resize.yaml
* Wait & check new size -> has increased
### Resizing PVC based on RBD: ok
* Apply pvc-busybox-rbd.yaml
* Wait & check
* Apply pvc-busybox-rbd-resize.yaml
* Wait & check new size -> has increased

11
tests/pvc-busybox-cephfs-resized.yaml

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: busybox-pvc-test
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 200Mi
storageClassName: rook-cephfs

31
tests/pvc-busybox-cephfs.yaml

@ -0,0 +1,31 @@
apiVersion: v1
kind: Pod
metadata:
name: busybox-sleep
spec:
containers:
- name: busybox
image: busybox
args:
- sleep
- "1000000"
volumeMounts:
- mountPath: /test
name: testmount
volumes:
- name: testmount
persistentVolumeClaim:
claimName: busybox-pvc-test
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: busybox-pvc-test
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Mi
storageClassName: rook-cephfs

11
tests/pvc-busybox-rbd-resize.yaml

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: busybox-pvc-test-rbd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 150Mi
storageClassName: rook-ceph-block

31
tests/pvc-busybox-rbd.yaml

@ -0,0 +1,31 @@
apiVersion: v1
kind: Pod
metadata:
name: busybox-sleep-rbdtest
spec:
containers:
- name: busybox
image: busybox
args:
- sleep
- "1000000"
volumeMounts:
- mountPath: /test
name: testmount
volumes:
- name: testmount
persistentVolumeClaim:
claimName: busybox-pvc-test-rbd
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: busybox-pvc-test-rbd
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
storageClassName: rook-ceph-block
Loading…
Cancel
Save