move nc to distributed pods
This commit is contained in:
@@ -46,16 +46,13 @@ spec:
|
|||||||
- name: MYSQL_USER
|
- name: MYSQL_USER
|
||||||
value: nextcloud
|
value: nextcloud
|
||||||
- name: REDIS_HOST
|
- name: REDIS_HOST
|
||||||
value: 127.0.0.1
|
value: redis
|
||||||
- name: MYSQL_PASSWORD
|
- name: MYSQL_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: nextcloud-secret
|
name: nextcloud-secret
|
||||||
key: MYSQL_PASSWORD
|
key: MYSQL_PASSWORD
|
||||||
resources:
|
resources: {}
|
||||||
limits:
|
|
||||||
cpu: "0.3"
|
|
||||||
memory: "1G"
|
|
||||||
ports:
|
ports:
|
||||||
- name: mariadb
|
- name: mariadb
|
||||||
containerPort: 3306
|
containerPort: 3306
|
||||||
@@ -64,23 +61,13 @@ spec:
|
|||||||
- mountPath: /var/lib/mysql
|
- mountPath: /var/lib/mysql
|
||||||
name: nextcloud-pvc
|
name: nextcloud-pvc
|
||||||
subPath: 99f37b73-8f14-44b2-9211-af5de21de749/db-storage
|
subPath: 99f37b73-8f14-44b2-9211-af5de21de749/db-storage
|
||||||
- image: redis:alpine
|
|
||||||
name: redis
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: "0.1"
|
|
||||||
memory: "250M"
|
|
||||||
ports:
|
|
||||||
- name: redis
|
|
||||||
containerPort: 6379
|
|
||||||
protocol: TCP
|
|
||||||
- image: nextcloud
|
- image: nextcloud
|
||||||
name: nextcloud
|
name: nextcloud
|
||||||
env:
|
env:
|
||||||
- name: MYSQL_DATABASE
|
- name: MYSQL_DATABASE
|
||||||
value: nextcloud
|
value: nextcloud
|
||||||
- name: MYSQL_HOST
|
- name: MYSQL_HOST
|
||||||
value: 127.0.0.1:3306
|
value: maridb:3306
|
||||||
- name: MYSQL_USER
|
- name: MYSQL_USER
|
||||||
value: nextcloud
|
value: nextcloud
|
||||||
- name: PHP_MEMORY_LIMIT
|
- name: PHP_MEMORY_LIMIT
|
||||||
@@ -88,7 +75,7 @@ spec:
|
|||||||
- name: PHP_UPLOAD_LIMIT
|
- name: PHP_UPLOAD_LIMIT
|
||||||
value: 100G
|
value: 100G
|
||||||
- name: REDIS_HOST
|
- name: REDIS_HOST
|
||||||
value: 127.0.0.1
|
value: redis
|
||||||
- name: MYSQL_PASSWORD
|
- name: MYSQL_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
@@ -98,10 +85,7 @@ spec:
|
|||||||
- name: nextcloud
|
- name: nextcloud
|
||||||
containerPort: 80
|
containerPort: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
resources:
|
resources: {}
|
||||||
limits:
|
|
||||||
cpu: "0.5"
|
|
||||||
memory: "2G"
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /var/www/html
|
- mountPath: /var/www/html
|
||||||
name: nextcloud-pvc
|
name: nextcloud-pvc
|
||||||
@@ -118,6 +102,4 @@ spec:
|
|||||||
server: 192.168.178.4
|
server: 192.168.178.4
|
||||||
path: /mnt/storage/service/nextcloud/data
|
path: /mnt/storage/service/nextcloud/data
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
11
apps/nextcloud/base/database service.yaml
Normal file
11
apps/nextcloud/base/database service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mariadb
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: mariadb
|
||||||
|
port: 3306
|
||||||
|
targetPort: mariadb
|
||||||
|
selector:
|
||||||
|
app: mariadb
|
||||||
63
apps/nextcloud/base/database.yaml
Normal file
63
apps/nextcloud/base/database.yaml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mariadb
|
||||||
|
name: mariadb
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mariadb
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mariadb
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: mariadb
|
||||||
|
name: mariadb
|
||||||
|
args:
|
||||||
|
- --transaction-isolation=READ-COMMITTED
|
||||||
|
- --binlog-format=ROW
|
||||||
|
- --innodb-file-per-table=1
|
||||||
|
- --skip-innodb-read-only-compressed
|
||||||
|
env:
|
||||||
|
- name: MARIADB_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: nextcloud-secret
|
||||||
|
key: MARIADB_ROOT_PASSWORD
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: nextcloud
|
||||||
|
- name: REDIS_HOST
|
||||||
|
value: 127.0.0.1
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: nextcloud-secret
|
||||||
|
key: MYSQL_PASSWORD
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "0.3"
|
||||||
|
memory: "1G"
|
||||||
|
ports:
|
||||||
|
- name: mariadb
|
||||||
|
containerPort: 3306
|
||||||
|
protocol: TCP
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/lib/mysql
|
||||||
|
name: nextcloud-pvc
|
||||||
|
subPath: 99f37b73-8f14-44b2-9211-af5de21de749/db-storage
|
||||||
|
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: nextcloud-pvc
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: nextcloud-pvc
|
||||||
|
|
||||||
11
apps/nextcloud/base/redis service.yaml
Normal file
11
apps/nextcloud/base/redis service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: redis
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
selector:
|
||||||
|
app: redis
|
||||||
31
apps/nextcloud/base/redis.yaml
Normal file
31
apps/nextcloud/base/redis.yaml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
|
name: redis
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: redis
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: redis:alpine
|
||||||
|
name: redis
|
||||||
|
resources:
|
||||||
|
limits: {}
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
protocol: TCP
|
||||||
|
|
||||||
|
restartPolicy: Always
|
||||||
|
|
||||||
Reference in New Issue
Block a user