Adding various things like upgrade of openebs

This commit is contained in:
Moritz Graf 2020-06-20 17:30:07 +02:00
parent 0c576fbc71
commit 61c4ad929b
6 changed files with 163 additions and 16 deletions

View File

@ -106,6 +106,14 @@ for i in $( echo $namespaces ) ; do
done done
``` ```
## openebs
Formerly installed using the helm operator, may now be updated using the following command:
```sh
helm upgrade --install -f openebs/openebs.yml --name openebs --namespace openebs stable/openebs
```
## networking with calico ## networking with calico
Install calicoctl in cluster Install calicoctl in cluster
@ -303,6 +311,16 @@ kubectl apply -f minio
kubectl apply -f datalab/ kubectl apply -f datalab/
``` ```
## Benchmark with dbench
Should be usually uncommented, but dbbench may be executed to check speed of local filesystem:
```sh
k create ns dbench
k apply -f dbench/
k delete -f dbench
```
## Web ## Web
```sh ```sh

39
k8s/dbench/dbench.yml Normal file
View File

@ -0,0 +1,39 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: dbench
namespace: dbbench
spec:
storageClassName: openebs-hostpath
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
---
apiVersion: batch/v1
kind: Job
metadata:
name: dbench
namespace: dbbench
spec:
template:
spec:
containers:
- name: dbench
image: sotoaster/dbench:latest
imagePullPolicy: IfNotPresent
env:
- name: DBENCH_MOUNTPOINT
value: /data
- name: FIO_SIZE
value: 1G
volumeMounts:
- name: dbench-pv
mountPath: /data
restartPolicy: Never
volumes:
- name: dbench-pv
persistentVolumeClaim:
claimName: dbench
backoffLimit: 4

View File

@ -0,0 +1,45 @@
kind: ConfigMap
metadata:
creationTimestamp: null
name: rclone-dropbox-config
namespace: mailu
apiVersion: v1
data:
rclone.conf: |
[dropbox]
type = dropbox
token = {"access_token":"17hvEArIh3cAAAAAAAGTXUfwkGdz8EC_rDcEseLmSRltQoUz_AVceuUewx0sGMQ1","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: backup-mailu
namespace: mailu
spec:
schedule: "30 4 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: backup-mailu
image: iptizer/swiss
volumeMounts:
- name: rclone-dropbox-config
mountPath: /rclone.conf
subPath: "rclone.conf"
- mountPath: /data/
name: data
command:
- "/bin/bash"
- "-c"
args:
- "cd / && tar zcvf - /data/ | /usr/bin/rclone --config /rclone.conf -v rcat dropbox:server_backup/$( /bin/expr $( date +%m ) % 3 )_$( /bin/expr $( date +%j ) % 3 )_mailu.tar.gz"
volumes:
- name: rclone-dropbox-config
configMap:
name: rclone-dropbox-config
- name: data
persistentVolumeClaim:
claimName: mailu-storage
restartPolicy: Never

View File

@ -0,0 +1,34 @@
mailuVersion: master
hostnames:
- mail.moritzgraf.de
- moritzgraf.de
domain: moritzgraf.de
secretKey: fa5faeD9aegietaesahbiequ5Pe9au
subnet: 10.233.0.0/16
clamav:
enabled: false
admin:
resources:
requests:
memory: 200Mi
cpu: 100m
limits:
memory: 500Mi
cpu: 500m
dovecot:
resources:
requests:
memory: 200Mi
cpu: 100m
limits:
memory: 500Mi
cpu: 500m
certmanager:
issuerType: ClusterIssuer
issuerName: "letsencrypt-prod"
persistence:
storageClass: openebs-hostpath

25
k8s/mailu/restore.yaml Normal file
View File

@ -0,0 +1,25 @@
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: restore
name: restore
spec:
containers:
- image: iptizer/swiss
name: restore
resources: {}
volumeMounts:
- mountPath: /data/
name: data
command:
- "sleep"
- "3600"
dnsPolicy: ClusterFirst
restartPolicy: Never
volumes:
- name: data
persistentVolumeClaim:
claimName: mailu-storage
status: {}

View File

@ -1,17 +1,3 @@
# # status: implemented
apiVersion: helm.fluxcd.io/v1 analytics:
kind: HelmRelease
metadata:
name: helm-openebs
namespace: flux
spec:
releaseName: openebs
targetNamespace: openebs
chart:
repository: https://kubernetes-charts.storage.googleapis.com
version: 1.9.0
name: openebs
values:
analytics:
enabled: false enabled: false