From b10eeea4e9e401d3db5b54eb269fe5f576144f81 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Jun 2021 11:21:16 +0200 Subject: [PATCH 1/2] ++tests --- README.md | 7 ++++++ tests/README.md | 23 ++++++++++++++++++++ tests/pvc-busybox-cephfs-resized.yaml | 11 ++++++++++ tests/pvc-busybox-cephfs.yaml | 31 +++++++++++++++++++++++++++ tests/pvc-busybox-rbd-resize.yaml | 11 ++++++++++ tests/pvc-busybox-rbd.yaml | 31 +++++++++++++++++++++++++++ 6 files changed, 114 insertions(+) create mode 100644 tests/README.md create mode 100644 tests/pvc-busybox-cephfs-resized.yaml create mode 100644 tests/pvc-busybox-cephfs.yaml create mode 100644 tests/pvc-busybox-rbd-resize.yaml create mode 100644 tests/pvc-busybox-rbd.yaml diff --git a/README.md b/README.md index 7149297..8a892e8 100644 --- a/README.md +++ b/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 diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..3e3e500 --- /dev/null +++ b/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 diff --git a/tests/pvc-busybox-cephfs-resized.yaml b/tests/pvc-busybox-cephfs-resized.yaml new file mode 100644 index 0000000..c88b20e --- /dev/null +++ b/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 diff --git a/tests/pvc-busybox-cephfs.yaml b/tests/pvc-busybox-cephfs.yaml new file mode 100644 index 0000000..1178c4e --- /dev/null +++ b/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 diff --git a/tests/pvc-busybox-rbd-resize.yaml b/tests/pvc-busybox-rbd-resize.yaml new file mode 100644 index 0000000..62468f9 --- /dev/null +++ b/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 diff --git a/tests/pvc-busybox-rbd.yaml b/tests/pvc-busybox-rbd.yaml new file mode 100644 index 0000000..6b84632 --- /dev/null +++ b/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 From ebf7d51494f2881f2361270460c2bca000fb3215 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Jun 2021 11:31:47 +0200 Subject: [PATCH 2/2] Add pvc tests into rook/ --- rook/pvc-block-rwo.yaml | 12 ++++++++++++ rook/pvc-cephfs-rwx.yaml | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 rook/pvc-block-rwo.yaml create mode 100644 rook/pvc-cephfs-rwx.yaml diff --git a/rook/pvc-block-rwo.yaml b/rook/pvc-block-rwo.yaml new file mode 100644 index 0000000..516a5aa --- /dev/null +++ b/rook/pvc-block-rwo.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: rbd-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: rook-ceph-block diff --git a/rook/pvc-cephfs-rwx.yaml b/rook/pvc-cephfs-rwx.yaml new file mode 100644 index 0000000..859ded0 --- /dev/null +++ b/rook/pvc-cephfs-rwx.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: pvc-multitest-cephfs +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 200Mi + storageClassName: rook-cephfs