Merge branch 'master' of code.ungleich.ch:ungleich-public/ungleich-k8s

This commit is contained in:
Nico Schottelius 2021-06-19 13:13:50 +02:00
commit 729bc26dde
8 changed files with 138 additions and 0 deletions

View file

@ -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

12
rook/pvc-block-rwo.yaml Normal file
View file

@ -0,0 +1,12 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rbd-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: rook-ceph-block

12
rook/pvc-cephfs-rwx.yaml Normal file
View file

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

23
tests/README.md Normal file
View file

@ -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

View file

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

View file

@ -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

View file

@ -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

View file

@ -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