newcloud init
This commit is contained in:
45
apps/newcloud/base/collabora-deployment.yaml
Normal file
45
apps/newcloud/base/collabora-deployment.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: collabora
|
||||||
|
name: collabora
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: collabora
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: collabora
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- env:
|
||||||
|
- name: TZ
|
||||||
|
value: Europe/Berlin
|
||||||
|
- name: VIRTUAL_HOST
|
||||||
|
value: office.steffenillium.de
|
||||||
|
- name: VIRTUAL_PORT
|
||||||
|
value: "9980"
|
||||||
|
- name: VIRTUAL_PROTO
|
||||||
|
value: http
|
||||||
|
- name: dictionaries
|
||||||
|
value: en_US,de_DE
|
||||||
|
- name: domain
|
||||||
|
value: newcloud.steffenillium.de
|
||||||
|
- name: extra_params
|
||||||
|
value: --o:ssl.enable=false --o:ssl.termination=true
|
||||||
|
image: collabora/code
|
||||||
|
name: collabora
|
||||||
|
ports:
|
||||||
|
- containerPort: 9980
|
||||||
|
protocol: TCP
|
||||||
|
resources: {}
|
||||||
|
securityContext:
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- MKNOD
|
||||||
|
restartPolicy: Always
|
14
apps/newcloud/base/collabora-service.yaml
Normal file
14
apps/newcloud/base/collabora-service.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: collabora
|
||||||
|
name: collabora
|
||||||
|
type: ClusterIp
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8510
|
||||||
|
targetPort: 9980
|
||||||
|
selector:
|
||||||
|
app: collabora
|
53
apps/newcloud/base/nextcloud-app-deployment.yaml
Normal file
53
apps/newcloud/base/nextcloud-app-deployment.yaml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud-app
|
||||||
|
name: nextcloud-app
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nextcloud-app
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud-app
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: nextcloud
|
||||||
|
name: nextcloud-app
|
||||||
|
env:
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_HOST
|
||||||
|
value: nextcloud-db
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: nextcloud
|
||||||
|
- name: PHP_MEMORY_LIMIT
|
||||||
|
value: 2G
|
||||||
|
- name: PHP_UPLOAD_LIMIT
|
||||||
|
value: 100G
|
||||||
|
- name: REDIS_HOST
|
||||||
|
value: redis
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: nextcloud_secret
|
||||||
|
key: MYSQL_PASSWORD
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
hostPort: 8500
|
||||||
|
protocol: TCP
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/www/html
|
||||||
|
name: nextcloud-app-pvc
|
||||||
|
hostname: newcloud.steffenillium.de
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: nextcloud-app-pvc
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: nextcloud-app-pvc
|
13
apps/newcloud/base/nextcloud-app-pvc.yaml
Normal file
13
apps/newcloud/base/nextcloud-app-pvc.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud-app-pvc
|
||||||
|
name: nextcloud-app-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 150Gi
|
||||||
|
status: {}
|
13
apps/newcloud/base/nextcloud-app-service.yaml
Normal file
13
apps/newcloud/base/nextcloud-app-service.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud-app
|
||||||
|
name: nextcloud-app
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8500
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: nextcloud-app
|
47
apps/newcloud/base/nextcloud-db-deployment.yaml
Normal file
47
apps/newcloud/base/nextcloud-db-deployment.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud-db
|
||||||
|
name: nextcloud-db
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nextcloud-db
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud-db
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- --transaction-isolation=READ-COMMITTED
|
||||||
|
- --binlog-format=ROW
|
||||||
|
- --innodb-file-per-table=1
|
||||||
|
- --skip-innodb-read-only-compressed
|
||||||
|
env:
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: nextcloud
|
||||||
|
- name: REDIS_HOST
|
||||||
|
value: redis
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: nextcloud_secret
|
||||||
|
key: MYSQL_PASSWORD
|
||||||
|
image: mariadb
|
||||||
|
name: nextcloud-db
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/lib/mysql
|
||||||
|
name: nextcloud-db-pvc
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: nextcloud-db-pvc
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: nextcloud-db-pvc
|
12
apps/newcloud/base/nextcloud-db-pvc
Normal file
12
apps/newcloud/base/nextcloud-db-pvc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud-db-pvc
|
||||||
|
name: nextcloud-db-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
17
apps/newcloud/base/nextcloud-ingress.yaml
Normal file
17
apps/newcloud/base/nextcloud-ingress.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-ingress
|
||||||
|
namespace: nextcloud
|
||||||
|
labels:
|
||||||
|
expose: "true"
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- web
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(newcloud.steffenillium.de`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: nextcloud-service
|
||||||
|
port: 80
|
9
apps/newcloud/base/nextcloud-secret.yaml
Normal file
9
apps/newcloud/base/nextcloud-secret.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-secret
|
||||||
|
namespace: nextcloud
|
||||||
|
data:
|
||||||
|
MYSQL_PASSWORD: ------------------
|
||||||
|
MYSQL_ROOT_PASSWORD: -----------------
|
||||||
|
|
21
apps/newcloud/base/redis-deployment.yaml
Normal file
21
apps/newcloud/base/redis-deployment.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
|
name: redis
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: redis
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: redis:alpine
|
||||||
|
name: redis
|
||||||
|
resources: {}
|
||||||
|
restartPolicy: Always
|
16
apps/newcloud/kustomization.yaml
Normal file
16
apps/newcloud/kustomization.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: nextcloud
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- base/collabora-deployment.yaml
|
||||||
|
- base/collabora-service.yaml
|
||||||
|
- base/nextcloud-app-deployment.yaml
|
||||||
|
- base/nextcloud-app-pvc.yaml
|
||||||
|
- base/nextcloud-app-service.yaml
|
||||||
|
- base/nextcloud-db-deployment.yaml
|
||||||
|
- base/nextcloud-db-pvc
|
||||||
|
- base/nextcloud-ingress.yaml
|
||||||
|
- base/nextcloud-secret.yaml
|
||||||
|
- base/redis-deployment.yaml
|
Reference in New Issue
Block a user